diff --git a/libcxx/include/barrier b/libcxx/include/barrier --- a/libcxx/include/barrier +++ b/libcxx/include/barrier @@ -58,6 +58,9 @@ # error is not supported on this single threaded system #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 14 _LIBCPP_BEGIN_NAMESPACE_STD @@ -320,4 +323,6 @@ #endif // _LIBCPP_STD_VER >= 14 +_LIBCPP_POP_MACROS + #endif //_LIBCPP_BARRIER diff --git a/libcxx/include/experimental/simd b/libcxx/include/experimental/simd --- a/libcxx/include/experimental/simd +++ b/libcxx/include/experimental/simd @@ -659,6 +659,9 @@ #pragma GCC system_header #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + _LIBCPP_BEGIN_NAMESPACE_EXPERIMENTAL_SIMD #if _LIBCPP_STD_VER >= 17 @@ -1566,4 +1569,6 @@ _LIBCPP_END_NAMESPACE_EXPERIMENTAL_SIMD +_LIBCPP_POP_MACROS + #endif /* _LIBCPP_EXPERIMENTAL_SIMD */ diff --git a/libcxx/include/latch b/libcxx/include/latch --- a/libcxx/include/latch +++ b/libcxx/include/latch @@ -50,6 +50,9 @@ # error is not supported on this single threaded system #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 14 _LIBCPP_BEGIN_NAMESPACE_STD @@ -102,4 +105,6 @@ #endif // _LIBCPP_STD_VER >= 14 +_LIBCPP_POP_MACROS + #endif //_LIBCPP_LATCH diff --git a/libcxx/include/semaphore b/libcxx/include/semaphore --- a/libcxx/include/semaphore +++ b/libcxx/include/semaphore @@ -49,7 +49,6 @@ #include <__availability> #include <__threading_support> #include -#include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header @@ -59,6 +58,9 @@ # error is not supported on this single threaded system #endif +_LIBCPP_PUSH_MACROS +#include <__undef_macros> + #if _LIBCPP_STD_VER >= 14 _LIBCPP_BEGIN_NAMESPACE_STD @@ -233,4 +235,6 @@ #endif // _LIBCPP_STD_VER >= 14 +_LIBCPP_POP_MACROS + #endif //_LIBCPP_SEMAPHORE diff --git a/libcxx/test/libcxx/double_include.sh.cpp b/libcxx/test/libcxx/double_include.sh.cpp --- a/libcxx/test/libcxx/double_include.sh.cpp +++ b/libcxx/test/libcxx/double_include.sh.cpp @@ -30,9 +30,9 @@ #include #ifndef _LIBCPP_HAS_NO_THREADS #include -#include +#endif +#ifndef _LIBCPP_HAS_NO_THREADS #include -#include #endif #include #include @@ -83,6 +83,9 @@ #include #include #include +#ifndef _LIBCPP_HAS_NO_THREADS +#include +#endif #include #include #include @@ -100,6 +103,9 @@ #include #include #include +#ifndef _LIBCPP_HAS_NO_THREADS +#include +#endif #include #include #ifndef _LIBCPP_HAS_NO_THREADS @@ -170,8 +176,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/libcxx/test/libcxx/min_max_macros.compile.pass.cpp b/libcxx/test/libcxx/min_max_macros.compile.pass.cpp --- a/libcxx/test/libcxx/min_max_macros.compile.pass.cpp +++ b/libcxx/test/libcxx/min_max_macros.compile.pass.cpp @@ -33,6 +33,12 @@ #include TEST_MACROS(); #endif +#ifndef _LIBCPP_HAS_NO_THREADS +#include +TEST_MACROS(); +#endif +#include +TEST_MACROS(); #include TEST_MACROS(); #include @@ -59,10 +65,14 @@ TEST_MACROS(); #include TEST_MACROS(); +#include +TEST_MACROS(); #include TEST_MACROS(); #include TEST_MACROS(); +#include +TEST_MACROS(); #include TEST_MACROS(); #include @@ -99,6 +109,10 @@ TEST_MACROS(); #include TEST_MACROS(); +#include +TEST_MACROS(); +#include +TEST_MACROS(); #include TEST_MACROS(); #include @@ -119,6 +133,10 @@ TEST_MACROS(); #include TEST_MACROS(); +#ifndef _LIBCPP_HAS_NO_THREADS +#include +TEST_MACROS(); +#endif #include TEST_MACROS(); #include @@ -137,6 +155,8 @@ #endif #include TEST_MACROS(); +#include +TEST_MACROS(); #include TEST_MACROS(); #include @@ -149,6 +169,10 @@ TEST_MACROS(); #include TEST_MACROS(); +#ifndef _LIBCPP_HAS_NO_THREADS +#include +TEST_MACROS(); +#endif #include TEST_MACROS(); #include @@ -207,6 +231,8 @@ TEST_MACROS(); #include TEST_MACROS(); +#include +TEST_MACROS(); #include TEST_MACROS(); #include @@ -251,6 +277,10 @@ #if __cplusplus >= 201103L #include TEST_MACROS(); +#if defined(__cpp_coroutines) +#include +TEST_MACROS(); +#endif #include TEST_MACROS(); #include @@ -271,6 +301,8 @@ TEST_MACROS(); #include TEST_MACROS(); +#include +TEST_MACROS(); #include TEST_MACROS(); #include diff --git a/libcxx/test/libcxx/no_assert_include.compile.pass.cpp b/libcxx/test/libcxx/no_assert_include.compile.pass.cpp --- a/libcxx/test/libcxx/no_assert_include.compile.pass.cpp +++ b/libcxx/test/libcxx/no_assert_include.compile.pass.cpp @@ -25,6 +25,9 @@ #ifndef _LIBCPP_HAS_NO_THREADS #include #endif +#ifndef _LIBCPP_HAS_NO_THREADS +#include +#endif #include #include #include @@ -41,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -72,6 +76,9 @@ #include #include #include +#ifndef _LIBCPP_HAS_NO_THREADS +#include +#endif #include #include #include @@ -82,12 +89,16 @@ #include #endif #include +#include #include #include #include #include #include #include +#ifndef _LIBCPP_HAS_NO_THREADS +#include +#endif #include #include #ifndef _LIBCPP_HAS_NO_THREADS @@ -158,8 +169,8 @@ #include #include #include -#include #include +#include #include #include #include