14fee23f9Smrg// -*- C++ -*- forwarding header. 24fee23f9Smrg 3*b1e83836Smrg// Copyright (C) 1997-2022 Free Software Foundation, Inc. 44fee23f9Smrg// 54fee23f9Smrg// This file is part of the GNU ISO C++ Library. This library is free 64fee23f9Smrg// software; you can redistribute it and/or modify it under the 74fee23f9Smrg// terms of the GNU General Public License as published by the 84fee23f9Smrg// Free Software Foundation; either version 3, or (at your option) 94fee23f9Smrg// any later version. 104fee23f9Smrg 114fee23f9Smrg// This library is distributed in the hope that it will be useful, 124fee23f9Smrg// but WITHOUT ANY WARRANTY; without even the implied warranty of 134fee23f9Smrg// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 144fee23f9Smrg// GNU General Public License for more details. 154fee23f9Smrg 164fee23f9Smrg// Under Section 7 of GPL version 3, you are granted additional 174fee23f9Smrg// permissions described in the GCC Runtime Library Exception, version 184fee23f9Smrg// 3.1, as published by the Free Software Foundation. 194fee23f9Smrg 204fee23f9Smrg// You should have received a copy of the GNU General Public License and 214fee23f9Smrg// a copy of the GCC Runtime Library Exception along with this program; 224fee23f9Smrg// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 234fee23f9Smrg// <http://www.gnu.org/licenses/>. 244fee23f9Smrg 254fee23f9Smrg/** @file cstring 264fee23f9Smrg * This is a Standard C++ Library file. You should @c #include this file 274fee23f9Smrg * in your programs, rather than any of the @a *.h implementation files. 284fee23f9Smrg * 294fee23f9Smrg * This is the C++ version of the Standard C Library header @c string.h, 304fee23f9Smrg * and its contents are (mostly) the same as that header, but are all 314fee23f9Smrg * contained in the namespace @c std (except for names which are defined 324fee23f9Smrg * as macros in C). 334fee23f9Smrg */ 344fee23f9Smrg 354fee23f9Smrg// 364fee23f9Smrg// ISO C++ 14882: 20.4.6 C library 374fee23f9Smrg// 384fee23f9Smrg 394fee23f9Smrg#ifndef _GLIBCXX_CSTRING 404fee23f9Smrg#define _GLIBCXX_CSTRING 1 414fee23f9Smrg 424fee23f9Smrg#pragma GCC system_header 434fee23f9Smrg 444fee23f9Smrg#include <bits/c++config.h> 454fee23f9Smrg#include <string.h> 464fee23f9Smrg 474fee23f9Smrg// Get rid of those macros defined in <string.h> in lieu of real functions. 484fee23f9Smrg#undef memcpy 494fee23f9Smrg#undef memmove 504fee23f9Smrg#undef strcpy 514fee23f9Smrg#undef strncpy 524fee23f9Smrg#undef strcat 534fee23f9Smrg#undef strncat 544fee23f9Smrg#undef memcmp 554fee23f9Smrg#undef strcmp 564fee23f9Smrg#undef strcoll 574fee23f9Smrg#undef strncmp 584fee23f9Smrg#undef strxfrm 594fee23f9Smrg#undef memchr 604fee23f9Smrg#undef strchr 614fee23f9Smrg#undef strcspn 624fee23f9Smrg#undef strpbrk 634fee23f9Smrg#undef strrchr 644fee23f9Smrg#undef strspn 654fee23f9Smrg#undef strstr 664fee23f9Smrg#undef strtok 674fee23f9Smrg#undef memset 684fee23f9Smrg#undef strerror 694fee23f9Smrg#undef strlen 704fee23f9Smrg 7148fb7bfaSmrgnamespace std _GLIBCXX_VISIBILITY(default) 7248fb7bfaSmrg{ 7348fb7bfaSmrg_GLIBCXX_BEGIN_NAMESPACE_VERSION 744fee23f9Smrg 754fee23f9Smrg using ::memcpy; 764fee23f9Smrg using ::memmove; 774fee23f9Smrg using ::strcpy; 784fee23f9Smrg using ::strncpy; 794fee23f9Smrg using ::strcat; 804fee23f9Smrg using ::strncat; 814fee23f9Smrg using ::memcmp; 824fee23f9Smrg using ::strcmp; 834fee23f9Smrg using ::strcoll; 844fee23f9Smrg using ::strncmp; 854fee23f9Smrg using ::strxfrm; 864fee23f9Smrg using ::strcspn; 874fee23f9Smrg using ::strspn; 884fee23f9Smrg using ::strtok; 894fee23f9Smrg using ::memset; 904fee23f9Smrg using ::strerror; 914fee23f9Smrg using ::strlen; 924fee23f9Smrg using ::memchr; 934fee23f9Smrg using ::strchr; 944fee23f9Smrg using ::strpbrk; 954fee23f9Smrg using ::strrchr; 964fee23f9Smrg using ::strstr; 974fee23f9Smrg 984fee23f9Smrg#ifndef __CORRECT_ISO_CPP_STRING_H_PROTO 994fee23f9Smrg inline void* 1004fee23f9Smrg memchr(void* __s, int __c, size_t __n) 1014fee23f9Smrg { return __builtin_memchr(__s, __c, __n); } 1024fee23f9Smrg 1034fee23f9Smrg inline char* 1044fee23f9Smrg strchr(char* __s, int __n) 1054fee23f9Smrg { return __builtin_strchr(__s, __n); } 1064fee23f9Smrg 1074fee23f9Smrg inline char* 1084fee23f9Smrg strpbrk(char* __s1, const char* __s2) 1094fee23f9Smrg { return __builtin_strpbrk(__s1, __s2); } 1104fee23f9Smrg 1114fee23f9Smrg inline char* 1124fee23f9Smrg strrchr(char* __s, int __n) 1134fee23f9Smrg { return __builtin_strrchr(__s, __n); } 1144fee23f9Smrg 1154fee23f9Smrg inline char* 1164fee23f9Smrg strstr(char* __s1, const char* __s2) 1174fee23f9Smrg { return __builtin_strstr(__s1, __s2); } 1184fee23f9Smrg#endif 1194fee23f9Smrg 12048fb7bfaSmrg_GLIBCXX_END_NAMESPACE_VERSION 12148fb7bfaSmrg} // namespace 1224fee23f9Smrg 1234fee23f9Smrg#endif 124