From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sa-prd-fep-045.btinternet.com (mailomta31-sa.btinternet.com [213.120.69.37]) by sourceware.org (Postfix) with ESMTPS id 51CF738376F3 for ; Sat, 21 May 2022 11:11:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 51CF738376F3 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dronecode.org.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=dronecode.org.uk Received: from sa-prd-rgout-004.btmx-prd.synchronoss.net ([10.2.38.7]) by sa-prd-fep-045.btinternet.com with ESMTP id <20220521111117.YIJE16833.sa-prd-fep-045.btinternet.com@sa-prd-rgout-004.btmx-prd.synchronoss.net>; Sat, 21 May 2022 12:11:17 +0100 Authentication-Results: btinternet.com; none X-SNCR-Rigid: 613943C62524E658 X-Originating-IP: [86.139.167.41] X-OWM-Source-IP: 86.139.167.41 (GB) X-OWM-Env-Sender: jonturney@btinternet.com X-VadeSecure-score: verdict=clean score=0/300, class=clean X-RazorGate-Vade: gggruggvucftvghtrhhoucdtuddrgedvfedrieeigdeftdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemuceutffkvffkuffjvffgnffgvefqofdpqfgfvfenuceurghilhhouhhtmecufedtudenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeflohhnucfvuhhrnhgvhicuoehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkqeenucggtffrrghtthgvrhhnpeeliedtjefhtdevkeehueegffegveeftdejjeevfefhiefffeektddvteehheeijeenucfkphepkeeirddufeelrdduieejrdegudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehlohgtrghlhhhoshhtrdhlohgtrghlughomhgrihhnpdhinhgvthepkeeirddufeelrdduieejrdeguddpmhgrihhlfhhrohhmpehjohhnrdhtuhhrnhgvhiesughrohhnvggtohguvgdrohhrghdruhhkpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepghgusgdqphgrthgthhgvshesshhouhhrtggvfigrrhgvrdhorhhgpdhrtghpthhtohepjhhonhdrthhurhhnvgihsegurhhonhgvtghouggvrdhorhhgrdhukh X-RazorGate-Vade-Verdict: clean 0 X-RazorGate-Vade-Classification: clean Received: from localhost.localdomain (86.139.167.41) by sa-prd-rgout-004.btmx-prd.synchronoss.net (5.8.716.04) (authenticated as jonturney@btinternet.com) id 613943C62524E658; Sat, 21 May 2022 12:11:17 +0100 From: Jon Turney To: gdb-patches@sourceware.org Cc: Jon Turney Subject: [PATCH 1/4] Fix Cygwin build after fcab5839 Date: Sat, 21 May 2022 12:10:54 +0100 Message-Id: <20220521111057.13089-2-jon.turney@dronecode.org.uk> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220521111057.13089-1-jon.turney@dronecode.org.uk> References: <20220521111057.13089-1-jon.turney@dronecode.org.uk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1198.6 required=5.0 tests=BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 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 11:11:19 -0000 Fix Cygwin build after fcab5839 ("Implement pid_to_exec_file for Windows in gdbserver"). That change moves code from gdb/windows-nat.c to gdb/nat/windows-nat.c, but doesn't add the required typedefs and includes for parts of that code under ifdef __CYGWIN__. --- gdb/nat/windows-nat.c | 9 ++++++++- gdb/windows-nat.c | 3 --- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/gdb/nat/windows-nat.c b/gdb/nat/windows-nat.c index 71a18a0efa9..f6818015c53 100644 --- a/gdb/nat/windows-nat.c +++ b/gdb/nat/windows-nat.c @@ -21,8 +21,15 @@ #include "gdbsupport/common-debug.h" #include "target/target.h" -#ifdef __CYGWIN__ +#undef GetModuleFileNameEx + +#ifndef __CYGWIN__ +#define GetModuleFileNameEx GetModuleFileNameExA +#else +#include #define __USEWIDE +typedef wchar_t cygwin_buf_t; +#define GetModuleFileNameEx GetModuleFileNameExW #endif namespace windows_nat diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index 11f54302b11..6c6dea84bfa 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -79,11 +79,9 @@ static windows_process_info windows_process; #undef STARTUPINFO #undef CreateProcess -#undef GetModuleFileNameEx #ifndef __CYGWIN__ # define __PMAX (MAX_PATH + 1) -# define GetModuleFileNameEx GetModuleFileNameExA # define STARTUPINFO STARTUPINFOA # define CreateProcess CreateProcessA #else @@ -93,7 +91,6 @@ static windows_process_info windows_process; static CORE_ADDR cygwin_load_end; # define __USEWIDE typedef wchar_t cygwin_buf_t; -# define GetModuleFileNameEx GetModuleFileNameExW # define STARTUPINFO STARTUPINFOW # define CreateProcess CreateProcessW #endif -- 2.36.1