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