1ae115bc7Smrj /* 2ae115bc7Smrj * CDDL HEADER START 3ae115bc7Smrj * 4ae115bc7Smrj * The contents of this file are subject to the terms of the 5ae115bc7Smrj * Common Development and Distribution License (the "License"). 6ae115bc7Smrj * You may not use this file except in compliance with the License. 7ae115bc7Smrj * 8ae115bc7Smrj * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9ae115bc7Smrj * or http://www.opensolaris.org/os/licensing. 10ae115bc7Smrj * See the License for the specific language governing permissions 11ae115bc7Smrj * and limitations under the License. 12ae115bc7Smrj * 13ae115bc7Smrj * When distributing Covered Code, include this CDDL HEADER in each 14ae115bc7Smrj * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15ae115bc7Smrj * If applicable, add the following below this CDDL HEADER, with the 16ae115bc7Smrj * fields enclosed by brackets "[]" replaced with your own identifying 17ae115bc7Smrj * information: Portions Copyright [yyyy] [name of copyright owner] 18ae115bc7Smrj * 19ae115bc7Smrj * CDDL HEADER END 20ae115bc7Smrj */ 21ae115bc7Smrj 22ae115bc7Smrj /* 237637daddSmyers * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 24ae115bc7Smrj * Use is subject to license terms. 25ae115bc7Smrj */ 26ae115bc7Smrj 27ae115bc7Smrj #ifndef _COMMON_UTIL_STRING_H 28ae115bc7Smrj #define _COMMON_UTIL_STRING_H 29ae115bc7Smrj 30ae115bc7Smrj #include <sys/types.h> 31ae115bc7Smrj 32ae115bc7Smrj #ifdef __cplusplus 33ae115bc7Smrj extern "C" { 34ae115bc7Smrj #endif 35ae115bc7Smrj 36ae115bc7Smrj #if !defined(_KMDB) && (!defined(_BOOT) || defined(__sparc)) 37ae115bc7Smrj 38ae115bc7Smrj extern size_t vsnprintf(char *, size_t, const char *, va_list); 39ae115bc7Smrj /*PRINTFLIKE1*/ 40ae115bc7Smrj extern size_t snprintf(char *, size_t, const char *, ...); 41ae115bc7Smrj 42ae115bc7Smrj #if defined(_BOOT) && defined(__sparc) 43ae115bc7Smrj 44ae115bc7Smrj /*PRINTFLIKE2*/ 45ae115bc7Smrj extern int sprintf(char *, const char *, ...); 46ae115bc7Smrj extern int vsprintf(char *, const char *, va_list); 47ae115bc7Smrj 48ae115bc7Smrj #endif /* _BOOT && __sparc */ 49ae115bc7Smrj #endif /* !_KMDB && (!_BOOT || __sparc) */ 50ae115bc7Smrj 51ae115bc7Smrj extern char *strcat(char *, const char *); 52ae115bc7Smrj extern char *strchr(const char *, int); 53ae115bc7Smrj extern int strcmp(const char *, const char *); 54ae115bc7Smrj extern int strncmp(const char *, const char *, size_t); 55ae115bc7Smrj extern int strcasecmp(const char *, const char *); 56ae115bc7Smrj extern int strncasecmp(const char *, const char *, size_t); 57ae115bc7Smrj extern char *strcpy(char *, const char *); 58ae115bc7Smrj extern char *strncpy(char *, const char *, size_t); 59ae115bc7Smrj extern char *strrchr(const char *, int c); 60ae115bc7Smrj extern char *strstr(const char *, const char *); 61ae115bc7Smrj extern char *strpbrk(const char *, const char *); 62*1d9cde1dSKeith M Wesolowski extern char *strsep(char **, const char *); 63ae115bc7Smrj extern char *strncat(char *, const char *, size_t); 64ae115bc7Smrj extern size_t strlcat(char *, const char *, size_t); 65ae115bc7Smrj extern size_t strlcpy(char *, const char *, size_t); 66ae115bc7Smrj extern size_t strspn(const char *, const char *); 677637daddSmyers extern size_t strnlen(const char *, size_t); 68ae115bc7Smrj 69ae115bc7Smrj #if defined(_BOOT) || defined(_KMDB) 70ae115bc7Smrj 71ae115bc7Smrj extern char *strtok(char *, const char *); 72ae115bc7Smrj extern size_t strlen(const char *); 73ae115bc7Smrj 74ae115bc7Smrj #endif /* _BOOT || _KMDB */ 75ae115bc7Smrj 76ae115bc7Smrj #ifdef _KERNEL 77ae115bc7Smrj 78ae115bc7Smrj extern int strident_valid(const char *); 79ae115bc7Smrj extern void strident_canon(char *, size_t); 80ae115bc7Smrj 81ae115bc7Smrj #endif /* _KERNEL */ 82ae115bc7Smrj 83ae115bc7Smrj #ifdef __cplusplus 84ae115bc7Smrj } 85ae115bc7Smrj #endif 86ae115bc7Smrj 87ae115bc7Smrj #endif /* _COMMON_UTIL_STRING_H */ 88