From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id MNDCLSygYmP1PhMAWB0awg (envelope-from ) for ; Wed, 02 Nov 2022 12:51:56 -0400 Received: by simark.ca (Postfix, from userid 112) id B948E1E124; Wed, 2 Nov 2022 12:51:56 -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=qFoZaokN; 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=-5.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (server2.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 6D8691E11E for ; Wed, 2 Nov 2022 12:51:56 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0469E385AC3B for ; Wed, 2 Nov 2022 16:51:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0469E385AC3B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667407915; bh=LSEKu9BVfAioVvYEzKav1x7fM8w8ZL3oDOFiT3LwISc=; 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=qFoZaokNwXq+eE1mwQQ+8ZCR+lVTNNbr5ceUpLhZEJJn/oLYruEvDtP/RRM9CsSAE x7+MdHc40KqVNiy8tiRBi15W/PrjYvtQRPJ7IONt+AF81nTFI80A9Ugf3Q55+LkGQn 2Lcjdj03ma5MFW5YVxZqK4QNUaT/C0jKeZo1TzYk= Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 330513858C56 for ; Wed, 2 Nov 2022 16:51:28 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 330513858C56 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 1oqGxb-0006dk-1q; Wed, 02 Nov 2022 12:51:27 -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 1oqGxa-0005rh-Gp; Wed, 02 Nov 2022 12:51:26 -0400 Date: Wed, 02 Nov 2022 18:51:17 +0200 Message-Id: <83fsf19u62.fsf@gnu.org> To: i.nixman@autistici.org In-Reply-To: <821f45f4fe87dc1dcea23520dd8e42ab@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> 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 15:51:05 +0000 > From: i.nixman@autistici.org > > On 2022-11-02 15:18, Eli Zaretskii wrote: > > > Then the stuff in common-defs.h should be augmented to define > > _WIN32_WINNT to the value 0x0600 or greater, if it isn't already high > > enough, but only if the patch for gthreads is being used. How exactly > > to write the cpp conditional for that, I don't know, but hopefully you > > will be able to figure that out. > > no. > just for eyes: > 74 #if defined (__MINGW32__) || defined (__CYGWIN__) > 75 # ifdef _WIN32_WINNT > 76 # if _WIN32_WINNT < 0x0501 > 77 # undef _WIN32_WINNT > 78 # define _WIN32_WINNT 0x0501 > 79 # endif > 80 # else > 81 # define _WIN32_WINNT 0x0501 > 82 # endif > 83 #endif /* __MINGW32__ || __CYGWIN__ */ > > the condition on line 75 is always false, because none of the inclusions > above include neither `windows.h` nor `winver.h`. That's on your system, with your MinGW w32api headers. But that's not the only game in town. > it can be solved by inclusion `windows.h` after line 74. > but I did it and faced with another error: That's not what I suggested. I suggested that you augment the above cpp conditionals such that when the gthread patch is in use, _WIN32_WINNT is defined to 0x0600, and otherwise to 0x0501, as before. The question is: what could be a preprocessor conditional to determine whether the gthread patch is used, so that it could be used to augment the above. This is something I cannot answer, but I hope you can.