htmldoc
                                
                                 htmldoc copied to clipboard
                                
                                    htmldoc copied to clipboard
                            
                            
                            
                        gmtime_r/localtime_r on MinGW-w64
When building for Windows with recent MinGW-w64 (e.g. GCC12 from https://winlibs.com/) gmtime_r and localtime_r are actually available if _POSIX_THREAD_SAFE_FUNCTIONS is defined.
There is some code that addresses previously missing functions in MinGW, like define localtime_r(t,tm) localtime_s(tm,t) in htmldoc/zipc.c, but it would be better to guard this code with #ifndef _POSIX_THREAD_SAFE_FUNCTIONS.
Maybe configure can also be fixed to detect if gmtime_r and localtime_r are available in MinGW-w64 of _POSIX_THREAD_SAFE_FUNCTIONS is defined.
@brechtsanders Even in MinGW, the Windows API functions are still available, right? I really don't want to special-case this as MinGW isn't a platform/toolset I support or use.
MinGW provides Windows API functions, and additionally a subset of POSIX (e.g. pthreads).
The fact that you already treat gmtime_r and localtime_r differently for Windows is sort of the issue, as recent MinGW-w64 (not sure about old MinGW) also define these (when _POSIX_THREAD_SAFE_FUNCTIONS is defined).
Sorry, I'm not going to special-case MingW support for HTMLDOC.
The issue still exists in 5.5.3, but when building current master for win64 it succeeds.