twapi does not compile with MinGW gcc 12.2
Brought to you by:
apnadkarni
MinGW gcc version 12.2.0 now has SYSTEM_POWER_STATUS.SystemStatusFlag defined instead of Reserved1, so in file twapi/base/tclobjs.c
Line 2163:
#if _MSC_VER >= 1900
should be changed to:
#if _MSC_VER >= 1900 || __GNUC__ >= 12
I assume, that the change has been introduced with version 12.0, so checking the gcc main version should suffice.
Anonymous
Paul, my gcc --version shows 12.2.0 but does not have SystemStatusFlag. Do you happen to know if the Windows headers are updated separately from gcc in mingw?
Never mind, answer is yes, it's a separate package. So this requires detection via configure whether the headers include the definition. If I can figure out the magic ...
I've added the autoconf bits (I think) but in a (currently) private repo on github
Builds with gcc > 12 as of 5.0. Closing.