diff options
Diffstat (limited to 'contrib/llvm-project/libcxx/include/cstring')
-rw-r--r-- | contrib/llvm-project/libcxx/include/cstring | 65 |
1 files changed, 37 insertions, 28 deletions
diff --git a/contrib/llvm-project/libcxx/include/cstring b/contrib/llvm-project/libcxx/include/cstring index 8bc96a023302..a9bdf4ff2dfc 100644 --- a/contrib/llvm-project/libcxx/include/cstring +++ b/contrib/llvm-project/libcxx/include/cstring @@ -1,5 +1,5 @@ // -*- C++ -*- -//===--------------------------- cstring ----------------------------------===// +//===----------------------------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. @@ -56,41 +56,50 @@ size_t strlen(const char* s); */ +#include <__assert> // all public C++ headers provide the assertion handler #include <__config> +#include <__type_traits/is_constant_evaluated.h> + #include <string.h> +#ifndef _LIBCPP_STRING_H +# error <cstring> tried including <string.h> but didn't find libc++'s <string.h> 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, and you are probably using compiler flags that make that \ + not be the case. +#endif + #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) -#pragma GCC system_header +# pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD -using ::size_t; -using ::memcpy; -using ::memmove; -using ::strcpy; -using ::strncpy; -using ::strcat; -using ::strncat; -using ::memcmp; -using ::strcmp; -using ::strncmp; -using ::strcoll; -using ::strxfrm; -using ::memchr; -using ::strchr; -using ::strcspn; -using ::strpbrk; -using ::strrchr; -using ::strspn; -using ::strstr; -#ifndef _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS -using ::strtok; -#endif -using ::memset; -using ::strerror; -using ::strlen; +using ::size_t _LIBCPP_USING_IF_EXISTS; +using ::memcpy _LIBCPP_USING_IF_EXISTS; +using ::memmove _LIBCPP_USING_IF_EXISTS; +using ::strcpy _LIBCPP_USING_IF_EXISTS; +using ::strncpy _LIBCPP_USING_IF_EXISTS; +using ::strcat _LIBCPP_USING_IF_EXISTS; +using ::strncat _LIBCPP_USING_IF_EXISTS; +using ::memcmp _LIBCPP_USING_IF_EXISTS; +using ::strcmp _LIBCPP_USING_IF_EXISTS; +using ::strncmp _LIBCPP_USING_IF_EXISTS; +using ::strcoll _LIBCPP_USING_IF_EXISTS; +using ::strxfrm _LIBCPP_USING_IF_EXISTS; +using ::memchr _LIBCPP_USING_IF_EXISTS; +using ::strchr _LIBCPP_USING_IF_EXISTS; +using ::strcspn _LIBCPP_USING_IF_EXISTS; +using ::strpbrk _LIBCPP_USING_IF_EXISTS; +using ::strrchr _LIBCPP_USING_IF_EXISTS; +using ::strspn _LIBCPP_USING_IF_EXISTS; +using ::strstr _LIBCPP_USING_IF_EXISTS; +using ::strtok _LIBCPP_USING_IF_EXISTS; +using ::memset _LIBCPP_USING_IF_EXISTS; +using ::strerror _LIBCPP_USING_IF_EXISTS; +using ::strlen _LIBCPP_USING_IF_EXISTS; _LIBCPP_END_NAMESPACE_STD -#endif // _LIBCPP_CSTRING +#endif // _LIBCPP_CSTRING |