在 2025-02-20 01:38, Kirill Makurin 写道:
From: Kirill Makurin <maiddais...@outlook.com> Sent: Thursday, February 20, 2025 2:33 AM To: mingw-w64-public <mingw-w64-public@lists.sourceforge.net> Subject: winpthreads: a few more header file cleanupsPatch 1: remove old, commented out typedef for `pthread_t`. Patch 2: move `SIG_BLOCK`, `SIG_UNBLOCK` and `SIG_SETMASK` from pthread.h to pthread_signal.h. Also include pthread_signal.h from pthread.h when compiling with MSVC. Please note that pthread_signal.h is also included from mingw-w64's signal.h. Patch 3: remove macro `USE_SEM_CriticalSection_SpinCount` from semaphore.h. I do not know what was the use of this macro before, but it is not referenced anywhere in the source files. pthread.h seems to expose some internal functions, I could look more into it when I get time.
These patches look good to me. I have pushed them now. Thanks.
I also took a look at `tests_pthread` subdirectory. All tests seem to be simple return-code based tests which can be integrated with Automake's `TESTS`. However, some of them do not compile with recent GCC because some warnings are errors now by default. Also, some tests do not compile with MSVC as they use `pthread_t` as if it was an old struct removed in patch 1. I don't know if anyone uses these tests the way the are now, so I think integrating them with Automake could be useful.
Those are likely from pthreads-win32. If we are not willing to modify their code, I suspect it can still be compiled with `-std=gnu98` or `-fpermissive`.
MSVC is probably out of luck. I don't use it very often. -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public