From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id RJ9pMI6zYmPARRMAWB0awg (envelope-from ) for ; Wed, 02 Nov 2022 14:14:38 -0400 Received: by simark.ca (Postfix, from userid 112) id B7C881E124; Wed, 2 Nov 2022 14:14:38 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=TD166bIX; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RDNS_DYNAMIC,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6E7051E11E for ; Wed, 2 Nov 2022 14:14:38 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2D9BE3856DC2 for ; Wed, 2 Nov 2022 18:14:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2D9BE3856DC2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667412877; bh=qwC8+LKMXFQw9Vlxv6CYyaX3c+5QvojYfUqAZ2vcN4Y=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=TD166bIX5RxcP64UR/nC/4DF4PkZfZzSUBg1SPFMV7scENFILoSsAWhHyEeSLPkS9 Qnxe1/ptemx9dgwlg2bo6Pr4UlDd7KZ6aGCmU9+Aicg7QeslfIBA/If1wBSU+f0bG+ HJlMrKEsI+1bIAB3uOtsKmQFE7NwqkELverYAhdM= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id E01843858404 for ; Wed, 2 Nov 2022 18:14:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E01843858404 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqIFd-0004nT-6l; Wed, 02 Nov 2022 14:14:09 -0400 Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqIFc-00015o-LJ; Wed, 02 Nov 2022 14:14:08 -0400 Date: Wed, 02 Nov 2022 20:13:58 +0200 Message-Id: <838rkt9qc9.fsf@gnu.org> To: i.nixman@autistici.org In-Reply-To: <0a2bab35dcbc1df695371814c7802ec6@autistici.org> (i.nixman@autistici.org) Subject: Re: _WIN32_WINNT redefined? References: <6485dbfe07e21a1c451b17d3fda5b3d9@autistici.org> <41193fbdb742b1c2d4d7b4ab06561822@autistici.org> <8335b1bjv2.fsf@gnu.org> <83h6zh9ygb.fsf@gnu.org> <821f45f4fe87dc1dcea23520dd8e42ab@autistici.org> <83fsf19u62.fsf@gnu.org> <0a2bab35dcbc1df695371814c7802ec6@autistici.org> X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Eli Zaretskii via Gdb Reply-To: Eli Zaretskii Cc: gdb@sourceware.org Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" > Date: Wed, 02 Nov 2022 17:20:50 +0000 > From: i.nixman@autistici.org > > On 2022-11-02 16:51, Eli Zaretskii wrote: > > > That's on your system, with your MinGW w32api headers. But that's not > > the only game in town. > > I'm sure there is no WINAPI implementation that does not define > _WIN32_WINNT. it's just impossible. > but in line 75 the condition is exactly for that impossible case. It is not impossible. I use mingw.org's MinGW, where the header which defines _WIN32_WINNT is included by every header file. So as soon as you #include anything, _WIN32_WINNT is already defined. Maybe it isn't so in the headers you are using, but that doesn't mean it is so for everyone. And I don't see how is that relevant: even if _WIN32_WINNT is undefined before that place, my suggestion is to change this: # else # define _WIN32_WINNT 0x0501 into something that defines _WIN32_WINNT to 0x0600 under the condition that the gthread patch is being used, and to 0x0501 otherwise. This should solve everyone's problem, right? > What I'm doing now is trying to tell you that it's illogical to check > the value of _WIN32_WINNT BEFORE the corresponding header file in which > this value was originally defined, has been included. See above: that is not necessarily what happens, not in all the cases anyway.