From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id ZMbvBFKSYmMdOhMAWB0awg (envelope-from ) for ; Wed, 02 Nov 2022 11:52:50 -0400 Received: by simark.ca (Postfix, from userid 112) id 054AC1E124; Wed, 2 Nov 2022 11:52:50 -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=HyYHIK+Q; 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 A0BE51E0D3 for ; Wed, 2 Nov 2022 11:52:49 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C4BC2385AC36 for ; Wed, 2 Nov 2022 15:52:48 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C4BC2385AC36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667404368; bh=8lNd0uHpYuFJGQOxcE7N2zXJ1bVl4Fz1JQGfjlDbnWM=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=HyYHIK+Qc6FrBY2vrs/yGWB4LdIMOjhiWtfW4+h3/VEPpkxtIXWjDkxD8mo3Rt09o UwFqM4GXQnfvQCGNwrL8/uWEPEjYYxAirpCQARa+TJu7naBIBrS2RCgJ64VW2lpXw0 k40beRCW3PYAHRkG9BBhrfsfj5X3eI9tmOPTTLtQ= Received: from confino.investici.org (confino.investici.org [93.190.126.19]) by sourceware.org (Postfix) with ESMTPS id ACF24385841F for ; Wed, 2 Nov 2022 15:51:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org ACF24385841F Received: from 1.mail-backend.investici.org (unknown [10.0.0.11]) by confino.investici.org (Postfix) with ESMTP id 4N2WZd2MfKz113J; Wed, 2 Nov 2022 15:51:05 +0000 (UTC) Received: from 1.webmail.investici.org (localhost [127.0.0.1]) (Authenticated sender: i.nixman@autistici.org) by 1.mail-backend.investici.org (Postfix) with ESMTPA id 4N2WZd0vG7z5tCB; Wed, 2 Nov 2022 15:51:05 +0000 (UTC) MIME-Version: 1.0 Date: Wed, 02 Nov 2022 15:51:05 +0000 To: Eli Zaretskii , gdb@sourceware.org Subject: Re: _WIN32_WINNT redefined? In-Reply-To: <83h6zh9ygb.fsf@gnu.org> References: <6485dbfe07e21a1c451b17d3fda5b3d9@autistici.org> <41193fbdb742b1c2d4d7b4ab06561822@autistici.org> <8335b1bjv2.fsf@gnu.org> <83h6zh9ygb.fsf@gnu.org> User-Agent: Roundcube Webmail Message-ID: <821f45f4fe87dc1dcea23520dd8e42ab@autistici.org> X-Sender: i.nixman@autistici.org Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit 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: niXman via Gdb Reply-To: i.nixman@autistici.org Errors-To: gdb-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb" 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`. it can be solved by inclusion `windows.h` after line 74. but I did it and faced with another error: ``` CXX gdb.o CXX ada-exp.o ada-exp.c.tmp:557: warning: "IN" redefined In file included from C:/msys64/home/Sysuser/mingw-gcc-trunk/x86_64-trunk-win32-seh-rt_v10-rev0/mingw64/x86_64-w64-mingw32/include/windef.h:9, from C:/msys64/home/Sysuser/mingw-gcc-trunk/x86_64-trunk-win32-seh-rt_v10-rev0/mingw64/x86_64-w64-mingw32/include/windows.h:69, from ../../../../src/gdb-11.2/gdb/../gdbsupport/common-defs.h:75, from ../../../../src/gdb-11.2/gdb/defs.h:28, from ada-exp.y:38: C:/msys64/home/Sysuser/mingw-gcc-trunk/x86_64-trunk-win32-seh-rt_v10-rev0/mingw64/x86_64-w64-mingw32/include/minwindef.h:57: note: this is the location of the previous definition 57 | #define IN | ada-exp.c.tmp:482:11: error: 'INT' redeclared as different kind of entity In file included from C:/msys64/home/Sysuser/mingw-gcc-trunk/x86_64-trunk-win32-seh-rt_v10-rev0/mingw64/x86_64-w64-mingw32/include/minwindef.h:163: C:/msys64/home/Sysuser/mingw-gcc-trunk/x86_64-trunk-win32-seh-rt_v10-rev0/mingw64/x86_64-w64-mingw32/include/winnt.h:299:15: note: previous declaration 'typedef int INT' 299 | typedef int INT; | ^~~ ada-exp.c.tmp:485:13: error: 'FLOAT' redeclared as different kind of entity C:/msys64/home/Sysuser/mingw-gcc-trunk/x86_64-trunk-win32-seh-rt_v10-rev0/mingw64/x86_64-w64-mingw32/include/minwindef.h:142:17: note: previous declaration 'typedef float FLOAT' 142 | typedef float FLOAT; | ^~~~~ ``` in that case I couldn't figure out why the `ada-exp.c.tmp` file is mentioned in the error message but I don't see anything that looks like an error in the `ada-exp.c` file. I think `ada-exp.c.tmp` is some kind of generated file... I don't know what and how should I fix in that case %) > Or maybe you should do that in gdbsupport/thread-pool.cc instead. > Whatever is easier. I will think on it... > One thing is certain: GDB builds on Windows that don't use the gthread > patch should not be broken by increasing the minimum value of > _WIN32_WINNT with which GDB can be built on Windows. I understand. I have another option. will try and report back. best!