---
mingw-w64-crt/Makefile.am | 1 +
mingw-w64-crt/lib-common/msvcrt.def.in | 2 +-
mingw-w64-crt/misc/_gmtime32.c | 18 ++++++++++++++++++
3 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 mingw-w64-crt/misc/_gmtime32.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 11f860fe21d9..031ad36e40a4 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -669,6 +669,7 @@ src_msvcrt64=\
misc/_get_current_locale.c \
misc/_get_doserrno.c \
misc/_get_fmode.c \
+ misc/_gmtime32.c \
misc/_initterm_e.c \
misc/_mkgmtime32.c \
misc/_set_doserrno.c \
diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in
b/mingw-w64-crt/lib-common/msvcrt.def.in
index f3a4612427b8..a0e6603f5b3e 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++ b/mingw-w64-crt/lib-common/msvcrt.def.in
@@ -1439,7 +1439,7 @@ F_X86_ANY(_get_winmajor)
F_X86_ANY(_get_winminor)
F_X86_ANY(_get_winver)
; F_X86_ANY(_get_wpgmptr) ; i386 and x64 _get_wpgmptr replaced by emu, arm32
and arm64 provided by emu
-_gmtime32 F_I386(== gmtime) ; i386 _gmtime32 replaced by alias
+F_NON_X64(_gmtime32 F_I386(== gmtime)) ; i386 _gmtime32 replaced by alias and
x64 _gmtime32 replaced by emu
F_ARM_ANY(_gmtime32_s) ; i386 and x64 _gmtime32_s replaced by emu
F_ARM_ANY(_gmtime64_s) ; i386 and x64 _gmtime64_s replaced by emu
_i64toa_s
diff --git a/mingw-w64-crt/misc/_gmtime32.c b/mingw-w64-crt/misc/_gmtime32.c
new file mode 100644
index 000000000000..4734189ac276
--- /dev/null
+++ b/mingw-w64-crt/misc/_gmtime32.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 struct tm *__cdecl emu__gmtime32(const __time32_t *timeptr)
+{
+ return _gmtime64(&(__time64_t){ *timeptr });
+}
+
+#define RETT struct tm *
+#define FUNC _gmtime32
+#define ARGS const __time32_t *timeptr
+#define CALL timeptr
+#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