Re: Fix compilation using mingw.org's MinGW

Kevin Buettner
2019-04-18T17:01:03Z

On Thu, 18 Apr 2019 18:36:11 +0300
Eli Zaretskii <eliz@gnu.org> wrote:

> --- gdb/windows-nat.c~0 2019-03-27 00:52:05.000000000 +0200
> +++ gdb/windows-nat.c 2019-04-18 11:37:02.061945600 +0300
> @@ -81,6 +81,16 @@
> #define GetConsoleFontSize dyn_GetConsoleFontSize
> #define GetCurrentConsoleFont dyn_GetCurrentConsoleFont
>
> +#if _WIN32_WINNT < 0x0501
> +
> +typedef
> +struct _CONSOLE_FONT_INFO
> +{ DWORD nFont;
> + COORD dwFontSize;
> +} CONSOLE_FONT_INFO, *PCONSOLE_FONT_INFO;
> +
> +#endif
> +
> typedef BOOL WINAPI (AdjustTokenPrivileges_ftype) (HANDLE, BOOL,
> PTOKEN_PRIVILEGES,
> DWORD, PTOKEN_PRIVILEGES,

I had expected to see a typedef for struct CONSOLE_FONT_INFO, but
instead see one for _CONSOLE_FONT_INFO (where the difference is
the leading underscore.)

I'm guessing that there's some magic in Windows specific header files
which makes this work, but I just want to check to make sure that this
wasn't a typo on your part...

Kevin