From: Eli Zaretskii Date: Fri, 3 May 2019 07:40:02 +0000 (+0300) Subject: Fix compilation with mingw.org's MinGW. X-Git-Tag: gdb-8.3-release~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bc694fdc3ccfb7bac93b5480dff908076c7d7893;p=thirdparty%2Fbinutils-gdb.git 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. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e5dac9bab98..eb56ca0fb60 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 a59c04ea23d..3add8e63f96 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