Fix or rather workaround for MinGW and maybe other systems without localtime_r function

This commit is contained in:
zimoch
2014-06-24 13:20:19 +00:00
parent 0ab0d6db07
commit 51bd766ba6

View File

@ -64,6 +64,13 @@ int timezone = 0;
} while (0)
#endif
#if defined(__MINGW32__)
/* MinGW has no re-entrant localtime. How about other environments? */
/* Just let's hope for the best */
#undef localtime_r
#define localtime_r(timet,tm) (*(tm)=*localtime(timet))
#endif
class TimestampConverter : public StreamFormatConverter
{
int parse(const StreamFormat&, StreamBuffer&, const char*&, bool);