iso/string_iso.h
1 /* Copyright (c) 1988 AT&T */
2 /* All Rights Reserved */
3
4 /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T */
5 /* The copyright notice above does not evidence any */
6 /* actual or intended publication of such source code. */
7
8 /*
9 * Copyright (c) 1996-1999, by Sun Microsystems, Inc.
10 * All rights reserved.
11 */
12
13 /*
14 * An application should not include this header directly. Instead it
15 * should be included only through the inclusion of other Sun headers.
16 *
17 * The contents of this header is limited to identifiers specified in the
18 * C Standard. Any new identifiers specified in future amendments to the
19 * C Standard must be placed in this header. If these new identifiers
20 * are required to also be in the C++ Standard "std" namespace, then for
21 * anything other than macro definitions, corresponding "using" directives
22 * must also be added to .
23 */
24
25 #ifndef _ISO_STRING_ISO_H
26 #define _ISO_STRING_ISO_H
27
28 #pragma ident "@(#)string_iso.h 1.2 99/11/09 SMI"
29 /* SVr4.0 1.7.1.12 */
30
31 #include
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36
37 #if __cplusplus >= 199711L
38 namespace std {
39 #endif
40
41 #if !defined(_SIZE_T) || __cplusplus >= 199711L
42 #define _SIZE_T
43 #if defined(_LP64) || defined(_I32LPx)
44 typedef unsigned long size_t; /* size of something in bytes */
45 #else
46 typedef unsigned int size_t; /* (historical version) */
47 #endif
48 #endif /* !_SIZE_T */
49
50 #ifndef NULL
51 #if defined(_LP64) && !defined(__cplusplus)
52 #define NULL 0L
53 #else
54 #define NULL 0
55 #endif
56 #endif
57
58 #if defined(__STDC__)
59
60 extern int memcmp(const void *, const void *, size_t);
61 extern void *memcpy(void *, const void *, size_t);
62 extern void *memmove(void *, const void *, size_t);
63 extern void *memset(void *, int, size_t);
64 extern char *strcat(char *, const char *);
65 extern int strcmp(const char *, const char *);
66 extern char *strcpy(char *, const char *);
67 extern int strcoll(const char *, const char *);
68 extern size_t strcspn(const char *, const char *);
69 extern char *strerror(int);
70 extern size_t strlen(const char *);
71 extern char *strncat(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 size_t strspn(const char *, const char *);
75 extern char *strtok(char *, const char *);
76 extern size_t strxfrm(char *, const char *, size_t);
77 #if __cplusplus >= 199711L
78 extern const char *strchr(const char *, int);
79 extern "C++" {
80 inline char *strchr(char *__s, int __c) {
81 return (char *)strchr((const char *)__s, __c);
82 }
83 }
84 extern const char *strpbrk(const char *, const char *);
85 extern "C++" {
86 inline char * strpbrk(char *__s1, const char *__s2) {
87 return (char *)strpbrk((const char *)__s1, __s2);
88 }
89 }
90 extern const char *strrchr(const char *, int);
91 extern "C++" {
92 inline char * strrchr(char *__s, int __c) {
93 return (char *)strrchr((const char *)__s, __c);
94 }
95 }
96 extern const char *strstr(const char *, const char *);
97 extern "C++" {
98 inline char *strstr(char *__s1, const char *__s2) {
99 return (char *)strstr((const char *)__s1, __s2);
100 }
101 }
102 extern const void *memchr(const void *, int, size_t);
103 #ifndef _MEMCHR_INLINE
104 #define _MEMCHR_INLINE
105 extern "C++" {
106 inline void* memchr(void * __s, int __c, size_t __n) {
107 return (void *)memchr((const void *)__s, __c, __n);
108 }
109 }
110 #endif /* _MEMCHR_INLINE */
111 #else /* __cplusplus >= 199711L */
112 extern void *memchr(const void *, int, size_t);
113 extern char *strchr(const char *, int);
114 extern char *strpbrk(const char *, const char *);
115 extern char *strrchr(const char *, int);
116 extern char *strstr(const char *, const char *);
117 #endif /* __cplusplus >= 199711L */
118
119 #else /* __STDC__ */
120
121 extern void *memchr();
122 extern int memcmp();
123 extern void *memcpy();
124 extern void *memmove();
125 extern void *memset();
126 extern char *strcat();
127 extern char *strchr();
128 extern int strcmp();
129 extern int strcoll();
130 extern char *strcpy();
131 extern size_t strcspn();
132 extern char *strerror();
133 extern size_t strlen();
134 extern char *strncat();
135 extern int strncmp();
136 extern char *strncpy();
137 extern char *strpbrk();
138 extern char *strrchr();
139 extern size_t strspn();
140 extern char *strstr();
141 extern char *strtok();
142 extern size_t strxfrm();
143
144 #endif /* __STDC__ */
145
146 #if __cplusplus >= 199711L
147 }
148 #endif /* end of namespace std */
149
150 #ifdef __cplusplus
151 }
152 #endif
153
154 #endif /* _ISO_STRING_ISO_H */