Re: [PATCH] Bad timestamps on MinGW32

2022-11-03 Thread Eli Zaretskii
> From: Orgad Shaneh > Date: Thu, 3 Nov 2022 08:29:53 +0200 > Cc: bug-make@gnu.org > > > > Do you mean that __MINGW_USE_VC2005_COMPAT has no effect on this > > > platform? > > > > Indeed, it doesn't currently. But I wouldn't count on that, some > > future version could introduce it. > > Is

Re: [PATCH] Bad timestamps on MinGW32

2022-11-03 Thread Orgad Shaneh
On Thu, Nov 3, 2022 at 8:07 AM Eli Zaretskii wrote: > > > From: Orgad Shaneh > > Date: Wed, 2 Nov 2022 22:14:26 +0200 > > Cc: bug-make@gnu.org > > > > On Wed, Nov 2, 2022 at 7:04 PM Eli Zaretskii wrote: > > > > Fix by enabling _stat64 also for MinGW. > > > > > > Thanks, but this cannot be done

Re: [PATCH] Bad timestamps on MinGW32

2022-11-03 Thread Eli Zaretskii
> From: Jeffrey Walton > Date: Wed, 2 Nov 2022 16:22:51 -0400 > Cc: bug-make@gnu.org > > You might also be interested in __MINGW64__. That's possible, but AFAIK it is only defined after including some headers; the compiler itself doesn't define it. Caveat emptor. > I don't think it's a good

Re: [PATCH] Bad timestamps on MinGW32

2022-11-03 Thread Eli Zaretskii
> From: Orgad Shaneh > Date: Wed, 2 Nov 2022 22:14:26 +0200 > Cc: bug-make@gnu.org > > On Wed, Nov 2, 2022 at 7:04 PM Eli Zaretskii wrote: > > > 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

Re: [PATCH] Bad timestamps on MinGW32

2022-11-02 Thread Paul Smith
On Wed, 2022-11-02 at 16:22 -0400, Jeffrey Walton wrote: > A first class configure test that checks for the size of time_t will > probably be your best choice. Unfortunately we don't (always) run configure on Windows (it's possible to build GNU make on Windows systems where you can't run

Re: [PATCH] Bad timestamps on MinGW32

2022-11-02 Thread Jeffrey Walton
On Wed, Nov 2, 2022 at 4:15 PM Orgad Shaneh wrote: > > On Wed, Nov 2, 2022 at 7:04 PM Eli Zaretskii wrote: > > > 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 >

Re: [PATCH] Bad timestamps on MinGW32

2022-11-02 Thread Orgad Shaneh
On Wed, Nov 2, 2022 at 7:04 PM Eli Zaretskii wrote: > > 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,

Re: [PATCH] Bad timestamps on MinGW32

2022-11-02 Thread Eli Zaretskii
> From: Orgad Shaneh > 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

[PATCH] Bad timestamps on MinGW32

2022-11-02 Thread Orgad Shaneh
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