Re: Fix compilation using mingw.org's MinGW

Pedro Alves
2019-04-30T12:56:57Z

On 4/28/19 3:33 PM, Eli Zaretskii wrote:
>> Cc: gdb-patches@sourceware.org
>> From: Pedro Alves <palves@redhat.com>
>> Date: Fri, 19 Apr 2019 12:33:37 +0100
>>
>>> I will try doing this in common-defs.h, but for the branch, we could
>>> set _WIN32_WINNT only in windows-nat.c, as that's the only file that
>>> currently cares, which should be safer. WDYT?
>>
>> Sounds good to me.
>
> Below please find 2 patches: the first one for the 8.3 branch, the
> second one for master. OK to commit (after writing ChangeLog
> entries)?

Sure, LGTM.

A few remarks:

- The override in _WIN32_WINNT is no longer necessary. It could
be removed at the same time.

- IIRC, Cygwin uses the same w32api headers as mingw.org. I don't know
whether Cygwin sets _WIN32_WINNT to a higher number already; we
haven't heard any complaints, so I guess it does.

- We could remove the dynamic loading of GetConsoleFontSize & friends
now, right? (for a separate patch/rainy day, not in this patch.)

Thanks,
Pedro Alves