---
 mingw-w64-crt/Makefile.am                            |  2 +-
 mingw-w64-crt/def-include/crt-aliases.def.in         |  1 +
 .../lib-common/api-ms-win-crt-stdio-l1-1-0.def       |  1 +
 mingw-w64-crt/stdio/_lseeki64.c                      |  3 +++
 mingw-w64-crt/stdio/lseek64.c                        | 12 ------------
 5 files changed, 6 insertions(+), 13 deletions(-)
 delete mode 100644 mingw-w64-crt/stdio/lseek64.c

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 4202d535e2a3..d4f7a89d8eee 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -1114,7 +1114,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/ftruncate64.c      stdio/lltoa.c             stdio/lltow.c            
stdio/lseek64.c \
+  stdio/ftruncate64.c      stdio/lltoa.c             stdio/lltow.c \
   stdio/__mingw_fix_stat_path.c stdio/__mingw_fix_wstat_path.c \
   \
   stdio/mingw_pformat.h    mingw_sformat.h           mingw_swformat.h \
diff --git a/mingw-w64-crt/def-include/crt-aliases.def.in 
b/mingw-w64-crt/def-include/crt-aliases.def.in
index 4ddabf7bd5f7..de1961f90f7e 100644
--- a/mingw-w64-crt/def-include/crt-aliases.def.in
+++ b/mingw-w64-crt/def-include/crt-aliases.def.in
@@ -303,6 +303,7 @@ fopen64 == fopen
 ; fgetpos and fsetpos are already 64-bit
 fgetpos64 == fgetpos
 fsetpos64 == fsetpos
+lseek64 == _lseeki64
 #endif
 #ifdef UCRTBASE
 stat32 == _stat32
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 70a4230910d8..83484113bf61 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
@@ -93,6 +93,7 @@ _locking
 _lseek
 lseek == _lseek
 _lseeki64
+lseek64 == _lseeki64
 _mktemp
 mktemp == _mktemp
 _mktemp_s
diff --git a/mingw-w64-crt/stdio/_lseeki64.c b/mingw-w64-crt/stdio/_lseeki64.c
index ce8152e174b6..2408a6cfb6eb 100644
--- a/mingw-w64-crt/stdio/_lseeki64.c
+++ b/mingw-w64-crt/stdio/_lseeki64.c
@@ -20,3 +20,6 @@ __int64 __cdecl _lseeki64(int fd, __int64 offset, int whence)
   return _lseek(fd, offset, whence);
 }
 __int64 (__cdecl *__MINGW_IMP_SYMBOL(_lseeki64))(int, __int64, int) = 
_lseeki64;
+
+__int64 __attribute__ ((alias ("_lseeki64"))) __cdecl lseek64(int, __int64, 
int);
+extern __int64 (__cdecl * __attribute__((alias 
(__MINGW64_STRINGIFY(__MINGW_IMP_SYMBOL(_lseeki64))))) 
__MINGW_IMP_SYMBOL(lseek64))(int, __int64, int);
diff --git a/mingw-w64-crt/stdio/lseek64.c b/mingw-w64-crt/stdio/lseek64.c
deleted file mode 100644
index afda7cefbbc1..000000000000
--- a/mingw-w64-crt/stdio/lseek64.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * This file has no copyright assigned and is placed in the Public Domain.
- * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file DISCLAIMER.PD within this package.
- */
-#include <io.h>
-
-_off64_t lseek64(int fd,_off64_t offset, int whence) 
-{
-  return _lseeki64(fd, (_off64_t) offset, whence);
-}
-
-- 
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