Re: Fix compilation using mingw.org's MinGW

Kevin Buettner
2019-04-18T20:38:51Z

On Thu, 18 Apr 2019 21:54:05 +0300
Eli Zaretskii <eliz@gnu.org> wrote:

> > 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 ;-)

Apologies - I clearly wasn't awake enough when I looked at your patch.

So... no objections from me regarding this patch.

Kevin