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 /* 23*7637daddSmyers * 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 #pragma ident "%Z%%M% %I% %E% SMI" 31ae115bc7Smrj 32ae115bc7Smrj #include <sys/types.h> 33ae115bc7Smrj 34ae115bc7Smrj #ifdef __cplusplus 35ae115bc7Smrj extern "C" { 36ae115bc7Smrj #endif 37ae115bc7Smrj 38ae115bc7Smrj #if !defined(_KMDB) && (!defined(_BOOT) || defined(__sparc)) 39ae115bc7Smrj 40ae115bc7Smrj extern size_t vsnprintf(char *, size_t, const char *, va_list); 41ae115bc7Smrj /*PRINTFLIKE1*/ 42ae115bc7Smrj extern size_t snprintf(char *, size_t, const char *, ...); 43ae115bc7Smrj 44ae115bc7Smrj #if defined(_BOOT) && defined(__sparc) 45ae115bc7Smrj 46ae115bc7Smrj /*PRINTFLIKE2*/ 47ae115bc7Smrj extern int sprintf(char *, const char *, ...); 48ae115bc7Smrj extern int vsprintf(char *, const char *, va_list); 49ae115bc7Smrj 50ae115bc7Smrj #endif /* _BOOT && __sparc */ 51ae115bc7Smrj #endif /* !_KMDB && (!_BOOT || __sparc) */ 52ae115bc7Smrj 53ae115bc7Smrj extern char *strcat(char *, const char *); 54ae115bc7Smrj extern char *strchr(const char *, int); 55ae115bc7Smrj extern int strcmp(const char *, const char *); 56ae115bc7Smrj extern int strncmp(const char *, const char *, size_t); 57ae115bc7Smrj extern int strcasecmp(const char *, const char *); 58ae115bc7Smrj extern int strncasecmp(const char *, const char *, size_t); 59ae115bc7Smrj extern char *strcpy(char *, const char *); 60ae115bc7Smrj extern char *strncpy(char *, const char *, size_t); 61ae115bc7Smrj extern char *strrchr(const char *, int c); 62ae115bc7Smrj extern char *strstr(const char *, const char *); 63ae115bc7Smrj extern char *strpbrk(const char *, const char *); 64ae115bc7Smrj extern char *strncat(char *, const char *, size_t); 65ae115bc7Smrj extern size_t strlcat(char *, const char *, size_t); 66ae115bc7Smrj extern size_t strlcpy(char *, const char *, size_t); 67ae115bc7Smrj extern size_t strspn(const char *, const char *); 68*7637daddSmyers extern size_t strnlen(const char *, size_t); 69ae115bc7Smrj 70ae115bc7Smrj #if defined(_BOOT) || defined(_KMDB) 71ae115bc7Smrj 72ae115bc7Smrj extern char *strtok(char *, const char *); 73ae115bc7Smrj extern size_t strlen(const char *); 74ae115bc7Smrj 75ae115bc7Smrj #endif /* _BOOT || _KMDB */ 76ae115bc7Smrj 77ae115bc7Smrj #ifdef _KERNEL 78ae115bc7Smrj 79ae115bc7Smrj extern int strident_valid(const char *); 80ae115bc7Smrj extern void strident_canon(char *, size_t); 81ae115bc7Smrj 82ae115bc7Smrj #endif /* _KERNEL */ 83ae115bc7Smrj 84ae115bc7Smrj #ifdef __cplusplus 85ae115bc7Smrj } 86ae115bc7Smrj #endif 87ae115bc7Smrj 88ae115bc7Smrj #endif /* _COMMON_UTIL_STRING_H */ 89