ae115bc77f6fcde83175c75b4206dc2e50747966mrj/*
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * CDDL HEADER START
ae115bc77f6fcde83175c75b4206dc2e50747966mrj *
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * The contents of this file are subject to the terms of the
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Common Development and Distribution License (the "License").
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * You may not use this file except in compliance with the License.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj *
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * or http://www.opensolaris.org/os/licensing.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * See the License for the specific language governing permissions
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * and limitations under the License.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj *
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * When distributing Covered Code, include this CDDL HEADER in each
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * If applicable, add the following below this CDDL HEADER, with the
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * fields enclosed by brackets "[]" replaced with your own identifying
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * information: Portions Copyright [yyyy] [name of copyright owner]
ae115bc77f6fcde83175c75b4206dc2e50747966mrj *
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * CDDL HEADER END
ae115bc77f6fcde83175c75b4206dc2e50747966mrj */
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj/*
7637dadd57efae7f94db9218336dbc2a838169ebmyers * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj * Use is subject to license terms.
ae115bc77f6fcde83175c75b4206dc2e50747966mrj */
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
3c5da275f68706f8301ea6c616a098430d84a71aMatthew Ahrens/*
3c5da275f68706f8301ea6c616a098430d84a71aMatthew Ahrens * Copyright (c) 2016 by Delphix. All rights reserved.
3c5da275f68706f8301ea6c616a098430d84a71aMatthew Ahrens */
3c5da275f68706f8301ea6c616a098430d84a71aMatthew Ahrens
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#ifndef _COMMON_UTIL_STRING_H
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#define _COMMON_UTIL_STRING_H
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#include <sys/types.h>
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#ifdef __cplusplus
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern "C" {
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#endif
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#if !defined(_KMDB) && (!defined(_BOOT) || defined(__sparc))
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern size_t vsnprintf(char *, size_t, const char *, va_list);
3c5da275f68706f8301ea6c616a098430d84a71aMatthew Ahrens/*PRINTFLIKE3*/
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern size_t snprintf(char *, size_t, const char *, ...);
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#if defined(_BOOT) && defined(__sparc)
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj/*PRINTFLIKE2*/
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern int sprintf(char *, const char *, ...);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern int vsprintf(char *, const char *, va_list);
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#endif /* _BOOT && __sparc */
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#endif /* !_KMDB && (!_BOOT || __sparc) */
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern char *strcat(char *, const char *);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern char *strchr(const char *, int);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern int strcmp(const char *, const char *);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern int strncmp(const char *, const char *, size_t);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern int strcasecmp(const char *, const char *);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern int strncasecmp(const char *, const char *, size_t);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern char *strcpy(char *, const char *);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern char *strncpy(char *, const char *, size_t);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern char *strrchr(const char *, int c);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern char *strstr(const char *, const char *);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern char *strpbrk(const char *, const char *);
0181461b79a0991f2269dad3ef978086e6c70257Keith M Wesolowskiextern char *strsep(char **, const char *);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern char *strncat(char *, const char *, size_t);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern size_t strlcat(char *, const char *, size_t);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern size_t strlcpy(char *, const char *, size_t);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern size_t strspn(const char *, const char *);
7637dadd57efae7f94db9218336dbc2a838169ebmyersextern size_t strnlen(const char *, size_t);
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#if defined(_BOOT) || defined(_KMDB)
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern char *strtok(char *, const char *);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern size_t strlen(const char *);
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#endif /* _BOOT || _KMDB */
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#ifdef _KERNEL
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern int strident_valid(const char *);
ae115bc77f6fcde83175c75b4206dc2e50747966mrjextern void strident_canon(char *, size_t);
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#endif /* _KERNEL */
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#ifdef __cplusplus
ae115bc77f6fcde83175c75b4206dc2e50747966mrj}
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#endif
ae115bc77f6fcde83175c75b4206dc2e50747966mrj
ae115bc77f6fcde83175c75b4206dc2e50747966mrj#endif /* _COMMON_UTIL_STRING_H */