public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: i.nixman@autistici.org
Cc: gdb@sourceware.org
Subject: Re: _WIN32_WINNT redefined?
Date: Wed, 02 Nov 2022 20:13:58 +0200	[thread overview]
Message-ID: <838rkt9qc9.fsf@gnu.org> (raw)
In-Reply-To: <0a2bab35dcbc1df695371814c7802ec6@autistici.org> (i.nixman@autistici.org)

> Date: Wed, 02 Nov 2022 17:20:50 +0000
> From: i.nixman@autistici.org
> 
> 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.

  reply	other threads:[~2022-11-02 18:14 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02  8:14 i.nixman
2022-11-02  8:21 ` i.nixman
2022-11-02  8:44   ` i.nixman
2022-11-02  9:46     ` i.nixman
2022-11-02 10:15       ` i.nixman
2022-11-02 12:59         ` Eli Zaretskii
2022-11-02 13:10           ` Jeffrey Walton
2022-11-02 13:26             ` Eli Zaretskii
2022-11-02 12:50       ` Eli Zaretskii
2022-11-02 14:13         ` i.nixman
2022-11-02 15:18           ` Eli Zaretskii
2022-11-02 15:51             ` i.nixman
2022-11-02 16:02               ` i.nixman
2022-11-02 16:51               ` Eli Zaretskii
2022-11-02 17:20                 ` i.nixman
2022-11-02 18:13                   ` Eli Zaretskii [this message]
2022-11-02 12:55     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=838rkt9qc9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb@sourceware.org \
    --cc=i.nixman@autistici.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).