From 57c35143cf256d6770687aa55af760bcbe40b883 Mon Sep 17 00:00:00 2001 From: Sebastiano Tronto Date: Sun, 1 Mar 2026 17:29:29 +0000 Subject: Better ifdefs yet --- src/utils/wrapthread.h | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'src/utils/wrapthread.h') diff --git a/src/utils/wrapthread.h b/src/utils/wrapthread.h index e14a473..4ac72a6 100644 --- a/src/utils/wrapthread.h +++ b/src/utils/wrapthread.h @@ -1,19 +1,18 @@ #if THREADS == 1 - #define WRAPTHREADS_NOTHREADS 1 + #define WRAPTHREAD_NOTHREADS 1 #elif defined(__unix__) - #define WRAPTHREADS_PTHREADS 1 -#elif !defined(__STDC_NO_THREADS__) - #define WRAPTHREADS_C11THREADS 1 + #define WRAPTHREAD_PTHREADS 1 #elif defined(__has_include) #if __has_include() - #define WRAPTHREADS_PTHREADS 1 + #define WRAPTHREAD_PTHREADS 1 #elif __has_include() - #define WRAPTHREADS_C11THREADS 1 + #define WRAPTHREAD_C11THREADS 1 #endif +#else + #define WRAPTHREAD_NOTHREADS 1 #endif -#if WRAPTHREADS_PTHREADS - +#if WRAPTHREAD_PTHREADS #include #define wrapthread_atomic _Atomic @@ -34,8 +33,7 @@ #define wrapthread_mutex_lock(a) pthread_mutex_lock(a) #define wrapthread_mutex_unlock(a) pthread_mutex_unlock(a) -#elif WRAPTHREADS_C11THREADS - +#elif WRAPTHREAD_C11THREADS #include #define wrapthread_atomic _Atomic -- cgit v1.3