The unpac monorepo manager self-hosting as a monorepo using unpac
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Support MinGW-w64 11.0 winpthreads library (#12231)

MinGW-w64 release 11.0 introduced a `WINPTHREADS_USE_DLLIMPORT` macro to
explicitly ask for the `dllimport` attribute to be set on all symbols.
`DLL_EXPORT` has that same effect on previous versions of MinGW-w64, they
can be both enabled to support all versions.

Commit introducing the `WINPTHREADS_USE_DLLIMPORT` macro:
https://sourceforge.net/p/mingw-w64/mingw-w64/ci/489520900fb6853c8be97e9d0214f39a77c846d9/

Co-authored-by: David Allsopp <david.allsopp@metastack.com>

authored by

shym
David Allsopp
and committed by
GitHub
a2633251 b8431d76

+10 -1
+4
Changes
··· 191 191 performance regression. (Nick Barnes, review by François Bobot, 192 192 Alain Frisch and Damien Doligez). 193 193 194 + - #12231: Support MinGW-w64 11.0 winpthreads library, where the macro 195 + to set up to get flexdll working changed 196 + (David Allsopp and Samuel Hym, light review by Xavier Leroy) 197 + 194 198 ### Type system: 195 199 196 200 - #6941, #11187: prohibit using classes through recursive modules
+6 -1
otherlibs/systhreads/st_stubs.c
··· 17 17 18 18 #if defined(_WIN32) && !defined(NATIVE_CODE) 19 19 /* Ensure that pthread.h marks symbols __declspec(dllimport) so that they can be 20 - picked up from the runtime (which will have linked winpthreads statically) */ 20 + picked up from the runtime (which will have linked winpthreads statically). 21 + mingw-w64 11.0.0 introduced WINPTHREADS_USE_DLLIMPORT to do this explicitly; 22 + prior versions co-opted this on the internal DLL_EXPORT, but this is ignored 23 + in 11.0 and later unless IN_WINPTHREAD is also defined, so we can safely 24 + define both to support both versions. */ 25 + #define WINPTHREADS_USE_DLLIMPORT 21 26 #define DLL_EXPORT 22 27 #endif 23 28