diff --git a/libcxx/include/cctype b/libcxx/include/cctype --- a/libcxx/include/cctype +++ b/libcxx/include/cctype @@ -36,8 +36,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include +#ifndef _LIBCPP_CTYPE_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cerrno b/libcxx/include/cerrno --- a/libcxx/include/cerrno +++ b/libcxx/include/cerrno @@ -24,8 +24,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include +#ifndef _LIBCPP_ERRNO_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cfenv b/libcxx/include/cfenv --- a/libcxx/include/cfenv +++ b/libcxx/include/cfenv @@ -54,8 +54,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include +#ifndef _LIBCPP_FENV_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cfloat b/libcxx/include/cfloat --- a/libcxx/include/cfloat +++ b/libcxx/include/cfloat @@ -71,8 +71,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include +#ifndef _LIBCPP_FLOAT_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cinttypes b/libcxx/include/cinttypes --- a/libcxx/include/cinttypes +++ b/libcxx/include/cinttypes @@ -237,8 +237,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> #include + #include +#ifndef _LIBCPP_INTTYPES_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/climits b/libcxx/include/climits --- a/libcxx/include/climits +++ b/libcxx/include/climits @@ -39,8 +39,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include +#ifndef _LIBCPP_LIMITS_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/clocale b/libcxx/include/clocale --- a/libcxx/include/clocale +++ b/libcxx/include/clocale @@ -36,8 +36,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include +#ifndef _LIBCPP_LOCALE_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cmath b/libcxx/include/cmath --- a/libcxx/include/cmath +++ b/libcxx/include/cmath @@ -306,10 +306,18 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> -#include #include #include +#include + +#ifndef _LIBCPP_MATH_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/csetjmp b/libcxx/include/csetjmp --- a/libcxx/include/csetjmp +++ b/libcxx/include/csetjmp @@ -32,8 +32,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include +#ifndef _LIBCPP_SETJMP_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cstddef b/libcxx/include/cstddef --- a/libcxx/include/cstddef +++ b/libcxx/include/cstddef @@ -38,9 +38,17 @@ #include <__type_traits/enable_if.h> #include <__type_traits/integral_constant.h> #include <__type_traits/is_integral.h> -#include #include +#include + +#ifndef _LIBCPP_STDDEF_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cstdint b/libcxx/include/cstdint --- a/libcxx/include/cstdint +++ b/libcxx/include/cstdint @@ -142,8 +142,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include +#ifndef _LIBCPP_STDINT_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cstdio b/libcxx/include/cstdio --- a/libcxx/include/cstdio +++ b/libcxx/include/cstdio @@ -97,8 +97,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include +#ifndef _LIBCPP_STDIO_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cstdlib b/libcxx/include/cstdlib --- a/libcxx/include/cstdlib +++ b/libcxx/include/cstdlib @@ -83,8 +83,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include +#ifndef _LIBCPP_STDLIB_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cstring b/libcxx/include/cstring --- a/libcxx/include/cstring +++ b/libcxx/include/cstring @@ -58,8 +58,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include +#ifndef _LIBCPP_STRING_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cuchar b/libcxx/include/cuchar --- a/libcxx/include/cuchar +++ b/libcxx/include/cuchar @@ -36,8 +36,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> + #include +#ifndef _LIBCPP_UCHAR_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cwchar b/libcxx/include/cwchar --- a/libcxx/include/cwchar +++ b/libcxx/include/cwchar @@ -105,8 +105,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> #include + #include +#ifndef _LIBCPP_WCHAR_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif diff --git a/libcxx/include/cwctype b/libcxx/include/cwctype --- a/libcxx/include/cwctype +++ b/libcxx/include/cwctype @@ -52,8 +52,16 @@ #include <__assert> // all public C++ headers provide the assertion handler #include <__config> #include + #include +#ifndef _LIBCPP_WCTYPE_H +# error " tried including but didn't find libc++'s header. " \ + "This usually means that your header search paths are not configured properly. " \ + "The header search paths should contain the C++ Standard Library headers before " \ + "any C Standard Library." +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) # pragma GCC system_header #endif