hyperrogue icon indicating copy to clipboard operation
hyperrogue copied to clipboard

Are mingw.thread.h etc actually needed?

Open Quuxplusone opened this issue 5 years ago • 2 comments

Commit b5d43fd480eabe6d4a9ccd38357a243cf26b841c added mingw.thread.h, mingw.mutex.h, and mingw.condition_variable.h. These files apparently exist to work around the lack of C++11 <thread>, <mutex>, and <condition_variable> on MinGW.

However, isn't it true that MinGW does provide C++11 <thread>, <mutex>, and <condition_variable> these days? If so, is commit b5d43fd480eabe6d4a9ccd38357a243cf26b841c unnecessary? Could that commit be reverted without losing anything?

Some StackOverflow discussion here seems to indicate that this was a problem circa 2013 but not a problem circa 2019.

(I spent some time today trying to get HyperRogue to build on TravisCI's windows platform, but it never worked. I kept running into "undefined reference to __gxx_personality_sj0" linker errors.)

Quuxplusone avatar Feb 22 '20 04:02 Quuxplusone

Well, it did not work on my MinGW compiler which I updated recently ("gcc version 8.2.0 (MinGW.org GCC-8.2.0-3)").

If I understand correctly, one of the answers on StackOverflow indicates that it should work if mingw32-pthreads-w32 is installed. But I guess the current solution works...

zenorogue avatar Feb 23 '20 16:02 zenorogue

In mingw-w64 they are not necessary. Changed sysconfig.h to use mingw.*.h files only if OLD_MINGW=1 is defined.

zenorogue avatar Mar 08 '20 11:03 zenorogue