1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License, Version 1.0 only 6 * (the "License"). You may not use this file except in compliance 7 * with the License. 8 * 9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10 * or http://www.opensolaris.org/os/licensing. 11 * See the License for the specific language governing permissions 12 * and limitations under the License. 13 * 14 * When distributing Covered Code, include this CDDL HEADER in each 15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16 * If applicable, add the following below this CDDL HEADER, with the 17 * fields enclosed by brackets "[]" replaced with your own identifying 18 * information: Portions Copyright [yyyy] [name of copyright owner] 19 * 20 * CDDL HEADER END 21 */ 22 /* 23 * Copyright 2005 Sun Microsystems, Inc. All rights reserved. 24 * Use is subject to license terms. 25 */ 26 27 #ifndef _SYS_SALIB_H 28 #define _SYS_SALIB_H 29 30 #include <sys/types.h> 31 #include <sys/null.h> 32 #include <time.h> 33 34 #ifdef __cplusplus 35 extern "C" { 36 #endif 37 38 extern char *asctime(const struct tm *); 39 extern char *ctime(const time_t *); 40 41 extern int bcmp(const void *, const void *, size_t); 42 extern void bcopy(const void *, void *, size_t); 43 extern void *bsearch(const void *, const void *, size_t, size_t, 44 int (*)(const void *, const void *)); 45 extern void bzero(void *, size_t); 46 47 extern int getopt(int, char *const [], const char *); 48 extern void getopt_reset(void); 49 50 extern void *memchr(const void *, int, size_t); 51 extern int memcmp(const void *, const void *, size_t); 52 extern void *memcpy(void *, const void *, size_t); 53 extern void *memccpy(void *, const void *, int, size_t); 54 extern void *memmove(void *, const void *, size_t); 55 extern void *memset(void *, int, size_t); 56 57 extern void qsort(void *, size_t, size_t, int (*)(const void *, 58 const void *)); 59 60 extern long strtol(const char *, char **, int); 61 extern unsigned long strtoul(const char *, char **, int); 62 extern char *strcat(char *, const char *); 63 extern char *strchr(const char *, int); 64 extern int strcmp(const char *, const char *); 65 extern char *strcpy(char *, const char *); 66 extern int strcasecmp(const char *, const char *); 67 extern int strncasecmp(const char *, const char *, size_t); 68 extern size_t strlcpy(char *, const char *, size_t); 69 extern size_t strlen(const char *); 70 extern char *strncat(char *, const char *, size_t); 71 extern size_t strlcat(char *, const char *, size_t); 72 extern int strncmp(const char *, const char *, size_t); 73 extern char *strncpy(char *, const char *, size_t); 74 extern char *strrchr(const char *, int); 75 extern char *strstr(const char *, const char *); 76 extern size_t strspn(const char *, const char *); 77 extern char *strpbrk(const char *, const char *); 78 extern char *strtok(char *, const char *); 79 80 #ifdef __cplusplus 81 } 82 #endif 83 84 #endif /* _SYS_SALIB_H */ 85