1e78f53d1SNikolas Klauser// -*- C++ -*- 2e78f53d1SNikolas Klauser//===----------------------------------------------------------------------===// 3e78f53d1SNikolas Klauser// 4e78f53d1SNikolas Klauser// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5e78f53d1SNikolas Klauser// See https://llvm.org/LICENSE.txt for license information. 6e78f53d1SNikolas Klauser// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7e78f53d1SNikolas Klauser// 8e78f53d1SNikolas Klauser//===----------------------------------------------------------------------===// 9e78f53d1SNikolas Klauser 10*ce777190SNikolas Klauser#ifndef _LIBCPP___CXX03_CSTRING 11*ce777190SNikolas Klauser#define _LIBCPP___CXX03_CSTRING 12e78f53d1SNikolas Klauser 13e78f53d1SNikolas Klauser/* 14e78f53d1SNikolas Klauser cstring synopsis 15e78f53d1SNikolas Klauser 16e78f53d1SNikolas KlauserMacros: 17e78f53d1SNikolas Klauser 18e78f53d1SNikolas Klauser NULL 19e78f53d1SNikolas Klauser 20e78f53d1SNikolas Klausernamespace std 21e78f53d1SNikolas Klauser{ 22e78f53d1SNikolas Klauser 23e78f53d1SNikolas KlauserTypes: 24e78f53d1SNikolas Klauser 25e78f53d1SNikolas Klauser size_t 26e78f53d1SNikolas Klauser 27e78f53d1SNikolas Klauservoid* memcpy(void* restrict s1, const void* restrict s2, size_t n); 28e78f53d1SNikolas Klauservoid* memmove(void* s1, const void* s2, size_t n); 29e78f53d1SNikolas Klauserchar* strcpy (char* restrict s1, const char* restrict s2); 30e78f53d1SNikolas Klauserchar* strncpy(char* restrict s1, const char* restrict s2, size_t n); 31e78f53d1SNikolas Klauserchar* strcat (char* restrict s1, const char* restrict s2); 32e78f53d1SNikolas Klauserchar* strncat(char* restrict s1, const char* restrict s2, size_t n); 33e78f53d1SNikolas Klauserint memcmp(const void* s1, const void* s2, size_t n); 34e78f53d1SNikolas Klauserint strcmp (const char* s1, const char* s2); 35e78f53d1SNikolas Klauserint strncmp(const char* s1, const char* s2, size_t n); 36e78f53d1SNikolas Klauserint strcoll(const char* s1, const char* s2); 37e78f53d1SNikolas Klausersize_t strxfrm(char* restrict s1, const char* restrict s2, size_t n); 38e78f53d1SNikolas Klauserconst void* memchr(const void* s, int c, size_t n); 39e78f53d1SNikolas Klauser void* memchr( void* s, int c, size_t n); 40e78f53d1SNikolas Klauserconst char* strchr(const char* s, int c); 41e78f53d1SNikolas Klauser char* strchr( char* s, int c); 42e78f53d1SNikolas Klausersize_t strcspn(const char* s1, const char* s2); 43e78f53d1SNikolas Klauserconst char* strpbrk(const char* s1, const char* s2); 44e78f53d1SNikolas Klauser char* strpbrk( char* s1, const char* s2); 45e78f53d1SNikolas Klauserconst char* strrchr(const char* s, int c); 46e78f53d1SNikolas Klauser char* strrchr( char* s, int c); 47e78f53d1SNikolas Klausersize_t strspn(const char* s1, const char* s2); 48e78f53d1SNikolas Klauserconst char* strstr(const char* s1, const char* s2); 49e78f53d1SNikolas Klauser char* strstr( char* s1, const char* s2); 50e78f53d1SNikolas Klauserchar* strtok(char* restrict s1, const char* restrict s2); 51e78f53d1SNikolas Klauservoid* memset(void* s, int c, size_t n); 52e78f53d1SNikolas Klauserchar* strerror(int errnum); 53e78f53d1SNikolas Klausersize_t strlen(const char* s); 54e78f53d1SNikolas Klauser 55e78f53d1SNikolas Klauser} // std 56e78f53d1SNikolas Klauser 57e78f53d1SNikolas Klauser*/ 58e78f53d1SNikolas Klauser 5973fbae83SNikolas Klauser#include <__cxx03/__config> 6073fbae83SNikolas Klauser#include <__cxx03/__type_traits/is_constant_evaluated.h> 61e78f53d1SNikolas Klauser 6273fbae83SNikolas Klauser#include <__cxx03/string.h> 63e78f53d1SNikolas Klauser 64*ce777190SNikolas Klauser#ifndef _LIBCPP___CXX03_STRING_H 65e78f53d1SNikolas Klauser# error <cstring> tried including <string.h> but didn't find libc++'s <string.h> header. \ 66e78f53d1SNikolas Klauser This usually means that your header search paths are not configured properly. \ 67e78f53d1SNikolas Klauser The header search paths should contain the C++ Standard Library headers before \ 68e78f53d1SNikolas Klauser any C Standard Library, and you are probably using compiler flags that make that \ 69e78f53d1SNikolas Klauser not be the case. 70e78f53d1SNikolas Klauser#endif 71e78f53d1SNikolas Klauser 72e78f53d1SNikolas Klauser#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 73e78f53d1SNikolas Klauser# pragma GCC system_header 74e78f53d1SNikolas Klauser#endif 75e78f53d1SNikolas Klauser 76e78f53d1SNikolas Klauser_LIBCPP_BEGIN_NAMESPACE_STD 77e78f53d1SNikolas Klauser 78e78f53d1SNikolas Klauserusing ::size_t _LIBCPP_USING_IF_EXISTS; 79e78f53d1SNikolas Klauserusing ::memcpy _LIBCPP_USING_IF_EXISTS; 80e78f53d1SNikolas Klauserusing ::memmove _LIBCPP_USING_IF_EXISTS; 81e78f53d1SNikolas Klauserusing ::strcpy _LIBCPP_USING_IF_EXISTS; 82e78f53d1SNikolas Klauserusing ::strncpy _LIBCPP_USING_IF_EXISTS; 83e78f53d1SNikolas Klauserusing ::strcat _LIBCPP_USING_IF_EXISTS; 84e78f53d1SNikolas Klauserusing ::strncat _LIBCPP_USING_IF_EXISTS; 85e78f53d1SNikolas Klauserusing ::memcmp _LIBCPP_USING_IF_EXISTS; 86e78f53d1SNikolas Klauserusing ::strcmp _LIBCPP_USING_IF_EXISTS; 87e78f53d1SNikolas Klauserusing ::strncmp _LIBCPP_USING_IF_EXISTS; 88e78f53d1SNikolas Klauserusing ::strcoll _LIBCPP_USING_IF_EXISTS; 89e78f53d1SNikolas Klauserusing ::strxfrm _LIBCPP_USING_IF_EXISTS; 90e78f53d1SNikolas Klauserusing ::memchr _LIBCPP_USING_IF_EXISTS; 91e78f53d1SNikolas Klauserusing ::strchr _LIBCPP_USING_IF_EXISTS; 92e78f53d1SNikolas Klauserusing ::strcspn _LIBCPP_USING_IF_EXISTS; 93e78f53d1SNikolas Klauserusing ::strpbrk _LIBCPP_USING_IF_EXISTS; 94e78f53d1SNikolas Klauserusing ::strrchr _LIBCPP_USING_IF_EXISTS; 95e78f53d1SNikolas Klauserusing ::strspn _LIBCPP_USING_IF_EXISTS; 96e78f53d1SNikolas Klauserusing ::strstr _LIBCPP_USING_IF_EXISTS; 97e78f53d1SNikolas Klauserusing ::strtok _LIBCPP_USING_IF_EXISTS; 98e78f53d1SNikolas Klauserusing ::memset _LIBCPP_USING_IF_EXISTS; 99e78f53d1SNikolas Klauserusing ::strerror _LIBCPP_USING_IF_EXISTS; 100e78f53d1SNikolas Klauserusing ::strlen _LIBCPP_USING_IF_EXISTS; 101e78f53d1SNikolas Klauser 102e78f53d1SNikolas Klauser_LIBCPP_END_NAMESPACE_STD 103e78f53d1SNikolas Klauser 104*ce777190SNikolas Klauser#endif // _LIBCPP___CXX03_CSTRING 105