10b57cec5SDimitry Andric// -*- C++ -*- 2349cc55cSDimitry Andric//===----------------------------------------------------------------------===// 30b57cec5SDimitry Andric// 40b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 50b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information. 60b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 70b57cec5SDimitry Andric// 80b57cec5SDimitry Andric//===----------------------------------------------------------------------===// 90b57cec5SDimitry Andric 100b57cec5SDimitry Andric#ifndef _LIBCPP_CSTRING 110b57cec5SDimitry Andric#define _LIBCPP_CSTRING 120b57cec5SDimitry Andric 130b57cec5SDimitry Andric/* 140b57cec5SDimitry Andric cstring synopsis 150b57cec5SDimitry Andric 160b57cec5SDimitry AndricMacros: 170b57cec5SDimitry Andric 180b57cec5SDimitry Andric NULL 190b57cec5SDimitry Andric 200b57cec5SDimitry Andricnamespace std 210b57cec5SDimitry Andric{ 220b57cec5SDimitry Andric 230b57cec5SDimitry AndricTypes: 240b57cec5SDimitry Andric 250b57cec5SDimitry Andric size_t 260b57cec5SDimitry Andric 270b57cec5SDimitry Andricvoid* memcpy(void* restrict s1, const void* restrict s2, size_t n); 280b57cec5SDimitry Andricvoid* memmove(void* s1, const void* s2, size_t n); 290b57cec5SDimitry Andricchar* strcpy (char* restrict s1, const char* restrict s2); 300b57cec5SDimitry Andricchar* strncpy(char* restrict s1, const char* restrict s2, size_t n); 310b57cec5SDimitry Andricchar* strcat (char* restrict s1, const char* restrict s2); 320b57cec5SDimitry Andricchar* strncat(char* restrict s1, const char* restrict s2, size_t n); 330b57cec5SDimitry Andricint memcmp(const void* s1, const void* s2, size_t n); 340b57cec5SDimitry Andricint strcmp (const char* s1, const char* s2); 350b57cec5SDimitry Andricint strncmp(const char* s1, const char* s2, size_t n); 360b57cec5SDimitry Andricint strcoll(const char* s1, const char* s2); 370b57cec5SDimitry Andricsize_t strxfrm(char* restrict s1, const char* restrict s2, size_t n); 380b57cec5SDimitry Andricconst void* memchr(const void* s, int c, size_t n); 390b57cec5SDimitry Andric void* memchr( void* s, int c, size_t n); 400b57cec5SDimitry Andricconst char* strchr(const char* s, int c); 410b57cec5SDimitry Andric char* strchr( char* s, int c); 420b57cec5SDimitry Andricsize_t strcspn(const char* s1, const char* s2); 430b57cec5SDimitry Andricconst char* strpbrk(const char* s1, const char* s2); 440b57cec5SDimitry Andric char* strpbrk( char* s1, const char* s2); 450b57cec5SDimitry Andricconst char* strrchr(const char* s, int c); 460b57cec5SDimitry Andric char* strrchr( char* s, int c); 470b57cec5SDimitry Andricsize_t strspn(const char* s1, const char* s2); 480b57cec5SDimitry Andricconst char* strstr(const char* s1, const char* s2); 490b57cec5SDimitry Andric char* strstr( char* s1, const char* s2); 500b57cec5SDimitry Andricchar* strtok(char* restrict s1, const char* restrict s2); 510b57cec5SDimitry Andricvoid* memset(void* s, int c, size_t n); 520b57cec5SDimitry Andricchar* strerror(int errnum); 530b57cec5SDimitry Andricsize_t strlen(const char* s); 540b57cec5SDimitry Andric 550b57cec5SDimitry Andric} // std 560b57cec5SDimitry Andric 570b57cec5SDimitry Andric*/ 580b57cec5SDimitry Andric 590b57cec5SDimitry Andric#include <__config> 60*bdd1243dSDimitry Andric#include <__type_traits/is_constant_evaluated.h> 61*bdd1243dSDimitry Andric 620b57cec5SDimitry Andric#include <string.h> 630b57cec5SDimitry Andric 64*bdd1243dSDimitry Andric#ifndef _LIBCPP_STRING_H 65*bdd1243dSDimitry Andric# error <cstring> tried including <string.h> but didn't find libc++'s <string.h> header. \ 66*bdd1243dSDimitry Andric This usually means that your header search paths are not configured properly. \ 67*bdd1243dSDimitry Andric The header search paths should contain the C++ Standard Library headers before \ 68*bdd1243dSDimitry Andric any C Standard Library, and you are probably using compiler flags that make that \ 69*bdd1243dSDimitry Andric not be the case. 70*bdd1243dSDimitry Andric#endif 71*bdd1243dSDimitry Andric 720b57cec5SDimitry Andric#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 730b57cec5SDimitry Andric# pragma GCC system_header 740b57cec5SDimitry Andric#endif 750b57cec5SDimitry Andric 760b57cec5SDimitry Andric_LIBCPP_BEGIN_NAMESPACE_STD 770b57cec5SDimitry Andric 78fe6060f1SDimitry Andricusing ::size_t _LIBCPP_USING_IF_EXISTS; 79fe6060f1SDimitry Andricusing ::memcpy _LIBCPP_USING_IF_EXISTS; 80fe6060f1SDimitry Andricusing ::memmove _LIBCPP_USING_IF_EXISTS; 81fe6060f1SDimitry Andricusing ::strcpy _LIBCPP_USING_IF_EXISTS; 82fe6060f1SDimitry Andricusing ::strncpy _LIBCPP_USING_IF_EXISTS; 83fe6060f1SDimitry Andricusing ::strcat _LIBCPP_USING_IF_EXISTS; 84fe6060f1SDimitry Andricusing ::strncat _LIBCPP_USING_IF_EXISTS; 85fe6060f1SDimitry Andricusing ::memcmp _LIBCPP_USING_IF_EXISTS; 86fe6060f1SDimitry Andricusing ::strcmp _LIBCPP_USING_IF_EXISTS; 87fe6060f1SDimitry Andricusing ::strncmp _LIBCPP_USING_IF_EXISTS; 88fe6060f1SDimitry Andricusing ::strcoll _LIBCPP_USING_IF_EXISTS; 89fe6060f1SDimitry Andricusing ::strxfrm _LIBCPP_USING_IF_EXISTS; 90fe6060f1SDimitry Andricusing ::memchr _LIBCPP_USING_IF_EXISTS; 91fe6060f1SDimitry Andricusing ::strchr _LIBCPP_USING_IF_EXISTS; 92fe6060f1SDimitry Andricusing ::strcspn _LIBCPP_USING_IF_EXISTS; 93fe6060f1SDimitry Andricusing ::strpbrk _LIBCPP_USING_IF_EXISTS; 94fe6060f1SDimitry Andricusing ::strrchr _LIBCPP_USING_IF_EXISTS; 95fe6060f1SDimitry Andricusing ::strspn _LIBCPP_USING_IF_EXISTS; 96fe6060f1SDimitry Andricusing ::strstr _LIBCPP_USING_IF_EXISTS; 97fe6060f1SDimitry Andricusing ::strtok _LIBCPP_USING_IF_EXISTS; 98fe6060f1SDimitry Andricusing ::memset _LIBCPP_USING_IF_EXISTS; 99fe6060f1SDimitry Andricusing ::strerror _LIBCPP_USING_IF_EXISTS; 100fe6060f1SDimitry Andricusing ::strlen _LIBCPP_USING_IF_EXISTS; 1010b57cec5SDimitry Andric 1020b57cec5SDimitry Andric_LIBCPP_END_NAMESPACE_STD 1030b57cec5SDimitry Andric 1040b57cec5SDimitry Andric#endif // _LIBCPP_CSTRING 105