All those UCRT inline functions are defined just as redirects to another
functions. All those functions have already defined symbols in UCRT import
library (as aliases). So remove inline functions and unify them between
msvcrt and UCRT builds. Add missing __cdecl and _CRTIMP keywords.
---
 mingw-w64-headers/crt/stdio.h | 26 ++++----------------------
 1 file changed, 4 insertions(+), 22 deletions(-)

diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h
index 3aca32a52f14..89ce689cceb3 100644
--- a/mingw-w64-headers/crt/stdio.h
+++ b/mingw-w64-headers/crt/stdio.h
@@ -580,30 +580,12 @@ int vsnprintf (char *__stream, size_t __n, const char 
*__format, __builtin_va_li
   int __cdecl fseek(FILE *_File,long _Offset,int _Origin);
   long __cdecl ftell(FILE *_File);
 
-  /* 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 */
   _CRTIMP int __cdecl _fseeki64(FILE *_File,__int64 _Offset,int _Origin);
   _CRTIMP __int64 __cdecl _ftelli64(FILE *_File);
-#ifdef _UCRT
-  __mingw_ovr int fseeko(FILE *_File, _off_t _Offset, int _Origin) {
-    return fseek(_File, _Offset, _Origin);
-  }
-  __mingw_ovr int fseeko64(FILE *_File, _off64_t _Offset, int _Origin) {
-    return _fseeki64(_File, _Offset, _Origin);
-  }
-  __mingw_ovr _off_t ftello(FILE *_File) {
-    return ftell(_File);
-  }
-  __mingw_ovr _off64_t ftello64(FILE *_File) {
-    return _ftelli64(_File);
-  }
-#else
-  int fseeko64(FILE* stream, _off64_t offset, int whence);
-  int fseeko(FILE* stream, _off_t offset, int whence);
-  /* Returns truncated 64bit off_t */
-  _off_t ftello(FILE * stream);
-  _off64_t ftello64(FILE * stream);
-#endif
+  _CRTIMP int __cdecl fseeko(FILE *_File, _off_t _Offset, int _Origin);
+  _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
-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to