From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58179 invoked by alias); 19 Apr 2019 11:33:43 -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 58166 invoked by uid 89); 19 Apr 2019 11:33:43 -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-f46.google.com Received: from mail-wr1-f46.google.com (HELO mail-wr1-f46.google.com) (209.85.221.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Apr 2019 11:33:41 +0000 Received: by mail-wr1-f46.google.com with SMTP id k17so6621760wrx.10 for ; Fri, 19 Apr 2019 04:33:41 -0700 (PDT) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:4c97:6d52:2cea:997b? ([2001:8a0:f913:f700:4c97:6d52:2cea:997b]) by smtp.gmail.com with ESMTPSA id e1sm6231379wrw.66.2019.04.19.04.33.38 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 04:33:39 -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> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <93ccb0fa-8a05-60ff-d1a8-85d5663b8d16@redhat.com> Date: Fri, 19 Apr 2019 11:33: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: <83d0lick7o.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-04/txt/msg00373.txt.bz2 On 4/19/19 12:23 PM, Eli Zaretskii wrote: >> Cc: gdb-patches@sourceware.org >> From: Pedro Alves >> Date: Fri, 19 Apr 2019 11:51:46 +0100 >> >> building at all either. The subject for the commit that added that NEWS entry >> sound like that was the intention: >> >> commit 742a7df5f4a149f0818aaccfc432c4c0c9a6e26d >> Author: Eli Zaretskii >> AuthorDate: Sat Mar 2 15:18:32 2019 +0200 >> >> GDB no longer supports Windows before XP. >> >> But surprisingly, I can't find the discussion behind this commit >> in the archives to see the context and what was decided. > > The discussion which led to that change is here: > > https://www.sourceware.org/ml/gdb-patches/2019-02/msg00574.html > So we're already assuming XP at build time in common code, in common/netstuff.c. >>>> So shouldn't we instead be setting _WIN32_WINNT to some >>>> appropriate number? >>> >>> I don't mind, but where? >> >> I'd do it in common/common-defs.h, before any #include, where we define >> other macros that must be defined before any include, like >> __STDC_LIMIT_MACROS, _FORTIFY_SOURCE, etc. >> >>> And also: should we make such changes on the >>> 8.3 branch at this time? >> >> Not sure. Off hand I'd think it's pretty safe, but maybe for 8.3 >> your patch is safer. > > I will try doing this in common-defs.h, but for the branch, we could > set _WIN32_WINNT only in windows-nat.c, as that's the only file that > currently cares, which should be safer. WDYT? Sounds good to me. Thanks, Pedro Alves