diff options
-rw-r--r-- | gdb/nat/windows-nat.c | 9 | ||||
-rw-r--r-- | 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 71a18a0..f681801 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 11f5430..6c6dea8 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 |