Use __MINGW_ASM_CALL for function symbol redirect and use off_t type (instead of _off_t) for offset parameter. off_t type follows the _FILE_OFFSET_BITS setting. _off_t type is always 32-bit.
Also remove _CRTIMP declaration because it is incompatible with __MINGW_ASM_CALL macro for i386 builds with gcc. gcc automatically adds additional underscore mangling to symbol name for function declared together with _CRTIMP and __MINGW_ASM_CALL. --- mingw-w64-headers/crt/stdio.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h index 721b68463351..a45e49f69927 100644 --- a/mingw-w64-headers/crt/stdio.h +++ b/mingw-w64-headers/crt/stdio.h @@ -583,18 +583,15 @@ int vsnprintf (char *__stream, size_t __n, const char *__format, __builtin_va_li _CRTIMP int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin); _CRTIMP __int64 __cdecl _ftelli64(FILE *_File); - _CRTIMP int __cdecl fseeko(FILE *_File, _off_t _Offset, int _Origin); + int __cdecl fseeko(FILE *_File, off_t _Offset, int _Origin) +#if (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)) + __MINGW_ASM_CALL(fseeko64) +#endif + ; _CRTIMP int __cdecl fseeko64(FILE *_File, _off64_t _Offset, int _Origin); _CRTIMP _off_t __cdecl ftello(FILE *_File); _CRTIMP _off64_t __cdecl ftello64(FILE *_File); -#ifndef _FILE_OFFSET_BITS_SET_FSEEKO -#define _FILE_OFFSET_BITS_SET_FSEEKO -#if (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)) -#define fseeko fseeko64 -#endif /* (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)) */ -#endif /* _FILE_OFFSET_BITS_SET_FSEEKO */ - #ifndef _FILE_OFFSET_BITS_SET_FTELLO #define _FILE_OFFSET_BITS_SET_FTELLO #if (defined(_FILE_OFFSET_BITS) && (_FILE_OFFSET_BITS == 64)) -- 2.20.1 _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
