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.
This commit is contained in:
Jon Turney 2022-11-02 13:16:16 +00:00
parent 90f902daf5
commit a83c64f567
No known key found for this signature in database
GPG Key ID: C7C86F0370285C81
2 changed files with 3 additions and 3 deletions

View File

@ -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. */

View File

@ -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