Re: _WIN32_WINNT redefined?
Eli Zaretskii via Gdb <[email protected]>
| Newsgroups | gmane.comp.gdb.devel |
|---|---|
| Message-ID | <[email protected]> |
> Date: Wed, 02 Nov 2022 17:20:50 +0000 > From: [email protected] > > On 2022-11-02 16:51, Eli Zaretskii wrote: > > > That's on your system, with your MinGW w32api headers. But that's not > > the only game in town. > > I'm sure there is no WINAPI implementation that does not define > _WIN32_WINNT. it's just impossible. > but in line 75 the condition is exactly for that impossible case. It is not impossible. I use mingw.org's MinGW, where the header which defines _WIN32_WINNT is included by every header file. So as soon as you #include anything, _WIN32_WINNT is already defined. Maybe it isn't so in the headers you are using, but that doesn't mean it is so for everyone. And I don't see how is that relevant: even if _WIN32_WINNT is undefined before that place, my suggestion is to change this: # else # define _WIN32_WINNT 0x0501 into something that defines _WIN32_WINNT to 0x0600 under the condition that the gthread patch is being used, and to 0x0501 otherwise. This should solve everyone's problem, right? > What I'm doing now is trying to tell you that it's illogical to check > the value of _WIN32_WINNT BEFORE the corresponding header file in which > this value was originally defined, has been included. See above: that is not necessarily what happens, not in all the cases anyway.