Re: Fix compilation using mingw.org's MinGW

Eli Zaretskii
2019-04-18T18:54:30Z

> Date: Thu, 18 Apr 2019 10:00:58 -0700
> From: Kevin Buettner <kevinb@redhat.com>
> Cc: gdb-patches@sourceware.org
>
> > +#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.)

The struct is with the leading underscore, the typedef isn't.

> 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...

It wasn't a typo, and there is no magic ;-)