Rev 4921 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4921 | Rev 6099 | ||
---|---|---|---|
Line 36... | Line 36... | ||
36 | char *_EXFUN(strncpy,(char *__restrict, const char *__restrict, size_t)); |
36 | char *_EXFUN(strncpy,(char *__restrict, const char *__restrict, size_t)); |
37 | char *_EXFUN(strpbrk,(const char *, const char *)); |
37 | char *_EXFUN(strpbrk,(const char *, const char *)); |
38 | char *_EXFUN(strrchr,(const char *, int)); |
38 | char *_EXFUN(strrchr,(const char *, int)); |
39 | size_t _EXFUN(strspn,(const char *, const char *)); |
39 | size_t _EXFUN(strspn,(const char *, const char *)); |
40 | char *_EXFUN(strstr,(const char *, const char *)); |
40 | char *_EXFUN(strstr,(const char *, const char *)); |
41 | - | ||
42 | #ifndef _REENT_ONLY |
41 | #ifndef _REENT_ONLY |
43 | char *_EXFUN(strtok,(char *__restrict, const char *__restrict)); |
42 | char *_EXFUN(strtok,(char *__restrict, const char *__restrict)); |
44 | #endif |
43 | #endif |
45 | - | ||
46 | size_t _EXFUN(strxfrm,(char *__restrict, const char *__restrict, size_t)); |
44 | size_t _EXFUN(strxfrm,(char *__restrict, const char *__restrict, size_t)); |
Line 47... | Line 45... | ||
47 | 45 | ||
48 | #ifndef __STRICT_ANSI__ |
46 | #if __POSIX_VISIBLE |
49 | char *_EXFUN(strtok_r,(char *__restrict, const char *__restrict, char **__restrict)); |
47 | char *_EXFUN(strtok_r,(char *__restrict, const char *__restrict, char **__restrict)); |
- | 48 | #endif |
|
50 | 49 | #if __BSD_VISIBLE |
|
51 | int _EXFUN(bcmp,(const void *, const void *, size_t)); |
50 | int _EXFUN(bcmp,(const void *, const void *, size_t)); |
52 | void _EXFUN(bcopy,(const void *, void *, size_t)); |
51 | void _EXFUN(bcopy,(const void *, void *, size_t)); |
53 | void _EXFUN(bzero,(void *, size_t)); |
52 | void _EXFUN(bzero,(void *, size_t)); |
54 | int _EXFUN(ffs,(int)); |
53 | int _EXFUN(ffs,(int)); |
- | 54 | char *_EXFUN(index,(const char *, int)); |
|
- | 55 | #endif |
|
55 | char *_EXFUN(index,(const char *, int)); |
56 | #if __BSD_VISIBLE || __XSI_VISIBLE |
- | 57 | _PTR _EXFUN(memccpy,(_PTR __restrict, const _PTR __restrict, int, size_t)); |
|
- | 58 | #endif |
|
56 | _PTR _EXFUN(memccpy,(_PTR __restrict, const _PTR __restrict, int, size_t)); |
59 | #if __GNU_VISIBLE |
57 | _PTR _EXFUN(mempcpy,(_PTR, const _PTR, size_t)); |
60 | _PTR _EXFUN(mempcpy,(_PTR, const _PTR, size_t)); |
- | 61 | _PTR _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t)); |
|
58 | _PTR _EXFUN(memmem, (const _PTR, size_t, const _PTR, size_t)); |
62 | #endif |
- | 63 | _PTR _EXFUN(memrchr,(const _PTR, int, size_t)); |
|
59 | _PTR _EXFUN(memrchr,(const _PTR, int, size_t)); |
64 | #if __GNU_VISIBLE |
- | 65 | _PTR _EXFUN(rawmemchr,(const _PTR, int)); |
|
- | 66 | #endif |
|
60 | _PTR _EXFUN(rawmemchr,(const _PTR, int)); |
67 | #if __BSD_VISIBLE |
- | 68 | char *_EXFUN(rindex,(const char *, int)); |
|
61 | char *_EXFUN(rindex,(const char *, int)); |
69 | #endif |
62 | char *_EXFUN(stpcpy,(char *__restrict, const char *__restrict)); |
70 | char *_EXFUN(stpcpy,(char *__restrict, const char *__restrict)); |
- | 71 | char *_EXFUN(stpncpy,(char *__restrict, const char *__restrict, size_t)); |
|
63 | char *_EXFUN(stpncpy,(char *__restrict, const char *__restrict, size_t)); |
72 | #if __BSD_VISIBLE || __POSIX_VISIBLE |
- | 73 | int _EXFUN(strcasecmp,(const char *, const char *)); |
|
- | 74 | #endif |
|
64 | int _EXFUN(strcasecmp,(const char *, const char *)); |
75 | #if __GNU_VISIBLE |
65 | char *_EXFUN(strcasestr,(const char *, const char *)); |
76 | char *_EXFUN(strcasestr,(const char *, const char *)); |
66 | char *_EXFUN(strchrnul,(const char *, int)); |
77 | char *_EXFUN(strchrnul,(const char *, int)); |
67 | #endif |
78 | #endif |
68 | #if !defined(__STRICT_ANSI__) || (_XOPEN_SOURCE - 0) >= 500 |
79 | #if __XSI_VISIBLE >= 500 |
69 | char *_EXFUN(strdup,(const char *)); |
80 | char *_EXFUN(strdup,(const char *)); |
70 | #endif |
81 | #endif |
71 | #ifndef __STRICT_ANSI__ |
82 | #ifndef __STRICT_ANSI__ |
72 | char *_EXFUN(_strdup_r,(struct _reent *, const char *)); |
83 | char *_EXFUN(_strdup_r,(struct _reent *, const char *)); |
73 | #endif |
84 | #endif |
74 | #if !defined(__STRICT_ANSI__) || (_XOPEN_SOURCE - 0) >= 700 |
85 | #if __XSI_VISIBLE >= 700 |
75 | char *_EXFUN(strndup,(const char *, size_t)); |
86 | char *_EXFUN(strndup,(const char *, size_t)); |
- | 87 | #endif |
|
76 | #endif |
88 | |
77 | #ifndef __STRICT_ANSI__ |
89 | #ifndef __STRICT_ANSI__ |
- | 90 | char *_EXFUN(_strndup_r,(struct _reent *, const char *, size_t)); |
|
- | 91 | #endif |
|
- | 92 | ||
- | 93 | #if __GNU_VISIBLE |
|
- | 94 | int _EXFUN(ffsl,(long)); |
|
- | 95 | int _EXFUN(ffsll, (long long)); |
|
- | 96 | #endif |
|
78 | char *_EXFUN(_strndup_r,(struct _reent *, const char *, size_t)); |
97 | |
79 | /* There are two common strerror_r variants. If you request |
98 | /* There are two common strerror_r variants. If you request |
80 | _GNU_SOURCE, you get the GNU version; otherwise you get the POSIX |
99 | _GNU_SOURCE, you get the GNU version; otherwise you get the POSIX |
81 | version. POSIX requires that #undef strerror_r will still let you |
100 | version. POSIX requires that #undef strerror_r will still let you |
82 | invoke the underlying function, but that requires gcc support. */ |
101 | invoke the underlying function, but that requires gcc support. */ |
83 | #ifdef _GNU_SOURCE |
102 | #if __GNU_VISIBLE |
84 | char *_EXFUN(strerror_r,(int, char *, size_t)); |
103 | char *_EXFUN(strerror_r,(int, char *, size_t)); |
85 | #else |
104 | #else |
- | 105 | # ifdef __GNUC__ |
|
- | 106 | int _EXFUN(strerror_r,(int, char *, size_t)) |
|
86 | # ifdef __GNUC__ |
107 | #ifdef __ASMNAME |
- | 108 | __asm__ (__ASMNAME ("__xpg_strerror_r")) |
|
- | 109 | #endif |
|
87 | int _EXFUN(strerror_r,(int, char *, size_t)) __asm__ (__ASMNAME ("__xpg_strerror_r")); |
110 | ; |
88 | # else |
111 | # else |
89 | int _EXFUN(__xpg_strerror_r,(int, char *, size_t)); |
112 | int _EXFUN(__xpg_strerror_r,(int, char *, size_t)); |
90 | # define strerror_r __xpg_strerror_r |
113 | # define strerror_r __xpg_strerror_r |
91 | # endif |
114 | # endif |
- | 115 | #endif |
|
- | 116 | ||
- | 117 | /* Reentrant version of strerror. */ |
|
- | 118 | char * _EXFUN(_strerror_r, (struct _reent *, int, int, int *)); |
|
- | 119 | ||
92 | #endif |
120 | #if __BSD_VISIBLE |
93 | size_t _EXFUN(strlcat,(char *, const char *, size_t)); |
121 | size_t _EXFUN(strlcat,(char *, const char *, size_t)); |
- | 122 | size_t _EXFUN(strlcpy,(char *, const char *, size_t)); |
|
- | 123 | #endif |
|
94 | size_t _EXFUN(strlcpy,(char *, const char *, size_t)); |
124 | #if __BSD_VISIBLE || __POSIX_VISIBLE |
- | 125 | int _EXFUN(strncasecmp,(const char *, const char *, size_t)); |
|
- | 126 | #endif |
|
- | 127 | #if !defined(__STRICT_ANSI__) || __POSIX_VISIBLE >= 200809 || \ |
|
95 | int _EXFUN(strncasecmp,(const char *, const char *, size_t)); |
128 | __XSI_VISIBLE >= 700 |
- | 129 | size_t _EXFUN(strnlen,(const char *, size_t)); |
|
- | 130 | #endif |
|
96 | size_t _EXFUN(strnlen,(const char *, size_t)); |
131 | #if __BSD_VISIBLE |
- | 132 | char *_EXFUN(strsep,(char **, const char *)); |
|
- | 133 | #endif |
|
- | 134 | ||
- | 135 | /* |
|
- | 136 | * The origin of these is unknown to me so I am conditionalizing them |
|
- | 137 | * on __STRICT_ANSI__. Finetuning this is definitely needed. --joel |
|
- | 138 | */ |
|
97 | char *_EXFUN(strsep,(char **, const char *)); |
139 | #if !defined(__STRICT_ANSI__) |
98 | char *_EXFUN(strlwr,(char *)); |
140 | char *_EXFUN(strlwr,(char *)); |
- | 141 | char *_EXFUN(strupr,(char *)); |
|
- | 142 | #endif |
|
99 | char *_EXFUN(strupr,(char *)); |
143 | |
100 | #ifndef DEFS_H /* Kludge to work around problem compiling in gdb */ |
144 | #ifndef DEFS_H /* Kludge to work around problem compiling in gdb */ |
101 | char *_EXFUN(strsignal, (int __signo)); |
145 | char *_EXFUN(strsignal, (int __signo)); |
- | 146 | #endif |
|
102 | #endif |
147 | |
103 | #ifdef __CYGWIN__ |
148 | #ifdef __CYGWIN__ |
104 | int _EXFUN(strtosigno, (const char *__name)); |
149 | int _EXFUN(strtosigno, (const char *__name)); |
Line 105... | Line -... | ||
105 | #endif |
- | |
106 | - | ||
107 | /* Recursive version of strerror. */ |
- | |
108 | char * _EXFUN(_strerror_r, (struct _reent *, int, int, int *)); |
150 | #endif |
109 | 151 | ||
110 | #if defined _GNU_SOURCE && defined __GNUC__ |
152 | #if defined _GNU_SOURCE && defined __GNUC__ |
111 | #define strdupa(__s) \ |
153 | #define strdupa(__s) \ |
112 | (__extension__ ({const char *__in = (__s); \ |
154 | (__extension__ ({const char *__in = (__s); \ |
Line 119... | Line 161... | ||
119 | char *__out = (char *) __builtin_alloca (__len); \ |
161 | char *__out = (char *) __builtin_alloca (__len); \ |
120 | __out[__len-1] = '\0'; \ |
162 | __out[__len-1] = '\0'; \ |
121 | (char *) memcpy (__out, __in, __len-1);})) |
163 | (char *) memcpy (__out, __in, __len-1);})) |
122 | #endif /* _GNU_SOURCE && __GNUC__ */ |
164 | #endif /* _GNU_SOURCE && __GNUC__ */ |
Line 123... | Line 165... | ||
123 | 165 | ||
124 | /* These function names are used on Windows and perhaps other systems. */ |
166 | /* There are two common basename variants. If you do NOT #include |
125 | #ifndef strcmpi |
- | |
126 | #define strcmpi strcasecmp |
- | |
127 | #endif |
- | |
128 | #ifndef stricmp |
- | |
129 | #define stricmp strcasecmp |
- | |
130 | #endif |
- | |
131 | #ifndef strncmpi |
- | |
132 | #define strncmpi strncasecmp |
- | |
133 | #endif |
- | |
134 | #ifndef strnicmp |
- | |
135 | #define strnicmp strncasecmp |
- | |
Line -... | Line 167... | ||
- | 167 | and you do |
|
- | 168 | ||
- | 169 | #define _GNU_SOURCE |
|
- | 170 | #include |
|
- | 171 | ||
- | 172 | you get the GNU version. Otherwise you get the POSIX versionfor which you |
|
- | 173 | should #include |
|
- | 174 | #undef basename will still let you invoke the underlying function. However, |
|
- | 175 | this also implies that the POSIX version is used in this case. That's made |
|
136 | #endif |
176 | sure here. */ |
- | 177 | #if __GNU_VISIBLE && !defined(basename) |
|
- | 178 | # define basename basename |
|
Line 137... | Line 179... | ||
137 | 179 | char *_EXFUN(__nonnull (1) basename,(const char *)) __asm__(__ASMNAME("__gnu_basename")); |
|
Line 138... | Line 180... | ||
138 | #endif /* ! __STRICT_ANSI__ */ |
180 | #endif |