From 4d47405c9b85950bf36100969c22526393f8dc38 Mon Sep 17 00:00:00 2001 From: Ken Brown Date: Wed, 26 Jun 2024 15:57:39 -0400 Subject: [PATCH] Avoid compiler warnings in the Cygwin-w32 build * src/w32fns.c [DEFAULT_IMAGE_BASE]: Don't define on Cygwin. * src/cygw32.h (w32_get_resource): Add prototype. (Bug#71786) (cherry picked from commit fb15affde8cb27ad358ad7070d150238cec11f99) --- src/cygw32.h | 1 + src/w32fns.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/cygw32.h b/src/cygw32.h index cc3414a39d9..2f265cab4ad 100644 --- a/src/cygw32.h +++ b/src/cygw32.h @@ -35,5 +35,6 @@ along with GNU Emacs. If not, see . */ extern void syms_of_cygw32 (void); extern char * w32_strerror (int error_no); +extern LPBYTE w32_get_resource (const char * key, const char * name, LPDWORD type); #endif /* CYGW32_H */ diff --git a/src/w32fns.c b/src/w32fns.c index b784a9a563d..4c2f18abd08 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -11284,7 +11284,7 @@ typedef USHORT (WINAPI * CaptureStackBackTrace_proc) (ULONG, ULONG, PVOID *, configure.ac. */ #if defined MINGW_W64 && EMACS_INT_MAX > LONG_MAX # define DEFAULT_IMAGE_BASE (ptrdiff_t)0x400000000 -#else /* 32-bit MinGW build */ +#elif !defined CYGWIN /* 32-bit MinGW build */ # define DEFAULT_IMAGE_BASE (ptrdiff_t)0x01000000 #endif -- 2.39.2