Menu

#215 twapi does not compile with MinGW gcc 12.2

Unscheduled
closed
nobody
None
Bug
5
7 days ago
2023-05-04
No

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.

Discussion

  • Anonymous

    Anonymous - 2023-07-14

    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?

     
  • Anonymous

    Anonymous - 2023-07-14

    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 ...

     
  • Anonymous

    Anonymous - 2023-07-14

    I've added the autoconf bits (I think) but in a (currently) private repo on github

     
  • Ashok P. Nadkarni

    • status: open --> closed
     
  • Ashok P. Nadkarni

    Builds with gcc > 12 as of 5.0. Closing.

     

Anonymous
Anonymous

Add attachments
Cancel