mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-22 06:36:29 +01:00
mingw build fixes (tested with i686-w64-mingw32 on linux-x86_64)
This commit is contained in:
parent
3e250d5f06
commit
912f07b919
24 changed files with 147 additions and 79 deletions
|
|
@ -3,11 +3,22 @@
|
|||
#include <time.h>
|
||||
|
||||
#ifdef COMPILER_MSVC
|
||||
#define localtime_r( _clock, _result ) \
|
||||
( *(_result) = *localtime( (_clock) ), \
|
||||
(_result) )
|
||||
#else
|
||||
extern struct tm *localtime_r(const time_t *const timep, struct tm *p_tm);
|
||||
|
||||
#define localtime_r( _clock, _result ) \
|
||||
( *(_result) = *localtime( (_clock) ), (_result) )
|
||||
|
||||
#elif defined __MINGW64__
|
||||
|
||||
# ifdef (localtime_r)
|
||||
# undef localtime_r
|
||||
# endif
|
||||
|
||||
// As in 64 bit time_t is 64 bit integer, compiler breaks compilation
|
||||
// everytime implicit cast from long int* to time_t* worked in
|
||||
// the past (32 bit). To unblock such a cast we added the localtime below:
|
||||
extern struct tm *localtime(const long int *_Time);
|
||||
extern struct tm *localtime_r(const time_t *const timep, struct tm *p_tm);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue