Hi Mateusz,
The patch looks mostly good to me.
On 23/11/2018 22:37, Mateusz wrote:
--- a/mingw-w64-headers/crt/stdio.h
+++ b/mingw-w64-headers/crt/stdio.h
@@ -609,31 +609,20 @@ int vsnprintf (char *__stream, size_t __n, const char
*__format, __builtin_va_li
/* Shouldn't be any fseeko32 in glibc, 32bit to 64bit casting should be fine */
/* int fseeko32(FILE* stream, _off_t offset, int whence);*/ /* fseeko32
redirects to fseeko64 */
-#if __MSVCRT_VERSION__ >= 0x1400
+#if __MSVCRT_VERSION__ >= 0x900
// Mark these as _CRTIMP to avoid trying to link in the mingwex versions.
_CRTIMP int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin);
_CRTIMP __int64 __cdecl _ftelli64(FILE *_File);
- __mingw_static_ovr int fseeko(FILE *_File, _off_t _Offset, int _Origin) {
- return fseek(_File, _Offset, _Origin);
- }
- __mingw_static_ovr int fseeko64(FILE *_File, _off64_t _Offset, int _Origin) {
- return _fseeki64(_File, _Offset, _Origin);
- }
- __mingw_static_ovr _off_t ftello(FILE *_File) {
- return ftell(_File);
- }
- __mingw_static_ovr _off64_t ftello64(FILE *_File) {
- return _ftelli64(_File);
- }
#else
__MINGW_EXTENSION int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int
_Origin);
__MINGW_EXTENSION __int64 __cdecl _ftelli64(FILE *_File);
+#endif
I would suggest to get rid of #if here and simply always use _CRTIMP
without __MINGW_EXTENSION. This would require adding symbols with
__MINGW_IMP_SYMBOL to symbols in fseeki64.c.
Thanks,
Jacek
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public