---
 mingw-w64-crt/Makefile.am              |  1 +
 mingw-w64-crt/lib-common/msvcrt.def.in |  2 +-
 mingw-w64-crt/misc/_difftime32.c       | 18 ++++++++++++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)
 create mode 100644 mingw-w64-crt/misc/_difftime32.c

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 0d5bbe0c7c97..402ada8c10f3 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -662,6 +662,7 @@ src_msvcrt64=\
   misc/__tzname.c \
   misc/_create_locale.c \
   misc/_ctime32.c \
+  misc/_difftime32.c \
   misc/_free_locale.c \
   misc/_get_current_locale.c \
   misc/_get_doserrno.c \
diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in 
b/mingw-w64-crt/lib-common/msvcrt.def.in
index 5b2f7c4b646e..986912d0aa12 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++ b/mingw-w64-crt/lib-common/msvcrt.def.in
@@ -1394,7 +1394,7 @@ F_ARM_ANY(_cwprintf_s_l) ; i386 and x64 _cwprintf_s_l 
replaced by emu
 _cwscanf_l
 _cwscanf_s
 _cwscanf_s_l
-_difftime32 F_I386(== difftime) ; i386 _difftime32 replaced by alias
+F_NON_X64(_difftime32 F_I386(== difftime)) ; i386 _difftime32 replaced by 
alias and x86 _difftime32 replaced by emu
 F_NON_I386(_difftime64 F_X64(== difftime)) ; i386 _difftime64 replaced by emu 
and x64 _difftime64 replaced by alias
 _ecvt_s
 F_I386(_except_handler4_common)
diff --git a/mingw-w64-crt/misc/_difftime32.c b/mingw-w64-crt/misc/_difftime32.c
new file mode 100644
index 000000000000..b20bd39798e9
--- /dev/null
+++ b/mingw-w64-crt/misc/_difftime32.c
@@ -0,0 +1,18 @@
+/**
+ * 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 <time.h>
+
+static double __cdecl emu__difftime32(__time32_t _Time1, __time32_t _Time2)
+{
+    return (double)(_Time1 - _Time2);
+}
+
+#define RETT double
+#define FUNC _difftime32
+#define ARGS __time32_t _Time1, __time32_t _Time2
+#define CALL _Time1, _Time2
+#include "msvcrt_or_emu_glue.h"
-- 
2.20.1



_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to