17c478bd9Sstevel@tonic-gate /* 27c478bd9Sstevel@tonic-gate * CDDL HEADER START 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 59acbbeafSnn35248 * Common Development and Distribution License (the "License"). 69acbbeafSnn35248 * You may not use this file except in compliance with the License. 77c478bd9Sstevel@tonic-gate * 87c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 97c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 107c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 117c478bd9Sstevel@tonic-gate * and limitations under the License. 127c478bd9Sstevel@tonic-gate * 137c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 147c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 157c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 167c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 177c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 187c478bd9Sstevel@tonic-gate * 197c478bd9Sstevel@tonic-gate * CDDL HEADER END 207c478bd9Sstevel@tonic-gate */ 217c478bd9Sstevel@tonic-gate /* Copyright (c) 1988 AT&T */ 227c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 237c478bd9Sstevel@tonic-gate 247c478bd9Sstevel@tonic-gate 257c478bd9Sstevel@tonic-gate /* 26*b811a51aSVladimir Kotal * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 277c478bd9Sstevel@tonic-gate * Use is subject to license terms. 287c478bd9Sstevel@tonic-gate */ 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #ifndef _STRING_H 317c478bd9Sstevel@tonic-gate #define _STRING_H 327c478bd9Sstevel@tonic-gate 337c478bd9Sstevel@tonic-gate #include <iso/string_iso.h> 347c478bd9Sstevel@tonic-gate 357c478bd9Sstevel@tonic-gate /* 367c478bd9Sstevel@tonic-gate * Allow global visibility for symbols defined in 377c478bd9Sstevel@tonic-gate * C++ "std" namespace in <iso/string_iso.h>. 387c478bd9Sstevel@tonic-gate */ 397c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 407c478bd9Sstevel@tonic-gate using std::size_t; 417c478bd9Sstevel@tonic-gate using std::memchr; 427c478bd9Sstevel@tonic-gate using std::memcmp; 437c478bd9Sstevel@tonic-gate using std::memcpy; 447c478bd9Sstevel@tonic-gate using std::memmove; 457c478bd9Sstevel@tonic-gate using std::memset; 467c478bd9Sstevel@tonic-gate using std::strcat; 477c478bd9Sstevel@tonic-gate using std::strchr; 487c478bd9Sstevel@tonic-gate using std::strcmp; 497c478bd9Sstevel@tonic-gate using std::strcoll; 507c478bd9Sstevel@tonic-gate using std::strcpy; 517c478bd9Sstevel@tonic-gate using std::strcspn; 527c478bd9Sstevel@tonic-gate using std::strerror; 537c478bd9Sstevel@tonic-gate using std::strlen; 547c478bd9Sstevel@tonic-gate using std::strncat; 557c478bd9Sstevel@tonic-gate using std::strncmp; 567c478bd9Sstevel@tonic-gate using std::strncpy; 577c478bd9Sstevel@tonic-gate using std::strpbrk; 587c478bd9Sstevel@tonic-gate using std::strrchr; 597c478bd9Sstevel@tonic-gate using std::strspn; 607c478bd9Sstevel@tonic-gate using std::strstr; 617c478bd9Sstevel@tonic-gate using std::strtok; 627c478bd9Sstevel@tonic-gate using std::strxfrm; 637c478bd9Sstevel@tonic-gate #endif 647c478bd9Sstevel@tonic-gate 657c478bd9Sstevel@tonic-gate #ifdef __cplusplus 667c478bd9Sstevel@tonic-gate extern "C" { 677c478bd9Sstevel@tonic-gate #endif 687c478bd9Sstevel@tonic-gate 697c478bd9Sstevel@tonic-gate #if defined(__STDC__) 707c478bd9Sstevel@tonic-gate 717c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 727c478bd9Sstevel@tonic-gate (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ 737c478bd9Sstevel@tonic-gate defined(_XPG6) || defined(_REENTRANT) 747c478bd9Sstevel@tonic-gate extern int strerror_r(int, char *, size_t); 757c478bd9Sstevel@tonic-gate #endif 767c478bd9Sstevel@tonic-gate 777c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 787c478bd9Sstevel@tonic-gate (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ 797c478bd9Sstevel@tonic-gate (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT) 807c478bd9Sstevel@tonic-gate extern char *strtok_r(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, 817c478bd9Sstevel@tonic-gate char **_RESTRICT_KYWD); 827c478bd9Sstevel@tonic-gate #endif 837c478bd9Sstevel@tonic-gate 847c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \ 857c478bd9Sstevel@tonic-gate defined(__XOPEN_OR_POSIX) 867c478bd9Sstevel@tonic-gate extern void *memccpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD, 877c478bd9Sstevel@tonic-gate int, size_t); 887c478bd9Sstevel@tonic-gate #endif 897c478bd9Sstevel@tonic-gate 907c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 917c478bd9Sstevel@tonic-gate (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) 922401904dSnn35248 extern int uucopy(const void *_RESTRICT_KYWD, void *_RESTRICT_KYWD, size_t); 932401904dSnn35248 extern int uucopystr(const void *_RESTRICT_KYWD, void *_RESTRICT_KYWD, size_t); 947c478bd9Sstevel@tonic-gate extern char *strsignal(int); 95adecd3c6Sdg199075 extern size_t strnlen(const char *, size_t); 967c478bd9Sstevel@tonic-gate extern int ffs(int); 977c478bd9Sstevel@tonic-gate extern int strcasecmp(const char *, const char *); 987c478bd9Sstevel@tonic-gate extern int strncasecmp(const char *, const char *, size_t); 997c478bd9Sstevel@tonic-gate extern size_t strlcpy(char *, const char *, size_t); 1007c478bd9Sstevel@tonic-gate extern size_t strlcat(char *, const char *, size_t); 101*b811a51aSVladimir Kotal extern char *strsep(char **stringp, const char *delim); 1027c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__)... */ 1037c478bd9Sstevel@tonic-gate 1047c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 1057c478bd9Sstevel@tonic-gate (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ 1067c478bd9Sstevel@tonic-gate defined(_XPG4_2) 1077c478bd9Sstevel@tonic-gate extern char *strdup(const char *); 1087c478bd9Sstevel@tonic-gate #endif 1097c478bd9Sstevel@tonic-gate 1107c478bd9Sstevel@tonic-gate #else /* __STDC__ */ 1117c478bd9Sstevel@tonic-gate 1127c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 1137c478bd9Sstevel@tonic-gate defined(_XPG6) || defined(_REENTRANT) 1147c478bd9Sstevel@tonic-gate extern int strerror_r(); 1157c478bd9Sstevel@tonic-gate #endif 1167c478bd9Sstevel@tonic-gate 1177c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || \ 1187c478bd9Sstevel@tonic-gate (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT) 1197c478bd9Sstevel@tonic-gate extern char *strtok_r(); 1207c478bd9Sstevel@tonic-gate #endif 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(_STRICT_STDC) || \ 1237c478bd9Sstevel@tonic-gate defined(__XOPEN_OR_POSIX) 1247c478bd9Sstevel@tonic-gate extern void *memccpy(); 1257c478bd9Sstevel@tonic-gate #endif 1267c478bd9Sstevel@tonic-gate 1277c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) 1282401904dSnn35248 extern int uucopy(); 1292401904dSnn35248 extern int uucopystr(); 1307c478bd9Sstevel@tonic-gate extern char *strsignal(); 131adecd3c6Sdg199075 extern size_t strnlen(); 1327c478bd9Sstevel@tonic-gate extern int ffs(); 1337c478bd9Sstevel@tonic-gate extern int strcasecmp(); 1347c478bd9Sstevel@tonic-gate extern int strncasecmp(); 1357c478bd9Sstevel@tonic-gate extern size_t strlcpy(); 1367c478bd9Sstevel@tonic-gate extern size_t strlcat(); 137*b811a51aSVladimir Kotal extern char *strsep(); 1387c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) ... */ 1397c478bd9Sstevel@tonic-gate 1407c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) 1417c478bd9Sstevel@tonic-gate extern char *strdup(); 1427c478bd9Sstevel@tonic-gate #endif 1437c478bd9Sstevel@tonic-gate 1447c478bd9Sstevel@tonic-gate #endif /* __STDC__ */ 1457c478bd9Sstevel@tonic-gate 1467c478bd9Sstevel@tonic-gate #ifdef __cplusplus 1477c478bd9Sstevel@tonic-gate } 1487c478bd9Sstevel@tonic-gate #endif 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gate #endif /* _STRING_H */ 151