[PATCH] Fix build issues with mingw toolchain

Tom Tromey tromey@adacore.com
Mon May 13 13:48:35 GMT 2024


>>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:

Eli> Once again, that change was not supposed to lower the value of
Eli> _WIN32_WINNT, only to raise it if by default it is lower than 0x0501.
Eli> If that's not what happens nowadays, I think we need to understand
Eli> why, and fix it so it doesn't lower the value.

The code is:

#if defined (__MINGW32__) || defined (__CYGWIN__)
# ifdef _WIN32_WINNT
#  if _WIN32_WINNT < 0x0602
#   undef _WIN32_WINNT
#   define _WIN32_WINNT 0x0602
#  endif
# else
#  define _WIN32_WINNT 0x0602
# endif
#endif	/* __MINGW32__ || __CYGWIN__ */


Probably at this point _WIN32_WINNT is not set and so it takes the else
branch.  I didn't really check this though.

However, I thought the point of this code was to set up a compilation
environment that was "XP-like" -- that is, require all later-than-XP
APIs to be discovered dynamically.

Tom


More information about the Gdb-patches mailing list