Currently all 32-bit non-UCRT builds are forced to use time_t type as 32-bit and also all time_t functions in 32-bit form.
With this change, any msvcrt.dll based 32-bit application can use 64-bit time_t functions by defining -D_TIME_BITS=64 flag during compilation. Flag -D_TIME_BITS=64 is recognized also by GNU C library header files for the same purpose. When both _USE_32BIT_TIME_T and _TIME_BITS are defined by application then _USE_32BIT_TIME_T override effect of _TIME_BITS. --- mingw-w64-headers/crt/_mingw.h.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-headers/crt/_mingw.h.in b/mingw-w64-headers/crt/_mingw.h.in index 0752993f31d2..8e5944a8374f 100644 --- a/mingw-w64-headers/crt/_mingw.h.in +++ b/mingw-w64-headers/crt/_mingw.h.in @@ -384,7 +384,7 @@ typedef int __int128 __attribute__ ((__mode__ (TI))); #ifndef __WIDL__ -#if defined (_WIN32) && !defined (_WIN64) && !defined (__MINGW_USE_VC2005_COMPAT) && !defined (_UCRT) +#if defined (_WIN32) && !defined (_WIN64) && !defined (__MINGW_USE_VC2005_COMPAT) && !defined (_UCRT) && !(defined (_TIME_BITS) && _TIME_BITS == 64) #ifndef _USE_32BIT_TIME_T #define _USE_32BIT_TIME_T #endif -- 2.20.1 _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public