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__.
#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
#undef STARTUPINFO
#undef CreateProcess
-#undef GetModuleFileNameEx
#ifndef __CYGWIN__
# define __PMAX (MAX_PATH + 1)
-# define GetModuleFileNameEx GetModuleFileNameExA
# define STARTUPINFO STARTUPINFOA
# define CreateProcess CreateProcessA
#else
static CORE_ADDR cygwin_load_end;
# define __USEWIDE
typedef wchar_t cygwin_buf_t;
-# define GetModuleFileNameEx GetModuleFileNameExW
# define STARTUPINFO STARTUPINFOW
# define CreateProcess CreateProcessW
#endif