Function _get_daylight() is available in msvcr80+ and UCRT.
---
mingw-w64-crt/Makefile.am | 2 ++
mingw-w64-crt/misc/_get_daylight.c | 20 ++++++++++++++++++++
2 files changed, 22 insertions(+)
create mode 100644 mingw-w64-crt/misc/_get_daylight.c
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 435b2b436599..92dd4e03503c 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -332,6 +332,7 @@ src_msvcrt=\
misc/_aligned_offset_recalloc.c \
misc/_aligned_recalloc.c \
misc/_configthreadlocale.c \
+ misc/_get_daylight.c \
misc/_recalloc.c \
misc/_set_purecall_handler.c \
misc/imaxdiv.c \
@@ -877,6 +878,7 @@ src_pre_msvcr80=\
misc/_aligned_offset_recalloc.c \
misc/_aligned_recalloc.c \
misc/_configthreadlocale.c \
+ misc/_get_daylight.c \
misc/_get_errno.c \
misc/_initterm_e.c \
misc/_recalloc.c \
diff --git a/mingw-w64-crt/misc/_get_daylight.c
b/mingw-w64-crt/misc/_get_daylight.c
new file mode 100644
index 000000000000..4db7b278e063
--- /dev/null
+++ b/mingw-w64-crt/misc/_get_daylight.c
@@ -0,0 +1,20 @@
+/**
+ * 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 <errno.h>
+
+errno_t __cdecl _get_daylight(int *value)
+{
+ if (!value)
+ {
+ errno = EINVAL;
+ return EINVAL;
+ }
+
+ *value = _daylight;
+ return 0;
+}
+errno_t (__cdecl *__MINGW_IMP_SYMBOL(_get_daylight))(int *) = _get_daylight;
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public