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 /* Copyright (c) 1988 AT&T */
23 /* All Rights Reserved */
24
25
26 /*
27 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
28 * Use is subject to license terms.
29 */
30
31 /*
32 * An application should not include this header directly. Instead it
33 * should be included only through the inclusion of other Sun headers.
34 *
35 * The contents of this header is limited to identifiers specified in the
36 * C Standard. Any new identifiers specified in future amendments to the
37 * C Standard must be placed in this header. If these new identifiers
38 * are required to also be in the C++ Standard "std" namespace, then for
39 * anything other than macro definitions, corresponding "using" directives
40 * must also be added to <string.h>.
41 */
42
43 #ifndef _ISO_STRING_ISO_H
44 #define _ISO_STRING_ISO_H
45
46 #pragma ident "%Z%%M% %I% %E% SMI"
47
48 #include <sys/feature_tests.h>
49
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 #if __cplusplus >= 199711L
55 namespace std {
56 #endif
57
58 #if !defined(_SIZE_T) || __cplusplus >= 199711L
59 #define _SIZE_T
60 #if defined(_LP64) || defined(_I32LPx)
61 typedef unsigned long size_t; /* size of something in bytes */
62 #else
63 typedef unsigned int size_t; /* (historical version) */
64 #endif
65 #endif /* !_SIZE_T */
66
67 #ifndef NULL
68 #if defined(_LP64)
69 #define NULL 0L
70 #else
71 #define NULL 0
72 #endif
73 #endif
74
75 #if defined(__STDC__)
76
77 extern int memcmp(const void *, const void *, size_t);
78 extern void *memcpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD, size_t);
79 extern void *memmove(void *, const void *, size_t);
80 extern void *memset(void *, int, size_t);
81 extern char *strcat(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
82 extern int strcmp(const char *, const char *);
83 extern char *strcpy(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
84 extern int strcoll(const char *, const char *);
85 extern size_t strcspn(const char *, const char *);
86 extern char *strerror(int);
87 extern size_t strlen(const char *);
88 extern char *strncat(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
89 extern int strncmp(const char *, const char *, size_t);
90 extern char *strncpy(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
91 extern size_t strspn(const char *, const char *);
92 extern char *strtok(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
93 extern size_t strxfrm(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
94
95 /*
96 * The C++ Standard (ISO/IEC 14882:1998) specifies that each of the
134 }
135 }
136 #endif /* _STRRCHR_INLINE */
137 extern const char *strstr(const char *, const char *);
138 #ifndef _STRSTR_INLINE
139 #define _STRSTR_INLINE
140 extern "C++" {
141 inline char *strstr(char *__s1, const char *__s2) {
142 return (char *)strstr((const char *)__s1, __s2);
143 }
144 }
145 #endif /* _STRSTR_INLINE */
146 #else /* __cplusplus >= 199711L */
147 extern void *memchr(const void *, int, size_t);
148 extern char *strchr(const char *, int);
149 extern char *strpbrk(const char *, const char *);
150 extern char *strrchr(const char *, int);
151 extern char *strstr(const char *, const char *);
152 #endif /* __cplusplus >= 199711L */
153
154 #else /* __STDC__ */
155
156 extern void *memchr();
157 extern int memcmp();
158 extern void *memcpy();
159 extern void *memmove();
160 extern void *memset();
161 extern char *strcat();
162 extern char *strchr();
163 extern int strcmp();
164 extern int strcoll();
165 extern char *strcpy();
166 extern size_t strcspn();
167 extern char *strerror();
168 extern size_t strlen();
169 extern char *strncat();
170 extern int strncmp();
171 extern char *strncpy();
172 extern char *strpbrk();
173 extern char *strrchr();
174 extern size_t strspn();
175 extern char *strstr();
176 extern char *strtok();
177 extern size_t strxfrm();
178
179 #endif /* __STDC__ */
180
181 #if __cplusplus >= 199711L
182 }
183 #endif /* end of namespace std */
184
185 #ifdef __cplusplus
186 }
187 #endif
188
189 #endif /* _ISO_STRING_ISO_H */
|
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 /* Copyright (c) 1988 AT&T */
23 /* All Rights Reserved */
24
25
26 /*
27 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
28 *
29 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
30 * Use is subject to license terms.
31 */
32
33 /*
34 * An application should not include this header directly. Instead it
35 * should be included only through the inclusion of other Sun headers.
36 *
37 * The contents of this header is limited to identifiers specified in the
38 * C Standard. Any new identifiers specified in future amendments to the
39 * C Standard must be placed in this header. If these new identifiers
40 * are required to also be in the C++ Standard "std" namespace, then for
41 * anything other than macro definitions, corresponding "using" directives
42 * must also be added to <string.h>.
43 */
44
45 #ifndef _ISO_STRING_ISO_H
46 #define _ISO_STRING_ISO_H
47
48 #include <sys/feature_tests.h>
49
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 #if __cplusplus >= 199711L
55 namespace std {
56 #endif
57
58 #if !defined(_SIZE_T) || __cplusplus >= 199711L
59 #define _SIZE_T
60 #if defined(_LP64) || defined(_I32LPx)
61 typedef unsigned long size_t; /* size of something in bytes */
62 #else
63 typedef unsigned int size_t; /* (historical version) */
64 #endif
65 #endif /* !_SIZE_T */
66
67 #ifndef NULL
68 #if defined(_LP64)
69 #define NULL 0L
70 #else
71 #define NULL 0
72 #endif
73 #endif
74
75 extern int memcmp(const void *, const void *, size_t);
76 extern void *memcpy(void *_RESTRICT_KYWD, const void *_RESTRICT_KYWD, size_t);
77 extern void *memmove(void *, const void *, size_t);
78 extern void *memset(void *, int, size_t);
79 extern char *strcat(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
80 extern int strcmp(const char *, const char *);
81 extern char *strcpy(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
82 extern int strcoll(const char *, const char *);
83 extern size_t strcspn(const char *, const char *);
84 extern char *strerror(int);
85 extern size_t strlen(const char *);
86 extern char *strncat(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
87 extern int strncmp(const char *, const char *, size_t);
88 extern char *strncpy(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
89 extern size_t strspn(const char *, const char *);
90 extern char *strtok(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD);
91 extern size_t strxfrm(char *_RESTRICT_KYWD, const char *_RESTRICT_KYWD, size_t);
92
93 /*
94 * The C++ Standard (ISO/IEC 14882:1998) specifies that each of the
132 }
133 }
134 #endif /* _STRRCHR_INLINE */
135 extern const char *strstr(const char *, const char *);
136 #ifndef _STRSTR_INLINE
137 #define _STRSTR_INLINE
138 extern "C++" {
139 inline char *strstr(char *__s1, const char *__s2) {
140 return (char *)strstr((const char *)__s1, __s2);
141 }
142 }
143 #endif /* _STRSTR_INLINE */
144 #else /* __cplusplus >= 199711L */
145 extern void *memchr(const void *, int, size_t);
146 extern char *strchr(const char *, int);
147 extern char *strpbrk(const char *, const char *);
148 extern char *strrchr(const char *, int);
149 extern char *strstr(const char *, const char *);
150 #endif /* __cplusplus >= 199711L */
151
152 #if __cplusplus >= 199711L
153 }
154 #endif /* end of namespace std */
155
156 #ifdef __cplusplus
157 }
158 #endif
159
160 #endif /* _ISO_STRING_ISO_H */
|