From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from eggs.gnu.org (eggs.gnu.org [IPv6:2001:470:142:3::10]) by sourceware.org (Postfix) with ESMTPS id 1D54B385840F for ; Sat, 21 May 2022 12:32:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1D54B385840F Received: from fencepost.gnu.org ([2001:470:142:3::e]:51484) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsOH2-00050m-HH; Sat, 21 May 2022 08:32:00 -0400 Received: from [87.69.77.57] (port=3804 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 1nsOH1-00052v-Or; Sat, 21 May 2022 08:32:00 -0400 Date: Sat, 21 May 2022 15:31:50 +0300 Message-Id: <83sfp383t5.fsf@gnu.org> From: Eli Zaretskii To: Jon Turney Cc: tromey@adacore.com, gdb-patches@sourceware.org In-Reply-To: (message from Jon Turney on Sat, 21 May 2022 12:18:45 +0100) Subject: Re: [PATCH 1/9] Fix possible Cygwin build problem References: <20220413191756.1146768-1-tromey@adacore.com> <20220413191756.1146768-2-tromey@adacore.com> X-Spam-Status: No, score=1.7 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 May 2022 12:32:03 -0000 > Date: Sat, 21 May 2022 12:18:45 +0100 > From: Jon Turney > > Otoh, I'm not sure if the !__USEWIDE case has much value anymore, unless > someone is still building gdb for Windows 9x... __USEWIDE in native Windows programming assumes the use of wchar_t for character and character strings, something that GDB sources aren't equipped for doing, at least not easily. AFAIK, Cygwin alleviates that by using UTF-8 encoded strings, but native Windows programming cannot (yet) do that safely enough on all supported Windows versions. As long as MinGW builds of GDB support only the so-called "ANSI" encoding (i.e. the current system codepage), there's no reason to use __USEWIDE in the MinGW build of GDB, and every reason not to use it.