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

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 233500c0d5f3..e68c1ecb8eac 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -681,6 +681,7 @@ src_msvcrt64=\
   misc/_set_errno.c \
   misc/_time32.c \
   misc/_utime32.c \
+  misc/_wctime32.c \
   misc/strnlen.c \
   misc/wassert.c \
   misc/wcsnlen.c \
diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in 
b/mingw-w64-crt/lib-common/msvcrt.def.in
index 95bc4fa68f30..1ecab76bdf41 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++ b/mingw-w64-crt/lib-common/msvcrt.def.in
@@ -1761,7 +1761,7 @@ _wcsupr_l
 _wcsupr_s
 _wcsupr_s_l
 _wcsxfrm_l
-_wctime32 F_I386(== _wctime) ; i386 _wctime32 replaced by alias
+F_NON_X64(_wctime32 F_I386(== _wctime)) ; i386 _wctime32 replaced by alias and 
x64 _wctime32 replaced by emu
 F_ARM_ANY(_wctime32_s) ; i386 and x64 _wctime32_s replaced by emu
 F_ARM_ANY(_wctime64_s) ; i386 and x64 _wctime64_s replaced by emu
 _wctomb_l
diff --git a/mingw-w64-crt/misc/_wctime32.c b/mingw-w64-crt/misc/_wctime32.c
new file mode 100644
index 000000000000..dc42894bcc70
--- /dev/null
+++ b/mingw-w64-crt/misc/_wctime32.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 wchar_t *__cdecl emu__wctime32(const __time32_t *timeptr)
+{
+    return _wctime64(&(__time64_t){ *timeptr });
+}
+
+#define RETT wchar_t *
+#define FUNC _wctime32
+#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

Reply via email to