---
mingw-w64-crt/Makefile.am | 1 +
mingw-w64-crt/lib-common/msvcrt.def.in | 2 +-
mingw-w64-crt/misc/_wutime32.c | 19 +++++++++++++++++++
3 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 mingw-w64-crt/misc/_wutime32.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index e68c1ecb8eac..4be499e43d33 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -682,6 +682,7 @@ src_msvcrt64=\
misc/_time32.c \
misc/_utime32.c \
misc/_wctime32.c \
+ misc/_wutime32.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 1ecab76bdf41..335c7a704b6e 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++ b/mingw-w64-crt/lib-common/msvcrt.def.in
@@ -1792,7 +1792,7 @@ _wtof_l
_wtoi64_l
_wtoi_l
_wtol_l
-_wutime32 F_I386(== _wutime) ; i386 _wutime32 replaced by alias
+F_NON_X64(_wutime32 F_I386(== _wutime)) ; i386 _wutime32 replaced by alias and
x64 _wutime32 replaced by emu
F_ARM_ANY(asctime_s) ; i386 and x64 asctime_s replaced by emu
bsearch_s
; btowc replaced by emu for consistency with wctob
diff --git a/mingw-w64-crt/misc/_wutime32.c b/mingw-w64-crt/misc/_wutime32.c
new file mode 100644
index 000000000000..f73ec9c5cbfa
--- /dev/null
+++ b/mingw-w64-crt/misc/_wutime32.c
@@ -0,0 +1,19 @@
+/**
+ * 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 <utime.h>
+#include <stddef.h>
+
+static int __cdecl emu__wutime32(const wchar_t *filename, struct __utimbuf32
*times)
+{
+ return _wutime64(filename, times ? &(struct __utimbuf64){ .actime =
times->actime, .modtime = times->modtime } : NULL);
+}
+
+#define RETT int
+#define FUNC _wutime32
+#define ARGS const wchar_t *filename, struct __utimbuf32 *times
+#define CALL filename, times
+#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