From: Louis Dionne Date: Thu, 3 Jun 2021 22:18:41 +0000 (-0400) Subject: [libc++] Define _LIBCPP_NO_NATIVE_SEMAPHORES even outside of pthread X-Git-Tag: llvmorg-14-init~4912 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=db757ba7c523f8a456f884316a44c0f1124bcb9a;p=platform%2Fupstream%2Fllvm.git [libc++] Define _LIBCPP_NO_NATIVE_SEMAPHORES even outside of pthread needs to know about whether native semaphores are supported or not, even if we're not using the pthread API. --- diff --git a/libcxx/include/__threading_support b/libcxx/include/__threading_support index 788cae8..4d86716 100644 --- a/libcxx/include/__threading_support +++ b/libcxx/include/__threading_support @@ -29,14 +29,15 @@ # include <__external_threading> #elif !defined(_LIBCPP_HAS_NO_THREADS) +#if defined(__APPLE__) || defined(__MVS__) +# define _LIBCPP_NO_NATIVE_SEMAPHORES +#endif + #if defined(_LIBCPP_HAS_THREAD_API_PTHREAD) # include # include -# if defined(__APPLE__) || defined(__MVS__) -# define _LIBCPP_NO_NATIVE_SEMAPHORES -# endif # ifndef _LIBCPP_NO_NATIVE_SEMAPHORES -# include +# include # endif #elif defined(_LIBCPP_HAS_THREAD_API_C11) # include