Re: [Mingw-w64-public] [PATCH] crt: Check whether the linker provides __CTOR_LIST__, don't check for __clang__

2018-08-29 Thread Martell Malone
LGTM. Thanks for this. When I originally used ifdef __clang__ we knew it was a hack because we should be checking the linker and not the compiler but at the time clang didn’t work well as a drop in replacement for gcc so it was used to specify one toolchain combination or another. Glad to see wh

Re: [Mingw-w64-public] Error with evntrace.h

2018-08-29 Thread Ruslan Garipov
The struct `WNODE_HEADER` and the enumeration `WMIDPREQUESTCODE` are defined in ``wmistr.h'' file. File ``evntrace.h'' includes ``wmistr.h'' one using the following define-guard: mingw-w64: ``` #ifndef _EVNTRACE_KERNEL_MODE #include #endif ``` Microsoft Windows 10.0.17134 SDK: ``` #if !de

[Mingw-w64-public] [PATCH] crt: Check whether the linker provides __CTOR_LIST__, don't check for __clang__

2018-08-29 Thread Martin Storsjö
Using the __clang__ ifdef isn't right; one could be using clang for compiling the mingw-w64 crt for use with binutils ld, which requires a slightly different setup of __CTOR_LIST__. Also, to ease interoperability between binutils ld and lld, lld could potentially start providing the __CTOR_LIST__

Re: [Mingw-w64-public] #define daylight causes conflicts

2018-08-29 Thread Martin Storsjö
Hi, > On Aug 29, 2018, at 12:02, Jacek Caban wrote: > > On 29/08/2018 09:59, Martin Storsjö wrote: >>> On Aug 29, 2018, at 10:15, Jacek Caban wrote: >>> >>> On 29/08/2018 08:20, Martin Storsjö wrote: >>> > On Aug 29, 2018, at 05:27, Liu Hao wrote: > > 在 2018/8/29 4:36, Tom Ritte

Re: [Mingw-w64-public] #define daylight causes conflicts

2018-08-29 Thread Jacek Caban
Hi Martin, On 29/08/2018 09:59, Martin Storsjö wrote: On Aug 29, 2018, at 10:15, Jacek Caban wrote: On 29/08/2018 08:20, Martin Storsjö wrote: On Aug 29, 2018, at 05:27, Liu Hao wrote: 在 2018/8/29 4:36, Tom Ritter 写道: I hit this issue compiling ICU as part of Firefox, where they had a va

[Mingw-w64-public] [PATCH 2/2] ucrt: Don't define daylight as a macro in the header

2018-08-29 Thread Martin Storsjö
Instead expose a fake __imp_daylight in ucrtbase_compat.c which initially has the same value as (*__daylight()) from ucrtbase.dll, and after calling _tzset, redirect __imp_daylight to the ucrtbase.dll provided value. Signed-off-by: Martin Storsjö --- mingw-w64-crt/crt/ucrtbase_compat.c | 3 +++

[Mingw-w64-public] [PATCH 1/2] ucrt: Improve handling of timezone and tzname

2018-08-29 Thread Martin Storsjö
Redirect __imp_timezone to the ucrt one, after _tzset is called. This keeps the returned value in sync even if a different module calls _tzset again. Also initialize the local values to the same ones as msvcrt.dll/ucrtbase.dll exposes before _tzset has been called. Signed-off-by: Martin Storsjö

Re: [Mingw-w64-public] #define daylight causes conflicts

2018-08-29 Thread Martin Storsjö
> On Aug 29, 2018, at 10:15, Jacek Caban wrote: > > On 29/08/2018 08:20, Martin Storsjö wrote: > >>> On Aug 29, 2018, at 05:27, Liu Hao wrote: >>> >>> 在 2018/8/29 4:36, Tom Ritter 写道: I hit this issue compiling ICU as part of Firefox, where they had a variable named 'daylight'.

[Mingw-w64-public] Error with evntrace.h

2018-08-29 Thread Biswapriyo Nath
When I include `evntrace.h` gcc shows these errors: ``` In file included from TraceEvent.h:10:0, from main.h:4, from main.c:1: e:\mingw64\x86_64-w64-mingw32\include\evntrace.h:513:3: error: unknown type name 'WNODE_HEADER' WNODE_HEADER Wnode; ^ e:\mingw64\x8

Re: [Mingw-w64-public] #define daylight causes conflicts

2018-08-29 Thread Jacek Caban
On 29/08/2018 08:20, Martin Storsjö wrote: On Aug 29, 2018, at 05:27, Liu Hao wrote: 在 2018/8/29 4:36, Tom Ritter 写道: I hit this issue compiling ICU as part of Firefox, where they had a variable named 'daylight'. https://unicode-org.atlassian.net/browse/ICU-20100 was filed to change the vari