Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <palves@redhat.com>
To: Eli Zaretskii <eliz@gnu.org>, LRN <lrn1986@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: Fix compilation using mingw.org's MinGW
Date: Tue, 30 Apr 2019 17:04:00 -0000	[thread overview]
Message-ID: <014135c5-5bb8-d451-ec7a-6d765b1ea5f5@redhat.com> (raw)
In-Reply-To: <83imuvsefv.fsf@gnu.org>

On 4/30/19 4:25 PM, Eli Zaretskii wrote:
>> From: LRN <lrn1986@gmail.com>
>> Date: Tue, 30 Apr 2019 16:05:55 +0300
>>
>>>  - IIRC, Cygwin uses the same w32api headers as mingw.org.  I don't know
>>>    whether Cygwin sets _WIN32_WINNT to a higher number already; we
>>>    haven't heard any complaints, so I guess it does.
>>>
>>
>> Cygwin uses mingw-w64.
> 
> Maybe I'm missing something, but I don't think this is relevant.
> _WIN32_WINNT is not a MinGW invention, it's an official symbol in
> Windows headers, so all Windows compilers need to support it in the
> same way and with the same semantics.  The only difference is the
> default value.
> 
> Am I missing something?
> 

The issue is where is that default set?

On my Fedora mingw-w64 cross, it is not set by default by the
compiler:

 $ x86_64-w64-mingw32-gcc -x c /dev/null -dM -E | grep _WIN32_WINNT
 $ (empty)

It seems to be set instead in the headers, in include/sdkddkver.h.

I guess that if Cygwin indeed uses mingw-w64 headers nowadays, it won't
need the fix as long as the headers default to a higher version than
gdb requires.  Pedantically, I think we should tweak
the "#ifdef __MINGW32__" to consider Cygwin too, since the Cygwin ports
also pulls in w32api headers, but if it doesn't matter in practice, and
it's not convenient to test, then we can simply forget about it until
a time when someone notices something odd.

Thanks,
Pedro Alves


  reply	other threads:[~2019-04-30 17:04 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18 15:36 Eli Zaretskii
2019-04-18 17:01 ` Kevin Buettner
2019-04-18 18:54   ` Eli Zaretskii
2019-04-18 20:38     ` Kevin Buettner
2019-04-19  6:19       ` Eli Zaretskii
2019-04-18 17:20 ` Pedro Alves
2019-04-18 17:22   ` Pedro Alves
2019-04-18 18:57     ` Eli Zaretskii
2019-04-19 10:51       ` Pedro Alves
2019-04-19 11:23         ` Eli Zaretskii
2019-04-19 11:33           ` Pedro Alves
2019-04-28 14:33             ` Eli Zaretskii
2019-04-30 12:56               ` Pedro Alves
2019-04-30 13:06                 ` LRN
2019-04-30 15:25                   ` Eli Zaretskii
2019-04-30 17:04                     ` Pedro Alves [this message]
2019-04-30 17:17                       ` Eli Zaretskii
2019-04-30 17:26                         ` Pedro Alves
2019-04-30 17:40                           ` Eli Zaretskii
2019-04-30 17:58                             ` Pedro Alves
     [not found]                               ` <83o94nqr4g.fsf@gnu.org>
2019-04-30 18:38                                 ` Pedro Alves
2019-04-30 17:50                     ` LRN
2019-04-30 13:10                 ` Pedro Alves
2019-04-30 15:23                   ` Eli Zaretskii
2019-04-30 16:31                     ` Pedro Alves
2019-05-03  8:04                       ` Eli Zaretskii
2019-05-03  8:26                 ` 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=014135c5-5bb8-d451-ec7a-6d765b1ea5f5@redhat.com \
    --to=palves@redhat.com \
    --cc=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=lrn1986@gmail.com \
    /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