Attached patch fixes the definitions of _daylight/_dstbias/_timezone/_tzname
for msvcr*.dll.
These are global variables and exported as DATA symbols, so we should use
__MINGW_IMP_SYMBOL.
From 7c414985d86ae49ba9d7a856201b8f1db103330e Mon Sep 17 00:00:00 2001
From: Yuta Nakai <[email protected]>
Date: Tue, 21 Nov 2017 22:07:25 +0900
Subject: [PATCH] Fix definitions of _daylight/_dstbias/_timezone/_tzname for
msvcr*.dll
---
mingw-w64-headers/crt/time.h | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/mingw-w64-headers/crt/time.h b/mingw-w64-headers/crt/time.h
index 886ec940..aaae20c2 100644
--- a/mingw-w64-headers/crt/time.h
+++ b/mingw-w64-headers/crt/time.h
@@ -119,10 +119,14 @@ extern "C" {
#define _timezone (* __timezone())
#define _tzname (__tzname())
#else
- __MINGW_IMPORT int _daylight;
- __MINGW_IMPORT long _dstbias;
- __MINGW_IMPORT long _timezone;
- __MINGW_IMPORT char * _tzname[2];
+ __MINGW_IMPORT int * __MINGW_IMP_SYMBOL(_daylight);
+ __MINGW_IMPORT long * __MINGW_IMP_SYMBOL(_dstbias);
+ __MINGW_IMPORT long * __MINGW_IMP_SYMBOL(_timezone);
+ __MINGW_IMPORT char * (* __MINGW_IMP_SYMBOL(_tzname))[2];
+#define _daylight (* __MINGW_IMP_SYMBOL(_daylight))
+#define _dstbias (* __MINGW_IMP_SYMBOL(_dstbias))
+#define _timezone (* __MINGW_IMP_SYMBOL(_timezone))
+#define _tzname (* __MINGW_IMP_SYMBOL(_tzname))
#endif
_CRTIMP errno_t __cdecl _get_daylight(int *_Daylight);
--
2.15.0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public