This sounds right. I think my initial thought about using "|| (defined(_TIME_BITS) && _TIME_BITS == 32)" here was for 32-bit MSVC (which now uses 64-bit time_t by default), but now that I think about it probably would just result in compilation error without _USE_32BIT_TIME_T, since its time_t still would be 64-bit.
Side comment: when I wrote patch series which integrated tests with Automake I planned (well, still want) to work more on winpthreads. However, I was allocating most of my free time to work on my library. Now that I got to some reasonable point, I think I'll be able to work on winpthreads a little more. - Kirill Makurin ________________________________ From: Pali Rohár <[email protected]> Sent: Sunday, December 21, 2025 1:19 AM To: [email protected] <[email protected]> Subject: [Mingw-w64-public] [PATCH 12/16] winpthreads: Fix WINPTHREADS_TIME_BITS mingw-w64 header files already sets _USE_32BIT_TIME_T based on the _TIME_BITS settings. All other header files are using exclusively _USE_32BIT_TIME_T macro for determining if the time_t is 32-bit or 64-bit. So do same in winpthreads header files for compatibility with other CRT and mingw-w64 functions. --- mingw-w64-libraries/winpthreads/include/pthread_compat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw-w64-libraries/winpthreads/include/pthread_compat.h b/mingw-w64-libraries/winpthreads/include/pthread_compat.h index 2a978ffb4fe9..e0b9cc3407cf 100644 --- a/mingw-w64-libraries/winpthreads/include/pthread_compat.h +++ b/mingw-w64-libraries/winpthreads/include/pthread_compat.h @@ -60,7 +60,7 @@ #ifndef WIN_PTHREADS_PTHREAD_COMPAT_H #define WIN_PTHREADS_PTHREAD_COMPAT_H -#if defined(_USE_32BIT_TIME_T) || (defined(_TIME_BITS) && _TIME_BITS == 32) +#if defined(_USE_32BIT_TIME_T) #define WINPTHREADS_TIME_BITS 32 #else #define WINPTHREADS_TIME_BITS 64 -- 2.20.1 _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
