Re: Enabling hi-res timestamps on Windows
Eli Zaretskii <[email protected]>
| Newsgroups | gmane.comp.gnu.make.bugs |
|---|---|
| Message-ID | <[email protected]> |
> Date: Tue, 18 Feb 2025 22:06:11 +0100 (GMT+01:00) > From: Eldred HABERT <[email protected]> > > Hello! > > I am having an issue that some versions of Make never stop on a Make file I made, but only on Windows. > https://github.com/ISSOtm/gb-starter-kit/issues/1#issuecomment-1793775226 > I have traced the issue to hi-res timestamps being disabled for some builds of Make; apparently, those that use `config.h.W32`, which explicitly disables hi-res timestamps. The MSYS2 port was reported to work reliably. > > Thus: I'd like to request that hi-res timestamps be enabled in that config file. It is not that simple. GNU Make uses 'stat' to retrieve the time stamp of files, and the Windows implementation of 'stat' reports times without hi-res data. So to define FILE_TIMESTAMP_HI_RES in the native Windows port of GNU Make, someone will need to produce a reimplementation of 'stat' that returns higher-resolution time stamp. Patches are welcome. (The MSYS2 port uses the Cygwin runtime library, whose 'stat' does provide hi-res times. But the native port cannot use the Cygwin runtime, it must use the native runtime or the Win32 APIs.)