This simplify symbol definition and move it to the common place into
crt-aliases.def.in file where are also other symbol aliases.
---
 mingw-w64-crt/Makefile.am                    |  1 -
 mingw-w64-crt/def-include/crt-aliases.def.in |  7 ++++++-
 mingw-w64-crt/stdio/_ftime.c                 | 19 -------------------
 3 files changed, 6 insertions(+), 21 deletions(-)
 delete mode 100644 mingw-w64-crt/stdio/_ftime.c

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index b253de84e9af..c78138757c54 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -1065,7 +1065,6 @@ src_libmingwex=\
   stdio/vfscanf2.S         stdio/vfwscanf2.S         stdio/vscanf2.S          
stdio/vsscanf2.S          stdio/vswscanf2.S \
   stdio/vwscanf2.S         stdio/strtok_r.c          stdio/scanf.S \
   stdio/_Exit.c            stdio/_findfirst64i32.c   stdio/_findnext64i32.c \
-  stdio/_ftime.c       \
   stdio/_stat.c            stdio/_stat64i32.c        stdio/_wfindfirst64i32.c 
stdio/_wfindnext64i32.c \
   stdio/_wstat.c           stdio/_wstat64i32.c       stdio/asprintf.c \
   stdio/fopen64.c          stdio/fseeko32.c          stdio/fseeko64.c          
                         stdio/ftello.c          \
diff --git a/mingw-w64-crt/def-include/crt-aliases.def.in 
b/mingw-w64-crt/def-include/crt-aliases.def.in
index 7c7b197182f4..9e7b13b65131 100644
--- a/mingw-w64-crt/def-include/crt-aliases.def.in
+++ b/mingw-w64-crt/def-include/crt-aliases.def.in
@@ -72,7 +72,12 @@ ADD_UNDERSCORE(fstat)
 F32(fstat == _fstat32)
 F64(fstat == _fstat64i32)
 #endif
-; ADD_UNDERSCORE(ftime)
+#ifdef FIXED_SIZE_SYMBOLS
+ADD_UNDERSCORE(ftime)
+#else
+F32(ftime == _ftime32)
+F64(ftime == _ftime64)
+#endif
 #if defined(UCRTBASE)
 ; HUGE alias and _HUGE variable are provided by math/_huge.c
 #elif defined(CRTDLL)
diff --git a/mingw-w64-crt/stdio/_ftime.c b/mingw-w64-crt/stdio/_ftime.c
deleted file mode 100644
index 0600790f9f63..000000000000
--- a/mingw-w64-crt/stdio/_ftime.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#define __CRT__NO_INLINE
-#include <sys/stat.h>
-#include <sys/timeb.h>
-
-/* FIXME: Relying on _USE_32BIT_TIME_T, which is a user-macro,
-during CRT compilation is plainly broken.  Need an appropriate
-implementation to provide users the ability of compiling the
-CRT only with 32-bit time_t behavior. */
-#if defined(_USE_32BIT_TIME_T)
-void __cdecl ftime (struct timeb *b)
-{
-  return _ftime ((struct __timeb32 *)b);
-}
-#else
-void __cdecl ftime (struct timeb *b)
-{
-  _ftime64((struct __timeb64 *)b);
-}
-#endif
-- 
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