string.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 #ifndef _STRING_H
14 #define _STRING_H
15
16 #pragma ident "@(#)string.h 1.24 99/08/10 SMI" /* SVr4.0 1.7.1.12 */
17
18 #include
19
20 /*
21 * Allow global visibility for symbols defined in
22 * C++ "std" namespace in .
23 */
24 #if __cplusplus >= 199711L
25 using std::size_t;
26 using std::memchr;
27 using std::memcmp;
28 using std::memcpy;
29 using std::memmove;
30 using std::memset;
31 using std::strcat;
32 using std::strchr;
33 using std::strcmp;
34 using std::strcoll;
35 using std::strcpy;
36 using std::strcspn;
37 using std::strerror;
38 using std::strlen;
39 using std::strncat;
40 using std::strncmp;
41 using std::strncpy;
42 using std::strpbrk;
43 using std::strrchr;
44 using std::strspn;
45 using std::strstr;
46 using std::strtok;
47 using std::strxfrm;
48 #endif
49
50 #ifdef __cplusplus
51 extern "C" {
52 #endif
53
54 #if defined(__STDC__)
55
56 #if defined(__EXTENSIONS__) || defined(_REENTRANT) || \
57 (_POSIX_C_SOURCE - 0 >= 199506L)
58 extern char *strtok_r(char *, const char *, char **);
59 #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT) .. */
60
61 #if defined(__EXTENSIONS__) || __STDC__ == 0 || \
62 defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
63 extern void *memccpy(void *, const void *, int, size_t);
64 #endif
65
66 #if defined(__EXTENSIONS__) || (__STDC__ == 0 && \
67 !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE))
68 extern char *strsignal(int);
69 extern int ffs(int);
70 extern int strcasecmp(const char *, const char *);
71 extern int strncasecmp(const char *, const char *, size_t);
72 extern size_t strlcpy(char *, const char *, size_t);
73 extern size_t strlcat(char *, const char *, size_t);
74 #endif /* defined(__EXTENSIONS__)... */
75
76 #if defined(__EXTENSIONS__) || (__STDC__ == 0 && \
77 !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) || \
78 defined(_XPG4_2)
79 extern char *strdup(const char *);
80 #endif
81
82 #else /* __STDC__ */
83
84 #if defined(__EXTENSIONS__) || defined(_REENTRANT) || \
85 (_POSIX_C_SOURCE - 0 >= 199506L)
86 extern char *strtok_r();
87 #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT).. */
88
89 #if defined(__EXTENSIONS__) || __STDC__ == 0 || \
90 defined(_POSIX_C_SOURCE) || defined(_XOPEN_SOURCE)
91 extern void *memccpy();
92 #endif
93
94 #if defined(__EXTENSIONS__) || \
95 !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
96 extern char *strsignal();
97 extern int ffs();
98 extern int strcasecmp();
99 extern int strncasecmp();
100 extern size_t strlcpy();
101 extern size_t strlcat();
102 #endif /* defined(__EXTENSIONS__) ... */
103
104 #if defined(__EXTENSIONS__) || \
105 !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE) || \
106 defined(_XPG4_2)
107 extern char *strdup();
108 #endif
109
110 #endif /* __STDC__ */
111
112 #ifdef __cplusplus
113 }
114 #endif
115
116 #endif /* _STRING_H */