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 18:51:17 +0200	[thread overview]
Message-ID: <83fsf19u62.fsf@gnu.org> (raw)
In-Reply-To: <821f45f4fe87dc1dcea23520dd8e42ab@autistici.org> (i.nixman@autistici.org)

> Date: Wed, 02 Nov 2022 15:51:05 +0000
> From: i.nixman@autistici.org
> 
> On 2022-11-02 15:18, Eli Zaretskii wrote:
> 
> > Then the stuff in common-defs.h should be augmented to define
> > _WIN32_WINNT to the value 0x0600 or greater, if it isn't already high
> > enough, but only if the patch for gthreads is being used.  How exactly
> > to write the cpp conditional for that, I don't know, but hopefully you
> > will be able to figure that out.
> 
> no.
> just for eyes:
> 74 #if defined (__MINGW32__) || defined (__CYGWIN__)
> 75 # ifdef _WIN32_WINNT
> 76 #  if _WIN32_WINNT < 0x0501
> 77 #   undef _WIN32_WINNT
> 78 #   define _WIN32_WINNT 0x0501
> 79 #  endif
> 80 # else
> 81 #  define _WIN32_WINNT 0x0501
> 82 # endif
> 83 #endif  /* __MINGW32__ || __CYGWIN__ */
> 
> the condition on line 75 is always false, because none of the inclusions 
> above include neither `windows.h` nor `winver.h`.

That's on your system, with your MinGW w32api headers.  But that's not
the only game in town.

> it can be solved by inclusion `windows.h` after line 74.
> but I did it and faced with another error:

That's not what I suggested.  I suggested that you augment the above
cpp conditionals such that when the gthread patch is in use,
_WIN32_WINNT is defined to 0x0600, and otherwise to 0x0501, as before.

The question is: what could be a preprocessor conditional to determine
whether the gthread patch is used, so that it could be used to augment
the above.  This is something I cannot answer, but I hope you can.

  parent reply	other threads:[~2022-11-02 16:51 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 [this message]
2022-11-02 17:20                 ` i.nixman
2022-11-02 18:13                   ` Eli Zaretskii
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=83fsf19u62.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).