From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14753 invoked by alias); 19 Apr 2019 10:51:52 -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 14742 invoked by uid 89); 19 Apr 2019 10:51:52 -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=boxes, surprisingly X-HELO: mail-wr1-f41.google.com Received: from mail-wr1-f41.google.com (HELO mail-wr1-f41.google.com) (209.85.221.41) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Apr 2019 10:51:50 +0000 Received: by mail-wr1-f41.google.com with SMTP id w10so6531277wrm.4 for ; Fri, 19 Apr 2019 03:51:50 -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 y17sm3054859wma.8.2019.04.19.03.51.47 (version=TLS1_3 cipher=AEAD-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 03:51:47 -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> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <556cefd7-47ce-54ab-a228-2c727aab4179@redhat.com> Date: Fri, 19 Apr 2019 10:51: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: <83y347cfbu.fsf@gnu.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-04/txt/msg00370.txt.bz2 On 4/18/19 7:56 PM, Eli Zaretskii wrote: >> From: Pedro Alves >> Date: Thu, 18 Apr 2019 18:22:14 +0100 >> >> * Removed targets >> >> GDB no longer supports native debugging on versions of MS-Windows >> before Windows XP. > > I was talking about compile time, not run time. Not sure it makes any practical difference. From the text above, you could claim that we wanted to support hosting GDB on older versions of Windows, but not support native debugging, say, so you could still remote debug from such older Windows boxes. But was that the intention? I'd say keep it simple -- if we don't support native debugging, then we don't support 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. > > In any case, if we don't support systems older than XP, then why do we > load those functions dynamically at run time and call them via a > function pointer? Because that code is older than the decision to stop supporting older Windows versions, surely? : ChangeLog-2010: * windows-nat.c (GetConsoleFontSize, GetCurrentConsoleFont): ChangeLog-2010: (bad_GetCurrentConsoleFont, bad_GetConsoleFontSize): New functions. ChangeLog-2010: GetCurrentConsoleFont. ChangeLog-2015: (GetCurrentConsoleFont_ftype, GetModuleInformation_ftype) > >> 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. Thanks, Pedro Alves