From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 104906 invoked by alias); 30 Apr 2019 17:26:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 104898 invoked by uid 89); 30 Apr 2019 17:26:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: mail-wr1-f48.google.com Received: from mail-wr1-f48.google.com (HELO mail-wr1-f48.google.com) (209.85.221.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 Apr 2019 17:26:23 +0000 Received: by mail-wr1-f48.google.com with SMTP id v16so19546020wrp.1 for ; Tue, 30 Apr 2019 10:26:23 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:56ee:75ff:fe8d:232b? ([2001:8a0:f913:f700:56ee:75ff:fe8d:232b]) by smtp.gmail.com with ESMTPSA id q11sm12200436wrw.66.2019.04.30.10.26.20 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Tue, 30 Apr 2019 10:26:20 -0700 (PDT) Subject: Re: Fix compilation using mingw.org's MinGW To: Eli Zaretskii References: <835zrbe36c.fsf@gnu.org> <250801eb-14f6-5a35-0556-cf5797dd8a7b@redhat.com> <83y347cfbu.fsf@gnu.org> <556cefd7-47ce-54ab-a228-2c727aab4179@redhat.com> <83d0lick7o.fsf@gnu.org> <93ccb0fa-8a05-60ff-d1a8-85d5663b8d16@redhat.com> <831s1murm2.fsf@gnu.org> <365578d2-82fb-8860-26e6-1b31a63632ed@gmail.com> <83imuvsefv.fsf@gnu.org> <014135c5-5bb8-d451-ec7a-6d765b1ea5f5@redhat.com> <83v9yvquoz.fsf@gnu.org> Cc: lrn1986@gmail.com, gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Tue, 30 Apr 2019 17:26:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 In-Reply-To: <83v9yvquoz.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-04/txt/msg00661.txt.bz2 On 4/30/19 6:17 PM, Eli Zaretskii wrote: >> Cc: gdb-patches@sourceware.org >> From: Pedro Alves >> Date: Tue, 30 Apr 2019 18:03:57 +0100 >> >> The issue is where is that default set? > > On some internal header file (it differs between various flavors of > MinGW). Right, which is what I said. > But no matter where it is set, it must be defined after _any_ > standard header is included, so in practice I think it's defined at > the place where the patch tests for it. I think you mean "before". But I did not say that this was the wrong place (since I was the one that suggested the place). Only that pedantically the new code could/should be tweaked like this: - #ifdef __MINGW32__ + #if defined (__MINGW32__) || defined (__CYGWIN__) # ifdef _WIN32_WINNT # if _WIN32_WINNT < 0x0501 # undef _WIN32_WINNT # define _WIN32_WINNT 0x0501 # endif # else # define _WIN32_WINNT 0x0501 # endif #endif /* __MINGW32__ */ > > In any case, the only platform which really needs this is mingw.org's > MinGW, where I actually tested this assumption. The other two, > MinGW64 and Cygwin, don't support older platforms (they actually don't > support XP anymore, only Vista and onward), so their default values > are higher than 0x0501 anyway. > Right, like I said. Thanks, Pedro Alves