diff --git a/libcxx/include/cassert b/libcxx/include/cassert --- a/libcxx/include/cassert +++ b/libcxx/include/cassert @@ -18,7 +18,14 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> -#include + +// is not provided by libc++ +#if __has_include() +# include +# ifdef _LIBCPP_ASSERT_H +# error "If libc++ starts defining , the __has_include check should move to libc++'s " +# endif +#endif #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/csignal b/libcxx/include/csignal --- a/libcxx/include/csignal +++ b/libcxx/include/csignal @@ -42,8 +42,12 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> +// is not provided by libc++ #if __has_include() -# include +# include +# ifdef _LIBCPP_SIGNAL_H +# error "If libc++ starts defining , the __has_include check should move to libc++'s " +# endif #endif #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) diff --git a/libcxx/include/cstdarg b/libcxx/include/cstdarg --- a/libcxx/include/cstdarg +++ b/libcxx/include/cstdarg @@ -33,7 +33,14 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> -#include + +// is not provided by libc++ +#if __has_include() +# include +# ifdef _LIBCPP_STDARG_H +# error "If libc++ starts defining , the __has_include check should move to libc++'s " +# endif +#endif #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header diff --git a/libcxx/include/ctime b/libcxx/include/ctime --- a/libcxx/include/ctime +++ b/libcxx/include/ctime @@ -47,7 +47,14 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> -#include + +// is not provided by libc++ +#if __has_include() +# include +# ifdef _LIBCPP_TIME_H +# error "If libc++ starts defining , the __has_include check should move to libc++'s " +# endif +#endif #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header