On Tue, 13 May 2025, Pali Rohár wrote:
On 64-bit are _fstati64 and _fstat64 functions same, both uses 64-bit
time_t and 64-bit off_t. On 32-bit is _fstati64 using 32-bit time_t.
64-bit msvcrt DLL library provides both native _fstati64 and _fstat64
symbols. And other 64-bit CRT DLL libraries (msvcr80+ and UCRT) are not
categorized as FIXED_SIZE_SYMBOLS.
32-bit msvcr70 and msvcr71 DLL libraries provides native fixed-size symbols
for 64-bit wide functions like _fstat64.
Import library for 32-bit system os msvcrt uses emulation of _fstat64
function which also defines own alias for fstat64 in file stdio/_fstat64.c.
So define fstat64 symbol as alias to _fstat64 (instead of as to _fstati64)
in crt-aliases.def.in file for all import CRT libraries which provides
native _fstat64 symbol (non-i386 msvcrt, msvcr70+ and ucrt).
Current condition for fstat64 in crt-aliases.def.in is wrong because it
does not take into account the 64-bit msvcrt case which defines the
NO_FIXED_SIZE_64_ALIAS macro saying that DLL provides the native _fstat64
symbol (and hence crt-aliases.def.in must not define _fstat64 symbol).
And there are also missing settings for NO_FIXED_SIZE_64_ALIAS in msvcr70
and msvcr71 def files as these DLL libraries provides _fstat64 function.
---
mingw-w64-crt/def-include/crt-aliases.def.in | 5 +++--
mingw-w64-crt/lib-common/msvcrt.def.in | 4 ++++
mingw-w64-crt/lib32/msvcr70.def.in | 1 +
mingw-w64-crt/lib32/msvcr70d.def.in | 1 +
mingw-w64-crt/lib32/msvcr71.def.in | 1 +
mingw-w64-crt/lib32/msvcr71d.def.in | 1 +
6 files changed, 11 insertions(+), 2 deletions(-)
Thanks for the fix; I'll push it once it completes a run through CI.
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public