diff options
author | Kleis Auke Wolthuizen <github@kleisauke.nl> | 2021-07-14 16:14:27 +0200 |
---|---|---|
committer | Kleis Auke Wolthuizen <github@kleisauke.nl> | 2021-07-14 16:58:07 +0200 |
commit | 68ee2ffca663f2b705dc84614f37b179a81b826c (patch) | |
tree | fe60c0113f11d71ce8dff0175077a0b5d5ca63ec /src | |
parent | bcd0f282e71de26e267ce61de27fb4d493cbda56 (diff) | |
download | lcms2-68ee2ffca663f2b705dc84614f37b179a81b826c.tar.gz |
Prefer to use gmtime_s instead
MinGW-w64 defines _gmtime64_s on both i686 and x86_64 targets.
Prefer to use the gmtime_s macro to avoid that _gmtime64_s is
being called on Windows 32-bit, which will not work.
This commit also generally ensures that a threadsafe alternative
is provided for toolchains targeting Windows i686.
Diffstat (limited to 'src')
-rw-r--r-- | src/cmsplugin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmsplugin.c b/src/cmsplugin.c index a52817a..5aca69a 100644 --- a/src/cmsplugin.c +++ b/src/cmsplugin.c @@ -993,7 +993,7 @@ void* CMSEXPORT cmsGetContextUserData(cmsContext ContextID) cmsBool _cmsGetTime(struct tm* ptr_time) { struct tm* t; -#if defined(HAVE_GMTIME_R) || defined(HAVE__GMTIME64_S) +#if defined(HAVE_GMTIME_R) || defined(HAVE_GMTIME_S) struct tm tm; #endif @@ -1001,8 +1001,8 @@ cmsBool _cmsGetTime(struct tm* ptr_time) #ifdef HAVE_GMTIME_R t = gmtime_r(&now, &tm); -#elif defined(HAVE__GMTIME64_S) - t = _gmtime64_s(&tm, &now) == 0 ? &tm : NULL; +#elif defined(HAVE_GMTIME_S) + t = gmtime_s(&tm, &now) == 0 ? &tm : NULL; #else _cmsEnterCriticalSectionPrimitive(&_cmsContextPoolHeadMutex); t = gmtime(&now); |