From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=autistici.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=autistici.org 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1667404265; bh=8lNd0uHpYuFJGQOxcE7N2zXJ1bVl4Fz1JQGfjlDbnWM=; h=Date:From:To:Subject:In-Reply-To:References:From; b=Lu0ST6h7mBSDG78kUNZ3rNC8SNIEgDTrWAa0BvdVoWzuSb2+BUMGeLxGNZLF2+Ej+ pfbSkdfVx4/bhDunM84LF59OV7WZEQvyLCbPfIvYHhl+QpZZc49l8gdZ404v+qeP7i 2nCrwCnitxYZxYCX+iy59rg0KOH35FVEBO5I2byg= 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 From: i.nixman@autistici.org 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-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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!