mingw build fixes (tested with i686-w64-mingw32 on linux-x86_64)

This commit is contained in:
Robin Gareus 2014-03-04 15:25:58 +01:00
parent 3e250d5f06
commit 912f07b919
24 changed files with 147 additions and 79 deletions

View file

@ -39,3 +39,19 @@ localtime_r(const time_t *const timep, struct tm *p_tm)
}
#endif
#ifdef __MINGW64__
struct tm *
__cdecl localtime(const long int *_Time)
{
if (_Time == NULL)
{
return localtime((const time_t *const)NULL); // Unpredictable behavior in case of _Time == NULL;
}
else
{
const time_t tempTime = *_Time;
return localtime(&tempTime);
}
}
#endif