public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Jon TURNEY <jturney@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Fix Cygwin build after fcab5839 Date: Thu, 2 Jun 2022 09:40:36 +0000 (GMT) [thread overview] Message-ID: <20220602094036.2C51F395A07F@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=c9c157c7650a7570123869445e7dd331ecdd3317 commit c9c157c7650a7570123869445e7dd331ecdd3317 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Fri May 20 14:35:57 2022 +0100 Fix Cygwin build after fcab5839 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__. Diff: --- 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 <sys/cygwin.h> #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
reply other threads:[~2022-06-02 9:40 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220602094036.2C51F395A07F@sourceware.org \ --to=jturney@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).