diff --git a/include/future b/include/future index 7cd88cb7..83513fa6 100644 --- a/include/future +++ b/include/future @@ -374,7 +374,7 @@ template struct uses_allocator, Alloc>; #pragma GCC system_header #endif -#ifndef _LIBCPP_HAS_NO_THREADS +#ifdef _LIBCPP_HAS_NO_THREADS #error is not supported on this single threaded system #else // !_LIBCPP_HAS_NO_THREADS diff --git a/include/ios b/include/ios index 6d426079..ff79998b 100644 --- a/include/ios +++ b/include/ios @@ -216,7 +216,7 @@ storage-class-specifier const error_category& iostream_category() noexcept; #include <__locale> #include -#if __has_feature(cxx_atomic) && !_LIBCPP_HAS_NO_THREADS +#if __has_feature(cxx_atomic) && !defined(_LIBCPP_HAS_NO_THREADS) #include // for __xindex_ #endif @@ -367,7 +367,7 @@ private: int* __index_; size_t __event_size_; size_t __event_cap_; -#if __has_feature(cxx_atomic) && !_LIBCPP_HAS_NO_THREADS +#if __has_feature(cxx_atomic) && !defined(_LIBCPP_HAS_NO_THREADS) static atomic __xindex_; #else static int __xindex_; diff --git a/src/ios.cpp b/src/ios.cpp index 0bd500bf..06426c7b 100644 --- a/src/ios.cpp +++ b/src/ios.cpp @@ -148,7 +148,7 @@ ios_base::getloc() const } // xalloc -#if __has_feature(cxx_atomic) && !_LIBCPP_HAS_NO_THREADS +#if __has_feature(cxx_atomic) && !defined(_LIBCPP_HAS_NO_THREADS) atomic ios_base::__xindex_ = ATOMIC_VAR_INIT(0); #else int ios_base::__xindex_ = 0; diff --git a/src/memory.cpp b/src/memory.cpp index 31e823cf..c56d031a 100644 --- a/src/memory.cpp +++ b/src/memory.cpp @@ -121,7 +121,7 @@ __shared_weak_count::__get_deleter(const type_info&) const _NOEXCEPT #endif // _LIBCPP_NO_RTTI -#if __has_feature(cxx_atomic) && !_LIBCPP_HAS_NO_THREADS +#if __has_feature(cxx_atomic) && !defined(_LIBCPP_HAS_NO_THREADS) static const std::size_t __sp_mut_count = 16; static pthread_mutex_t mut_back_imp[__sp_mut_count] =