---
mingw-w64-crt/Makefile.am | 1 +
mingw-w64-crt/lib-common/msvcrt.def.in | 2 +-
mingw-w64-crt/misc/_utime32.c | 19 +++++++++++++++++++
3 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 mingw-w64-crt/misc/_utime32.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 52bc0d950c23..233500c0d5f3 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -680,6 +680,7 @@ src_msvcrt64=\
misc/_get_errno.c \
misc/_set_errno.c \
misc/_time32.c \
+ misc/_utime32.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 b13a218e4ccf..95bc4fa68f30 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++ b/mingw-w64-crt/lib-common/msvcrt.def.in
@@ -1683,7 +1683,7 @@ _ui64tow_s
_ultoa_s
_ultow_s
F_ARM_ANY(_umask_s) ; i386 and x64 _umask_s replaced by emu
-_utime32 F_I386(== _utime) ; i386 _utime32 replaced by alias
+F_NON_X64(_utime32 F_I386(== _utime)) ; i386 _utime32 replaced by alias and
x64 _utime32 replaced by emu
_vcprintf
_vcprintf_l
_vcprintf_p
diff --git a/mingw-w64-crt/misc/_utime32.c b/mingw-w64-crt/misc/_utime32.c
new file mode 100644
index 000000000000..947d5990e7d6
--- /dev/null
+++ b/mingw-w64-crt/misc/_utime32.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__utime32(const char *filename, struct __utimbuf32
*times)
+{
+ return _utime64(filename, times ? &(struct __utimbuf64){ .actime =
times->actime, .modtime = times->modtime } : NULL);
+}
+
+#define RETT int
+#define FUNC _utime32
+#define ARGS const char *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