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 02d04eac Date: Sun, 13 Nov 2022 15:14:08 +0000 (GMT) [thread overview] Message-ID: <20221113151408.309093858289@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a83c64f567ec7f161b8efb87205d44a2fbbf36f8 commit a83c64f567ec7f161b8efb87205d44a2fbbf36f8 Author: Jon Turney <jon.turney@dronecode.org.uk> Date: Wed Nov 2 13:16:16 2022 +0000 Fix Cygwin build after 02d04eac Commit 02d04eac "Use strwinerror in gdb/windows-nat.c" also moves strwinerror() under the USE_WIN32API conditional, which is not defined for Cygwin (and looks like it shouldn't be, as appears to imply non-POSIX and MiNGW and WinSock...) Also enable the declaration and definition of strwinerror() when __CYGWIN__ is defined. Diff: --- gdbsupport/errors.cc | 4 ++-- gdbsupport/errors.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdbsupport/errors.cc b/gdbsupport/errors.cc index 7464df3d067..93fc70ad296 100644 --- a/gdbsupport/errors.cc +++ b/gdbsupport/errors.cc @@ -19,7 +19,7 @@ #include "common-defs.h" #include "errors.h" -#ifdef USE_WIN32API +#if defined (USE_WIN32API) || defined(__CYGWIN__) #include <windows.h> #endif /* USE_WIN32API */ @@ -71,7 +71,7 @@ internal_warning_loc (const char *file, int line, const char *fmt, ...) va_end (ap); } -#ifdef USE_WIN32API +#if defined (USE_WIN32API) || defined(__CYGWIN__) /* See errors.h. */ diff --git a/gdbsupport/errors.h b/gdbsupport/errors.h index 5a925789893..d67d692e4cb 100644 --- a/gdbsupport/errors.h +++ b/gdbsupport/errors.h @@ -99,7 +99,7 @@ extern void malloc_failure (long size) ATTRIBUTE_NORETURN; extern void flush_streams (); -#ifdef USE_WIN32API +#if defined(USE_WIN32API) || defined(__CYGWIN__) /* Map the Windows error number in ERROR to a locale-dependent error message string and return a pointer to it. Typically, the values
reply other threads:[~2022-11-13 15:14 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=20221113151408.309093858289@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).