From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120035 invoked by alias); 30 Apr 2019 17:40:35 -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 120026 invoked by uid 89); 30 Apr 2019 17:40:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-3.1 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (209.51.188.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 30 Apr 2019 17:40:33 +0000 Received: from fencepost.gnu.org ([2001:470:142:3::e]:51505) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hLWk2-0003jm-VL; Tue, 30 Apr 2019 13:40:31 -0400 Received: from [176.228.60.248] (port=4789 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hLWk2-0003Uh-1R; Tue, 30 Apr 2019 13:40:30 -0400 Date: Tue, 30 Apr 2019 17:40:00 -0000 Message-Id: <83r29jqtmi.fsf@gnu.org> From: Eli Zaretskii To: Pedro Alves CC: lrn1986@gmail.com, gdb-patches@sourceware.org In-reply-to: (message from Pedro Alves on Tue, 30 Apr 2019 18:26:19 +0100) Subject: Re: Fix compilation using mingw.org's MinGW 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> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00662.txt.bz2 > Cc: lrn1986@gmail.com, gdb-patches@sourceware.org > From: Pedro Alves > Date: Tue, 30 Apr 2019 18:26:19 +0100 > > 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. Yes. > > 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". No, I meant "after". The default value is set once you included at least on standard header. Hence you can at that place test for whether it is defined and what is its default value. Overriding that default is generally important only before including w32api headers, such as windows.h. > 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__) If you want me to add __CYGWIN__, I'm okay with that. > > 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. Sure, we agree. I didn't mean to contradict what you were saying, I wanted to back that up.