On Thu, 20 Mar 2025, Pali Rohár wrote:
These functions are available since msvcr70.dll.
For older msvcrt versions provide emulation via _fstat32(), _stat32() and _wstat32() functions. These functions have only truncated 32-bit file size and timestamp support. Real 64-bit non-truncated file size and timestamp information is retrieved via the WinAPI calls. For _stat64() and _wstat64() use FindFirstFile() call and for _fstat64() use GetFileInformationByHandle() call.
It took me a couple of reads through this to understand exactly what you mean here, but I don't have any suggestions for how to write it more understandably.
It looks to me from MS docs, that GetFileInformationByHandle only is available since XP. Is this a problem for us? (I don't mind it.)
Same thing is doing msvcrt DLL library for other stat functions.
This sentences is unnecessarily cryptic. "The msvcrt DLL library does the same for other stat functions" is understandable. Is that what you mean here?
Functions _fstat64() and _stat64() are already used by mingw-w64 crt, so ensure that they are present in every CRT import library.
Where are they used? I only see _fstat64 used in the _fstat64i32 wrapper. But _stat64() is used in the stat() wrapper already, so I guess that stat() didn't work at all on the older CRTs so far?
Then again I see that these functions do exist in msvcrt.dll since Windows 2000, so the number of people targeting older versions and/or using older numbered CRTs is very low, so that's probably why this hasn't been a big issue so far.
Other than that, I think this patch looks ok. // Martin _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public