Both msvcrt and UCRT ABI uses for off_t-based function without any suffix
in their name the 32-bit long off_t type for both 32-bit and 64-bit
architectures.
So define the fseeko symbol as alias to fseek and ftello symbol as alias to
ftell symbol because the fseek and ftell also uses only 32-bit offset type.
---
mingw-w64-crt/Makefile.am | 2 +-
mingw-w64-crt/def-include/crt-aliases.def.in | 2 ++
mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def | 2 ++
mingw-w64-crt/stdio/fseeko32.c | 7 -------
mingw-w64-crt/stdio/ftello.c | 5 -----
5 files changed, 5 insertions(+), 13 deletions(-)
delete mode 100644 mingw-w64-crt/stdio/fseeko32.c
delete mode 100644 mingw-w64-crt/stdio/ftello.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index acf078eeaa0d..a6d45d93419e 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -1113,7 +1113,7 @@ src_libmingwex=\
stdio/strtok_r.c \
stdio/_Exit.c stdio/_findfirst64i32.c stdio/_findnext64i32.c
stdio/_wfindfirst64i32.c stdio/_wfindnext64i32.c \
stdio/asprintf.c \
- stdio/fopen64.c stdio/fseeko32.c stdio/fseeko64.c
stdio/ftello.c \
+ stdio/fopen64.c stdio/fseeko64.c
\
stdio/ftello64.c stdio/ftruncate64.c stdio/lltoa.c
stdio/lltow.c stdio/lseek64.c \
stdio/__mingw_fix_stat_path.c stdio/__mingw_fix_wstat_path.c \
\
diff --git a/mingw-w64-crt/def-include/crt-aliases.def.in
b/mingw-w64-crt/def-include/crt-aliases.def.in
index de0333938dba..25f5b87010e0 100644
--- a/mingw-w64-crt/def-include/crt-aliases.def.in
+++ b/mingw-w64-crt/def-include/crt-aliases.def.in
@@ -292,6 +292,8 @@ ADD_DOUBLE_UNDERSCORE(toascii)
ADD_UNDERSCORE(pclose)
ADD_UNDERSCORE(popen)
#endif
+fseeko == fseek
+ftello == ftell
; ADD_UNDERSCORE(scalb)
; This is list of symbol aliases for Large File Specification (extension to
Single UNIX Specification)
diff --git a/mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def
b/mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def
index d23469ac26ab..abdcb8224c7c 100644
--- a/mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def
+++ b/mingw-w64-crt/lib-common/api-ms-win-crt-stdio-l1-1-0.def
@@ -170,9 +170,11 @@ fread_s
freopen
freopen_s
fseek
+fseeko == fseek
fsetpos
fsetpos64 == fsetpos
ftell
+ftello == ftell
fwrite
getc
getchar
diff --git a/mingw-w64-crt/stdio/fseeko32.c b/mingw-w64-crt/stdio/fseeko32.c
deleted file mode 100644
index ca222ffbe1e4..000000000000
--- a/mingw-w64-crt/stdio/fseeko32.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/*non-standard*/
-#include <stdio.h>
-
-int fseeko(FILE* stream, _off_t offset, int whence){
- _off64_t off = offset;
- return fseeko64(stream,off,whence);
-}
diff --git a/mingw-w64-crt/stdio/ftello.c b/mingw-w64-crt/stdio/ftello.c
deleted file mode 100644
index 1a63987feac1..000000000000
--- a/mingw-w64-crt/stdio/ftello.c
+++ /dev/null
@@ -1,5 +0,0 @@
-#include <stdio.h>
-
-_off_t ftello(FILE * stream){
- return (_off_t) ftello64(stream);
-}
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public