From bc694fdc3ccfb7bac93b5480dff908076c7d7893 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 3 May 2019 10:40:02 +0300 Subject: [PATCH] Fix compilation with mingw.org's MinGW. That flavor of MinGW assumes Windows 9X as the default target, which doesn't expose CONSOLE_FONT_INFO stuff in Windows header files. Since we no longer support running on Windows older than XP anyway, requiring it at build time makes sense. gdb/ChangeLog 2019-05-03 Eli Zaretskii * windows-nat.c [_WIN32_WINNT]: Define _WIN32_WINNT to Windows XP level, so that various Windows header files expose the necessary declarations and definitions. --- gdb/ChangeLog | 4 ++++ gdb/windows-nat.c | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e5dac9b..eb56ca0 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,9 @@ 2019-05-03 Eli Zaretskii + * windows-nat.c [_WIN32_WINNT]: Define _WIN32_WINNT to Windows XP + level, so that various Windows header files expose the necessary + declarations and definitions. + * symfile.c (find_separate_debug_file): Remove colon from the drive spec of DOS/Windows file names of the target, so that the file name produced from DEBUGDIR and the target's directory will diff --git a/gdb/windows-nat.c b/gdb/windows-nat.c index a59c04e..3add8e6 100644 --- a/gdb/windows-nat.c +++ b/gdb/windows-nat.c @@ -34,6 +34,15 @@ #include #include #include +/* We need at least the level of XP for CONSOLE_FONT_INFO. */ +#ifdef _WIN32_WINNT +# if _WIN32_WINNT < 0x0501 +# undef _WIN32_WINNT +# define _WIN32_WINNT 0x0501 +# endif +#else +# define _WIN32_WINNT 0x0501 +#endif #include #include #include -- 2.7.4