aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarat Dukhan <maratek@google.com>2020-12-05 17:55:30 -0800
committerMarat Dukhan <maratek@google.com>2020-12-05 17:58:43 -0800
commit13d90b413394e9f93bc1a23170b91b69bda3d6f0 (patch)
tree5e29d2dad52f25d4ccb38578d51d4148cbbde561
parent6c76abee85c7bf2b0c9be2d05bc97b4e5d109d16 (diff)
downloadpthreadpool-13d90b413394e9f93bc1a23170b91b69bda3d6f0.tar.gz
Use __STDC_NO_ATOMICS__ to detect C11 compilers without stdatomic.h
Replace MSVC-specific check from #10
-rw-r--r--src/threadpool-atomics.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/threadpool-atomics.h b/src/threadpool-atomics.h
index 366a8db..23f943a 100644
--- a/src/threadpool-atomics.h
+++ b/src/threadpool-atomics.h
@@ -130,7 +130,7 @@
static inline void pthreadpool_fence_release() {
__c11_atomic_thread_fence(__ATOMIC_RELEASE);
}
-#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && (!defined(_MSC_VER) || defined(__clang__))
+#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) && !defined(__STDC_NO_ATOMICS__)
#include <stdatomic.h>
typedef _Atomic(uint32_t) pthreadpool_atomic_uint32_t;