---
mingw-w64-crt/Makefile.am | 1 +
mingw-w64-crt/lib-common/msvcrt.def.in | 2 +-
mingw-w64-crt/misc/_ctime32.c | 18 ++++++++++++++++++
3 files changed, 20 insertions(+), 1 deletion(-)
create mode 100644 mingw-w64-crt/misc/_ctime32.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index ff032f953493..0d5bbe0c7c97 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -661,6 +661,7 @@ src_msvcrt64=\
misc/__timezone.c \
misc/__tzname.c \
misc/_create_locale.c \
+ misc/_ctime32.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 a4343bb765e0..5b2f7c4b646e 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++ b/mingw-w64-crt/lib-common/msvcrt.def.in
@@ -1383,7 +1383,7 @@ _crtDbgFlag
_cscanf_l
_cscanf_s
_cscanf_s_l
-_ctime32 F_I386(== ctime) ; i386 _ctime32 replaced by alias
+F_NON_X64(_ctime32 F_I386(== ctime)) ; i386 _ctime32 replaced by alias and x64
_ctime32 replaced by emu
F_ARM_ANY(_ctime32_s) ; i386 and x64 _ctime32_s replaced by emu
F_ARM_ANY(_ctime64_s) ; i386 and x64 _ctime64_s replaced by emu
_cwprintf_l
diff --git a/mingw-w64-crt/misc/_ctime32.c b/mingw-w64-crt/misc/_ctime32.c
new file mode 100644
index 000000000000..b668d4eddee3
--- /dev/null
+++ b/mingw-w64-crt/misc/_ctime32.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 char *__cdecl emu__ctime32(const __time32_t *timeptr)
+{
+ return _ctime64(&(__time64_t){ *timeptr });
+}
+
+#define RETT char *
+#define FUNC _ctime32
+#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