timeb.h: declare _ftime32 function, define _ftime according to _USE_32BIT_TIME_T
Signed-off-by: Mateusz Brzostek <mateuszb@poczta.onet.pl>
Signed-off-by: Liu Hao <lh_mouse@126.com>
diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in b/mingw-w64-crt/lib-common/msvcrt.def.in
index 1a1db2b..1311541 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++ b/mingw-w64-crt/lib-common/msvcrt.def.in
@@ -532,7 +532,8 @@
_fstati64
F64(_fstat64i32 == _fstat)
_ftime
-F_ARM_ANY(_ftime32)
+F_I386(_ftime32 == _ftime)
+F_NON_I386(_ftime32)
_ftime32_s
_ftime64
_ftime64_s
diff --git a/mingw-w64-headers/crt/sec_api/sys/timeb_s.h b/mingw-w64-headers/crt/sec_api/sys/timeb_s.h
index f635d32..ed92946 100644
--- a/mingw-w64-headers/crt/sec_api/sys/timeb_s.h
+++ b/mingw-w64-headers/crt/sec_api/sys/timeb_s.h
@@ -15,11 +15,13 @@
#if defined(MINGW_HAS_SECURE_API)
- _CRTIMP errno_t __cdecl _ftime_s(struct __timeb32 *_Time);
+ _CRTIMP errno_t __cdecl _ftime32_s(struct __timeb32 *_Time);
_CRTIMP errno_t __cdecl _ftime64_s(struct __timeb64 *_Time);
#ifndef _USE_32BIT_TIME_T
#define _ftime_s _ftime64_s
+#else
+#define _ftime_s _ftime32_s
#endif
#endif
diff --git a/mingw-w64-headers/crt/sys/timeb.h b/mingw-w64-headers/crt/sys/timeb.h
index c92c8e0..7bfe98e 100644
--- a/mingw-w64-headers/crt/sys/timeb.h
+++ b/mingw-w64-headers/crt/sys/timeb.h
@@ -76,13 +76,14 @@
#endif
_CRTIMP void __cdecl _ftime64(struct __timeb64 *_Time);
+ _CRTIMP void __cdecl _ftime32(struct __timeb32 *_Time);
-#ifdef _WIN64
+#ifndef _USE_32BIT_TIME_T
#define _timeb __timeb64
- _CRTIMP void __cdecl _ftime(struct __timeb64 *);
+#define _ftime _ftime64
#else
#define _timeb __timeb32
- _CRTIMP void __cdecl _ftime(struct __timeb32 *);
+#define _ftime _ftime32
#endif
#ifndef _TIMESPEC_DEFINED
@@ -109,7 +110,7 @@
}
#else
__CRT_INLINE void __cdecl ftime(struct timeb *_Tmb) {
- _ftime((struct __timeb32 *)_Tmb);
+ _ftime32((struct __timeb32 *)_Tmb);
}
#endif /* _USE_32BIT_TIME_T */
#endif /* !__CRT__NO_INLINE */