string.h revision 1.33.4.2 1 1.33.4.2 kristerw /* $NetBSD: string.h,v 1.33.4.2 2007/08/02 21:49:11 kristerw Exp $ */
2 1.33.4.2 kristerw
3 1.33.4.2 kristerw /*-
4 1.33.4.2 kristerw * Copyright (c) 1990, 1993
5 1.33.4.2 kristerw * The Regents of the University of California. All rights reserved.
6 1.33.4.2 kristerw *
7 1.33.4.2 kristerw * Redistribution and use in source and binary forms, with or without
8 1.33.4.2 kristerw * modification, are permitted provided that the following conditions
9 1.33.4.2 kristerw * are met:
10 1.33.4.2 kristerw * 1. Redistributions of source code must retain the above copyright
11 1.33.4.2 kristerw * notice, this list of conditions and the following disclaimer.
12 1.33.4.2 kristerw * 2. Redistributions in binary form must reproduce the above copyright
13 1.33.4.2 kristerw * notice, this list of conditions and the following disclaimer in the
14 1.33.4.2 kristerw * documentation and/or other materials provided with the distribution.
15 1.33.4.2 kristerw * 3. Neither the name of the University nor the names of its contributors
16 1.33.4.2 kristerw * may be used to endorse or promote products derived from this software
17 1.33.4.2 kristerw * without specific prior written permission.
18 1.33.4.2 kristerw *
19 1.33.4.2 kristerw * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 1.33.4.2 kristerw * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 1.33.4.2 kristerw * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 1.33.4.2 kristerw * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 1.33.4.2 kristerw * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 1.33.4.2 kristerw * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 1.33.4.2 kristerw * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 1.33.4.2 kristerw * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 1.33.4.2 kristerw * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 1.33.4.2 kristerw * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 1.33.4.2 kristerw * SUCH DAMAGE.
30 1.33.4.2 kristerw *
31 1.33.4.2 kristerw * @(#)string.h 8.1 (Berkeley) 6/2/93
32 1.33.4.2 kristerw */
33 1.33.4.2 kristerw
34 1.33.4.2 kristerw #ifndef _STRING_H_
35 1.33.4.2 kristerw #define _STRING_H_
36 1.33.4.2 kristerw #include <machine/ansi.h>
37 1.33.4.2 kristerw
38 1.33.4.2 kristerw #ifdef _BSD_SIZE_T_
39 1.33.4.2 kristerw typedef _BSD_SIZE_T_ size_t;
40 1.33.4.2 kristerw #undef _BSD_SIZE_T_
41 1.33.4.2 kristerw #endif
42 1.33.4.2 kristerw
43 1.33.4.2 kristerw #include <sys/null.h>
44 1.33.4.2 kristerw
45 1.33.4.2 kristerw #include <sys/cdefs.h>
46 1.33.4.2 kristerw #include <sys/featuretest.h>
47 1.33.4.2 kristerw
48 1.33.4.2 kristerw __BEGIN_DECLS
49 1.33.4.2 kristerw void *memchr(const void *, int, size_t);
50 1.33.4.2 kristerw int memcmp(const void *, const void *, size_t);
51 1.33.4.2 kristerw void *memcpy(void * __restrict, const void * __restrict, size_t);
52 1.33.4.2 kristerw void *memmove(void *, const void *, size_t);
53 1.33.4.2 kristerw void *memset(void *, int, size_t);
54 1.33.4.2 kristerw char *strcat(char * __restrict, const char * __restrict);
55 1.33.4.2 kristerw char *strchr(const char *, int);
56 1.33.4.2 kristerw int strcmp(const char *, const char *);
57 1.33.4.2 kristerw int strcoll(const char *, const char *);
58 1.33.4.2 kristerw char *strcpy(char * __restrict, const char * __restrict);
59 1.33.4.2 kristerw size_t strcspn(const char *, const char *);
60 1.33.4.2 kristerw __aconst char *strerror(int);
61 1.33.4.2 kristerw size_t strlen(const char *);
62 1.33.4.2 kristerw char *strncat(char * __restrict, const char * __restrict, size_t);
63 1.33.4.2 kristerw int strncmp(const char *, const char *, size_t);
64 1.33.4.2 kristerw char *strncpy(char * __restrict, const char * __restrict, size_t);
65 1.33.4.2 kristerw char *strpbrk(const char *, const char *);
66 1.33.4.2 kristerw char *strrchr(const char *, int);
67 1.33.4.2 kristerw size_t strspn(const char *, const char *);
68 1.33.4.2 kristerw char *strstr(const char *, const char *);
69 1.33.4.2 kristerw char *strtok(char * __restrict, const char * __restrict);
70 1.33.4.2 kristerw #if (_POSIX_C_SOURCE - 0 >= 199506L) || (_XOPEN_SOURCE - 0 >= 500) || \
71 1.33.4.2 kristerw defined(_REENTRANT) || defined(_NETBSD_SOURCE)
72 1.33.4.2 kristerw char *strtok_r(char *, const char *, char **);
73 1.33.4.2 kristerw int strerror_r(int, char *, size_t);
74 1.33.4.2 kristerw #endif /* _POSIX_C_SOURCE >= 199506 || XOPEN_SOURCE >= 500 || ... */
75 1.33.4.2 kristerw size_t strxfrm(char * __restrict, const char * __restrict, size_t);
76 1.33.4.2 kristerw
77 1.33.4.2 kristerw #if defined(_XOPEN_SOURCE) || defined(_NETBSD_SOURCE)
78 1.33.4.2 kristerw void *memccpy(void *, const void *, int, size_t);
79 1.33.4.2 kristerw char *strdup(const char *);
80 1.33.4.2 kristerw #endif
81 1.33.4.2 kristerw
82 1.33.4.2 kristerw #if defined(_NETBSD_SOURCE)
83 1.33.4.2 kristerw #include <strings.h> /* for backwards-compatibilty */
84 1.33.4.2 kristerw void *memmem(const void *, size_t, const void *, size_t);
85 1.33.4.2 kristerw char *strcasestr(const char *, const char *);
86 1.33.4.2 kristerw size_t strlcat(char *, const char *, size_t);
87 1.33.4.2 kristerw size_t strlcpy(char *, const char *, size_t);
88 1.33.4.2 kristerw char *strsep(char **, const char *);
89 1.33.4.2 kristerw char *stresep(char **, const char *, int);
90 1.33.4.2 kristerw char *strndup(const char *, size_t);
91 1.33.4.2 kristerw #endif
92 1.33.4.2 kristerw __END_DECLS
93 1.33.4.2 kristerw
94 1.33.4.2 kristerw #if _FORTIFY_SOURCE > 0
95 1.33.4.2 kristerw #include <ssp/string.h>
96 1.33.4.2 kristerw #endif
97 1.33.4.2 kristerw #endif /* !defined(_STRING_H_) */
98