xref: /titanic_44/usr/src/cmd/mdb/common/libstand/sys/salib.h (revision 4a6ec905b96eb96a398c346f59e034a90ce8ad37)
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 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #include <sys/types.h>
33 #include <time.h>
34 
35 #ifdef	__cplusplus
36 extern "C" {
37 #endif
38 
39 extern char *asctime(const struct tm *);
40 extern char *ctime(const time_t *);
41 
42 extern int bcmp(const void *, const void *, size_t);
43 extern void bcopy(const void *, void *, size_t);
44 extern void *bsearch(const void *, const void *, size_t, size_t,
45     int (*)(const void *, const void *));
46 extern void bzero(void *, size_t);
47 
48 extern int getopt(int, char *const [], const char *);
49 extern void getopt_reset(void);
50 
51 extern void *memchr(const void *, int, size_t);
52 extern int memcmp(const void *, const void *, size_t);
53 extern void *memcpy(void *, const void *, size_t);
54 extern void *memccpy(void *, const void *, int, size_t);
55 extern void *memmove(void *, const void *, size_t);
56 extern void *memset(void *, int, size_t);
57 
58 extern void qsort(void *, size_t, size_t, int (*)(const void *,
59     const void *));
60 
61 extern long strtol(const char *, char **, int);
62 extern unsigned long strtoul(const char *, char **, int);
63 extern char *strcat(char *, const char *);
64 extern char *strchr(const char *, int);
65 extern int strcmp(const char *, const char *);
66 extern char *strcpy(char *, const char *);
67 extern int strcasecmp(const char *, const char *);
68 extern int strncasecmp(const char *, const char *, size_t);
69 extern size_t strlcpy(char *, const char *, size_t);
70 extern size_t strlen(const char *);
71 extern char *strncat(char *, const char *, size_t);
72 extern size_t strlcat(char *, const char *, size_t);
73 extern int strncmp(const char *, const char *, size_t);
74 extern char *strncpy(char *, const char *, size_t);
75 extern char *strrchr(const char *, int);
76 extern char *strstr(const char *, const char *);
77 extern size_t strspn(const char *, const char *);
78 extern char *strpbrk(const char *, const char *);
79 extern char *strtok(char *, const char *);
80 
81 #ifndef	NULL
82 #define	NULL	(0)
83 #endif
84 
85 #ifdef	__cplusplus
86 }
87 #endif
88 
89 #endif	/* _SYS_SALIB_H */
90