> From: Orgad Shaneh <org...@gmail.com> > Date: Wed, 2 Nov 2022 18:32:49 +0200 > > Commit 01142a53c9d (Add support for intmax_t) added support for 64-bit > time_t by defining __MINGW_USE_VC2005_COMPAT. But this only works with > _stat64 as expected. When stat is used on 32-bit systems, it returns a > bad timestamp (for example, 72586185920376753). > > This triggers the following errors every time make is executed: > mingw32-make: Warning: File 'Makefile' has modification time 7.3e+16 s > in the future > mingw32-make: warning: Clock skew detected. Your build may be incomplete. > > and of course, dependencies are completely broken. > > Fix by enabling _stat64 also for MinGW.
Thanks, but this cannot be done for all MinGW builds. There's mingw.org's MinGW (which is what I use), and its default is to use 32-bit time_t values. If you use this change with that MinGW, Make will likely crash at run time, because various libraries it is linked against use a different time_t in stat calls. So this condition: > -#if defined(_MSC_VER) && _MSC_VER > 1200 > +#if defined(__MINGW32__) || (defined(_MSC_VER) && _MSC_VER > 1200) must be rewritten to catch only MinGW64 builds. Which would mean a more fine-grained testing of the value of __MINGW_MAJOR_VERSION etc.