From d36bf8095cfc0afcf2fa8098cd117878a2f63177 Mon Sep 17 00:00:00 2001 From: LIU Hao <[email protected]> Date: Sat, 19 Sep 2026 18:16:18 +0800 Subject: [PATCH 1/2] winpthreads: Ensure `*_INITIALIZER` expand to indivisible expressions
Signed-off-by: LIU Hao <[email protected]> --- mingw-w64-libraries/winpthreads/include/pthread.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)diff --git a/mingw-w64-libraries/winpthreads/include/pthread.h b/mingw-w64-libraries/winpthreads/include/pthread.h
index 1914e6dbb..b27dbfbca 100644 --- a/mingw-w64-libraries/winpthreads/include/pthread.h +++ b/mingw-w64-libraries/winpthreads/include/pthread.h @@ -248,9 +248,9 @@ typedef intptr_t pthread_mutex_t; #define PTHREAD_MUTEX_INITIALIZER PTHREAD_DEFAULT_MUTEX_INITIALIZER #define PTHREAD_DEFAULT_MUTEX_INITIALIZER PTHREAD_NORMAL_MUTEX_INITIALIZER -#define PTHREAD_NORMAL_MUTEX_INITIALIZER (pthread_mutex_t)-1 -#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER (pthread_mutex_t)-2 -#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER (pthread_mutex_t)-3 +#define PTHREAD_NORMAL_MUTEX_INITIALIZER ((pthread_mutex_t)-1) +#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER ((pthread_mutex_t)-2) +#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER ((pthread_mutex_t)-3) WINPTHREAD_API int pthread_mutex_init(pthread_mutex_t *, const pthread_mutexattr_t *); WINPTHREAD_API int pthread_mutex_destroy(pthread_mutex_t *); @@ -280,9 +280,9 @@ typedef intptr_t pthread_cond_t; typedef intptr_t pthread_rwlock_t; typedef void *pthread_barrier_t; -#define PTHREAD_COND_INITIALIZER (pthread_cond_t)-1 -#define PTHREAD_RWLOCK_INITIALIZER (pthread_rwlock_t)-1 -#define PTHREAD_SPINLOCK_INITIALIZER (pthread_spinlock_t)-1 +#define PTHREAD_COND_INITIALIZER ((pthread_cond_t)-1) +#define PTHREAD_RWLOCK_INITIALIZER ((pthread_rwlock_t)-1) +#define PTHREAD_SPINLOCK_INITIALIZER ((pthread_spinlock_t)-1) WINPTHREAD_API extern void (**_pthread_key_dest)(void *); WINPTHREAD_API int pthread_key_create(pthread_key_t *key, void (* dest)(void *)); -- 2.55.0
From d36bf8095cfc0afcf2fa8098cd117878a2f63177 Mon Sep 17 00:00:00 2001 From: LIU Hao <[email protected]> Date: Sat, 19 Sep 2026 18:16:18 +0800 Subject: [PATCH 1/2] winpthreads: Ensure `*_INITIALIZER` expand to indivisible expressions Signed-off-by: LIU Hao <[email protected]> --- mingw-w64-libraries/winpthreads/include/pthread.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/mingw-w64-libraries/winpthreads/include/pthread.h b/mingw-w64-libraries/winpthreads/include/pthread.h index 1914e6dbb..b27dbfbca 100644 --- a/mingw-w64-libraries/winpthreads/include/pthread.h +++ b/mingw-w64-libraries/winpthreads/include/pthread.h @@ -248,9 +248,9 @@ typedef intptr_t pthread_mutex_t; #define PTHREAD_MUTEX_INITIALIZER PTHREAD_DEFAULT_MUTEX_INITIALIZER #define PTHREAD_DEFAULT_MUTEX_INITIALIZER PTHREAD_NORMAL_MUTEX_INITIALIZER -#define PTHREAD_NORMAL_MUTEX_INITIALIZER (pthread_mutex_t)-1 -#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER (pthread_mutex_t)-2 -#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER (pthread_mutex_t)-3 +#define PTHREAD_NORMAL_MUTEX_INITIALIZER ((pthread_mutex_t)-1) +#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER ((pthread_mutex_t)-2) +#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER ((pthread_mutex_t)-3) WINPTHREAD_API int pthread_mutex_init(pthread_mutex_t *, const pthread_mutexattr_t *); WINPTHREAD_API int pthread_mutex_destroy(pthread_mutex_t *); @@ -280,9 +280,9 @@ typedef intptr_t pthread_cond_t; typedef intptr_t pthread_rwlock_t; typedef void *pthread_barrier_t; -#define PTHREAD_COND_INITIALIZER (pthread_cond_t)-1 -#define PTHREAD_RWLOCK_INITIALIZER (pthread_rwlock_t)-1 -#define PTHREAD_SPINLOCK_INITIALIZER (pthread_spinlock_t)-1 +#define PTHREAD_COND_INITIALIZER ((pthread_cond_t)-1) +#define PTHREAD_RWLOCK_INITIALIZER ((pthread_rwlock_t)-1) +#define PTHREAD_SPINLOCK_INITIALIZER ((pthread_spinlock_t)-1) WINPTHREAD_API extern void (**_pthread_key_dest)(void *); WINPTHREAD_API int pthread_key_create(pthread_key_t *key, void (* dest)(void *)); -- 2.55.0
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
