在 2025-12-29 01:35, Pali Rohár 写道:
---
  mingw-w64-crt/Makefile.am              |  1 +
  mingw-w64-crt/lib-common/msvcrt.def.in |  2 +-
  mingw-w64-crt/misc/_time32.c           | 24 ++++++++++++++++++++++++
  3 files changed, 26 insertions(+), 1 deletion(-)
  create mode 100644 mingw-w64-crt/misc/_time32.c

diff --git a/mingw-w64-crt/misc/_time32.c b/mingw-w64-crt/misc/_time32.c
new file mode 100644
index 000000000000..1855ee225780
--- /dev/null
+++ b/mingw-w64-crt/misc/_time32.c
@@ -0,0 +1,24 @@
+/**
+ * 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>
+#include <stdint.h>
+
+static __time32_t __cdecl emu__time32(__time32_t *timeptr)
+{
+    __time64_t time64 = _time64(NULL);
+    if (time64 > INT32_MAX)
+        time64 = -1;

And likewise, this should set errno to EOVERFLOW and return.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to