Re: Problem building today's snapshot with MinGW

Eli Zaretskii
2020-09-12T17:36:10Z

> Date: Sat, 12 Sep 2020 09:33:46 -0700
> From: Joel Brobecker <brobecker@adacore.com>
> Cc: gdb-patches@sourceware.org
>
> From what I understood of the analysis, gnulib is doing something
> pretty questionable (forcing _WIN32_WINNT to the wrong value) in
> order to get FILE_ID_INFO being defined; and looking at your patch
> and the explanation you gave in the report to gnulib, you found
> that the APIs in question are only needed if _GL_WINDOWS_STAT_INODES
> and so fixed this by only enabling the redefined based on
> this variable. So for me, this is more of a workaround than an actual
> fix.

It's indeed a workaround, because I actually believe the code is
wrong, and the entire part that redefines _WIN32_WINNT should be
dropped, as the rest of the code is well equipped to handle any
reasonable value of _WIN32_WINNT.

I used the workaround because I'm still not 100% sure I'm not missing
something, which could explain why the Gnulib folks have this code
there. It is also the reason why I didn't post the patch to the
Gnulib list, but instead asked them why that part of the code was at
all necessary.