---
mingw-w64-crt/Makefile.am | 1 +
mingw-w64-crt/lib-common/msvcrt.def.in | 2 +-
mingw-w64-crt/misc/_futime32.c | 19 +++++++++++++++++++
3 files changed, 21 insertions(+), 1 deletion(-)
create mode 100644 mingw-w64-crt/misc/_futime32.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 5eca279eab4d..11f860fe21d9 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -665,6 +665,7 @@ src_msvcrt64=\
misc/_difftime32.c \
misc/_free_locale.c \
misc/_ftime32.c \
+ misc/_futime32.c \
misc/_get_current_locale.c \
misc/_get_doserrno.c \
misc/_get_fmode.c \
diff --git a/mingw-w64-crt/lib-common/msvcrt.def.in
b/mingw-w64-crt/lib-common/msvcrt.def.in
index 6ace3b56223a..f3a4612427b8 100644
--- a/mingw-w64-crt/lib-common/msvcrt.def.in
+++ b/mingw-w64-crt/lib-common/msvcrt.def.in
@@ -1417,7 +1417,7 @@ F_I386(_ftol2)
F_I386(_ftol2_sse)
F_I386(_ftol2_sse_excpt)
_fullpath_dbg
-_futime32 F_I386(== _futime) ; i386 _futime32 replaced by alias
+F_NON_X64(_futime32 F_I386(== _futime)) ; i386 _futime32 replaced by alias and
x64 _futime32 replaced by emu
_fwprintf_l
_fwprintf_p
_fwprintf_p_l
diff --git a/mingw-w64-crt/misc/_futime32.c b/mingw-w64-crt/misc/_futime32.c
new file mode 100644
index 000000000000..9f961d8b29d9
--- /dev/null
+++ b/mingw-w64-crt/misc/_futime32.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__futime32(int fd, struct __utimbuf32 *times)
+{
+ return _futime64(fd, times ? &(struct __utimbuf64){ .actime =
times->actime, .modtime = times->modtime } : NULL);
+}
+
+#define RETT int
+#define FUNC _futime32
+#define ARGS int fd, struct __utimbuf32 *times
+#define CALL fd, 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