]>
Commit | Line | Data |
---|---|---|
5b2abdfb | 1 | /* |
b5d655f7 | 2 | * Copyright (c) 2000, 2002 - 2008 Apple Inc. All rights reserved. |
5b2abdfb A |
3 | * |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
734aad71 A |
6 | * This file contains Original Code and/or Modifications of Original Code |
7 | * as defined in and that are subject to the Apple Public Source License | |
8 | * Version 2.0 (the 'License'). You may not use this file except in | |
9 | * compliance with the License. Please obtain a copy of the License at | |
10 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
11 | * file. | |
12 | * | |
13 | * The Original Code and all software distributed under the License are | |
14 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
5b2abdfb A |
15 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
16 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
734aad71 A |
17 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
18 | * Please see the License for the specific language governing rights and | |
19 | * limitations under the License. | |
5b2abdfb A |
20 | * |
21 | * @APPLE_LICENSE_HEADER_END@ | |
22 | */ | |
23 | /*- | |
24 | * Copyright (c) 1990, 1993 | |
25 | * The Regents of the University of California. All rights reserved. | |
26 | * | |
27 | * Redistribution and use in source and binary forms, with or without | |
28 | * modification, are permitted provided that the following conditions | |
29 | * are met: | |
30 | * 1. Redistributions of source code must retain the above copyright | |
31 | * notice, this list of conditions and the following disclaimer. | |
32 | * 2. Redistributions in binary form must reproduce the above copyright | |
33 | * notice, this list of conditions and the following disclaimer in the | |
34 | * documentation and/or other materials provided with the distribution. | |
35 | * 3. All advertising materials mentioning features or use of this software | |
36 | * must display the following acknowledgement: | |
37 | * This product includes software developed by the University of | |
38 | * California, Berkeley and its contributors. | |
39 | * 4. Neither the name of the University nor the names of its contributors | |
40 | * may be used to endorse or promote products derived from this software | |
41 | * without specific prior written permission. | |
42 | * | |
43 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND | |
44 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | |
45 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | |
46 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | |
47 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
48 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | |
49 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
50 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
51 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
52 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
53 | * SUCH DAMAGE. | |
54 | * | |
55 | * @(#)stdlib.h 8.5 (Berkeley) 5/19/95 | |
56 | */ | |
57 | ||
58 | #ifndef _STDLIB_H_ | |
59 | #define _STDLIB_H_ | |
60 | ||
b5d655f7 | 61 | #include <Availability.h> |
224c7076 | 62 | |
3d9156a7 A |
63 | #include <_types.h> |
64 | #if !defined(_ANSI_SOURCE) | |
65 | #include <sys/wait.h> | |
224c7076 | 66 | #if (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) |
9385eb3d | 67 | #include <alloca.h> |
224c7076 | 68 | #endif /* (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ |
3d9156a7 | 69 | #endif /* !_ANSI_SOURCE */ |
5b2abdfb | 70 | |
3d9156a7 A |
71 | /* DO NOT REMOVE THIS COMMENT: fixincludes needs to see: |
72 | * _GCC_SIZE_T */ | |
6465356a | 73 | #include <sys/_types/_size_t.h> |
5b2abdfb | 74 | |
224c7076 | 75 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) |
6465356a A |
76 | #include <sys/_types/_ct_rune_t.h> |
77 | #include <sys/_types/_rune_t.h> | |
224c7076 | 78 | #endif /* !_ANSI_SOURCE && (!_POSIX_C_SOURCE || _DARWIN_C_SOURCE) */ |
5b2abdfb | 79 | |
6465356a | 80 | #include <sys/_types/_wchar_t.h> |
9385eb3d | 81 | |
5b2abdfb A |
82 | typedef struct { |
83 | int quot; /* quotient */ | |
84 | int rem; /* remainder */ | |
85 | } div_t; | |
86 | ||
87 | typedef struct { | |
88 | long quot; /* quotient */ | |
89 | long rem; /* remainder */ | |
90 | } ldiv_t; | |
91 | ||
3d9156a7 A |
92 | #if !__DARWIN_NO_LONG_LONG |
93 | typedef struct { | |
94 | long long quot; | |
95 | long long rem; | |
96 | } lldiv_t; | |
97 | #endif /* !__DARWIN_NO_LONG_LONG */ | |
98 | ||
6465356a | 99 | #include <sys/_types/_null.h> |
5b2abdfb A |
100 | |
101 | #define EXIT_FAILURE 1 | |
102 | #define EXIT_SUCCESS 0 | |
103 | ||
104 | #define RAND_MAX 0x7fffffff | |
105 | ||
3d9156a7 A |
106 | #ifdef _USE_EXTENDED_LOCALES_ |
107 | #include <_xlocale.h> | |
108 | #endif /* _USE_EXTENDED_LOCALES_ */ | |
109 | ||
110 | #ifndef MB_CUR_MAX | |
111 | #ifdef _USE_EXTENDED_LOCALES_ | |
112 | #define MB_CUR_MAX (___mb_cur_max()) | |
113 | #ifndef MB_CUR_MAX_L | |
114 | #define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) | |
115 | #endif /* !MB_CUR_MAX_L */ | |
116 | #else /* !_USE_EXTENDED_LOCALES_ */ | |
5b2abdfb A |
117 | extern int __mb_cur_max; |
118 | #define MB_CUR_MAX __mb_cur_max | |
3d9156a7 A |
119 | #endif /* _USE_EXTENDED_LOCALES_ */ |
120 | #endif /* MB_CUR_MAX */ | |
5b2abdfb | 121 | |
224c7076 | 122 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) \ |
3d9156a7 A |
123 | && defined(_USE_EXTENDED_LOCALES_) && !defined(MB_CUR_MAX_L) |
124 | #define MB_CUR_MAX_L(x) (___mb_cur_max_l(x)) | |
125 | #endif | |
34e8f829 | 126 | //Begin-Libc |
5f125488 | 127 | #include "libc_private.h" |
34e8f829 A |
128 | /* f must be a literal string */ |
129 | #define LIBC_ABORT(f,...) abort_report_np("%s:%s:%u: " f, __FILE__, __func__, __LINE__, ## __VA_ARGS__) | |
130 | //End-Libc | |
5b2abdfb A |
131 | |
132 | __BEGIN_DECLS | |
9385eb3d A |
133 | void abort(void) __dead2; |
134 | int abs(int) __pure2; | |
135 | int atexit(void (*)(void)); | |
136 | double atof(const char *); | |
137 | int atoi(const char *); | |
138 | long atol(const char *); | |
3d9156a7 A |
139 | #if !__DARWIN_NO_LONG_LONG |
140 | long long | |
141 | atoll(const char *); | |
142 | #endif /* !__DARWIN_NO_LONG_LONG */ | |
9385eb3d A |
143 | void *bsearch(const void *, const void *, size_t, |
144 | size_t, int (*)(const void *, const void *)); | |
145 | void *calloc(size_t, size_t); | |
146 | div_t div(int, int) __pure2; | |
147 | void exit(int) __dead2; | |
148 | void free(void *); | |
149 | char *getenv(const char *); | |
150 | long labs(long) __pure2; | |
151 | ldiv_t ldiv(long, long) __pure2; | |
3d9156a7 A |
152 | #if !__DARWIN_NO_LONG_LONG |
153 | long long | |
154 | llabs(long long); | |
155 | lldiv_t lldiv(long long, long long); | |
156 | #endif /* !__DARWIN_NO_LONG_LONG */ | |
9385eb3d A |
157 | void *malloc(size_t); |
158 | int mblen(const char *, size_t); | |
159 | size_t mbstowcs(wchar_t * __restrict , const char * __restrict, size_t); | |
160 | int mbtowc(wchar_t * __restrict, const char * __restrict, size_t); | |
1f2f436a | 161 | int posix_memalign(void **, size_t, size_t) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_0); |
9385eb3d A |
162 | void qsort(void *, size_t, size_t, |
163 | int (*)(const void *, const void *)); | |
164 | int rand(void); | |
165 | void *realloc(void *, size_t); | |
166 | void srand(unsigned); | |
224c7076 A |
167 | double strtod(const char *, char **) __DARWIN_ALIAS(strtod); |
168 | float strtof(const char *, char **) __DARWIN_ALIAS(strtof); | |
9385eb3d A |
169 | long strtol(const char *, char **, int); |
170 | long double | |
ad3c9f2a | 171 | strtold(const char *, char **); |
3d9156a7 A |
172 | #if !__DARWIN_NO_LONG_LONG |
173 | long long | |
174 | strtoll(const char *, char **, int); | |
175 | #endif /* !__DARWIN_NO_LONG_LONG */ | |
5b2abdfb | 176 | unsigned long |
9385eb3d | 177 | strtoul(const char *, char **, int); |
3d9156a7 A |
178 | #if !__DARWIN_NO_LONG_LONG |
179 | unsigned long long | |
180 | strtoull(const char *, char **, int); | |
181 | #endif /* !__DARWIN_NO_LONG_LONG */ | |
224c7076 A |
182 | //Begin-Libc |
183 | #ifndef LIBC_ALIAS_SYSTEM | |
184 | //End-Libc | |
5f125488 | 185 | int system(const char *) __DARWIN_ALIAS_C(system) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0,__MAC_NA,__IPHONE_2_0,__IPHONE_8_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED; |
224c7076 A |
186 | //Begin-Libc |
187 | #else /* LIBC_ALIAS_SYSTEM */ | |
188 | int system(const char *) LIBC_ALIAS_C(system); | |
189 | #endif /* !LIBC_ALIAS_SYSTEM */ | |
190 | //End-Libc | |
9385eb3d | 191 | size_t wcstombs(char * __restrict, const wchar_t * __restrict, size_t); |
3d9156a7 | 192 | int wctomb(char *, wchar_t); |
5b2abdfb A |
193 | |
194 | #ifndef _ANSI_SOURCE | |
3d9156a7 A |
195 | void _Exit(int) __dead2; |
196 | long a64l(const char *); | |
9385eb3d | 197 | double drand48(void); |
3d9156a7 | 198 | char *ecvt(double, int, int *__restrict, int *__restrict); /* LEGACY */ |
9385eb3d | 199 | double erand48(unsigned short[3]); |
3d9156a7 A |
200 | char *fcvt(double, int, int *__restrict, int *__restrict); /* LEGACY */ |
201 | char *gcvt(double, int, char *); /* LEGACY */ | |
202 | int getsubopt(char **, char * const *, char **); | |
203 | int grantpt(int); | |
204 | #if __DARWIN_UNIX03 | |
205 | char *initstate(unsigned, char *, size_t); /* no __DARWIN_ALIAS needed */ | |
206 | #else /* !__DARWIN_UNIX03 */ | |
207 | char *initstate(unsigned long, char *, long); | |
208 | #endif /* __DARWIN_UNIX03 */ | |
9385eb3d | 209 | long jrand48(unsigned short[3]); |
3d9156a7 | 210 | char *l64a(long); |
9385eb3d A |
211 | void lcong48(unsigned short[7]); |
212 | long lrand48(void); | |
3d9156a7 A |
213 | char *mktemp(char *); |
214 | int mkstemp(char *); | |
9385eb3d A |
215 | long mrand48(void); |
216 | long nrand48(unsigned short[3]); | |
3d9156a7 A |
217 | int posix_openpt(int); |
218 | char *ptsname(int); | |
224c7076 A |
219 | //Begin-Libc |
220 | #ifndef LIBC_ALIAS_PUTENV | |
221 | //End-Libc | |
3d9156a7 | 222 | int putenv(char *) __DARWIN_ALIAS(putenv); |
224c7076 A |
223 | //Begin-Libc |
224 | #else /* LIBC_ALIAS_PUTENV */ | |
225 | int putenv(char *) LIBC_ALIAS(putenv); | |
226 | #endif /* !LIBC_ALIAS_PUTENV */ | |
227 | //End-Libc | |
3d9156a7 | 228 | long random(void); |
224c7076 A |
229 | int rand_r(unsigned *); |
230 | //Begin-Libc | |
231 | #ifdef __LIBC__ | |
232 | #ifndef LIBC_ALIAS_REALPATH | |
233 | char *realpath(const char * __restrict, char * __restrict) __DARWIN_EXTSN(realpath); | |
234 | #else /* LIBC_ALIAS_REALPATH */ | |
235 | #ifdef VARIANT_DARWINEXTSN | |
236 | char *realpath(const char * __restrict, char * __restrict) LIBC_EXTSN(realpath); | |
237 | #else /* !VARIANT_DARWINEXTSN */ | |
238 | char *realpath(const char * __restrict, char * __restrict) LIBC_ALIAS(realpath); | |
239 | #endif /* VARIANT_DARWINEXTSN */ | |
240 | #endif /* !LIBC_ALIAS_REALPATH */ | |
241 | #else /* !__LIBC__ */ | |
242 | //End-Libc | |
243 | #if (__DARWIN_UNIX03 && !defined(_POSIX_C_SOURCE)) || defined(_DARWIN_C_SOURCE) || defined(_DARWIN_BETTER_REALPATH) | |
244 | char *realpath(const char * __restrict, char * __restrict) __DARWIN_EXTSN(realpath); | |
245 | #else /* (!__DARWIN_UNIX03 || _POSIX_C_SOURCE) && !_DARWIN_C_SOURCE && !_DARWIN_BETTER_REALPATH */ | |
246 | char *realpath(const char * __restrict, char * __restrict) __DARWIN_ALIAS(realpath); | |
247 | #endif /* (__DARWIN_UNIX03 && _POSIX_C_SOURCE) || _DARWIN_C_SOURCE || _DARWIN_BETTER_REALPATH */ | |
248 | //Begin-Libc | |
249 | #endif /* __LIBC__ */ | |
250 | //End-Libc | |
9385eb3d A |
251 | unsigned short |
252 | *seed48(unsigned short[3]); | |
224c7076 A |
253 | //Begin-Libc |
254 | #ifndef LIBC_ALIAS_SETENV | |
255 | //End-Libc | |
3d9156a7 | 256 | int setenv(const char *, const char *, int) __DARWIN_ALIAS(setenv); |
224c7076 A |
257 | //Begin-Libc |
258 | #else /* LIBC_ALIAS_SETENV */ | |
259 | int setenv(const char *, const char *, int) LIBC_ALIAS(setenv); | |
260 | #endif /* !LIBC_ALIAS_SETENV */ | |
261 | //End-Libc | |
3d9156a7 | 262 | #if __DARWIN_UNIX03 |
224c7076 A |
263 | //Begin-Libc |
264 | #ifndef LIBC_ALIAS_SETKEY | |
265 | //End-Libc | |
3d9156a7 | 266 | void setkey(const char *) __DARWIN_ALIAS(setkey); |
224c7076 A |
267 | //Begin-Libc |
268 | #else /* LIBC_ALIAS_SETKEY */ | |
269 | void setkey(const char *) LIBC_ALIAS(setkey); | |
270 | #endif /* !LIBC_ALIAS_SETKEY */ | |
271 | //End-Libc | |
3d9156a7 A |
272 | #else /* !__DARWIN_UNIX03 */ |
273 | int setkey(const char *); | |
274 | #endif /* __DARWIN_UNIX03 */ | |
275 | char *setstate(const char *); | |
9385eb3d | 276 | void srand48(long); |
3d9156a7 A |
277 | #if __DARWIN_UNIX03 |
278 | void srandom(unsigned); | |
279 | #else /* !__DARWIN_UNIX03 */ | |
280 | void srandom(unsigned long); | |
281 | #endif /* __DARWIN_UNIX03 */ | |
282 | int unlockpt(int); | |
283 | #if __DARWIN_UNIX03 | |
224c7076 A |
284 | //Begin-Libc |
285 | #ifndef LIBC_ALIAS_UNSETENV | |
286 | //End-Libc | |
3d9156a7 | 287 | int unsetenv(const char *) __DARWIN_ALIAS(unsetenv); |
224c7076 A |
288 | //Begin-Libc |
289 | #else /* LIBC_ALIAS_UNSETENV */ | |
290 | int unsetenv(const char *) LIBC_ALIAS(unsetenv); | |
291 | #endif /* !LIBC_ALIAS_UNSETENV */ | |
292 | //End-Libc | |
3d9156a7 A |
293 | #else /* !__DARWIN_UNIX03 */ |
294 | void unsetenv(const char *); | |
295 | #endif /* __DARWIN_UNIX03 */ | |
224c7076 | 296 | #endif /* !_ANSI_SOURCE */ |
3d9156a7 | 297 | |
224c7076 | 298 | #if !defined(_ANSI_SOURCE) && (!defined(_POSIX_C_SOURCE) || defined(_DARWIN_C_SOURCE)) |
3d9156a7 A |
299 | #include <machine/types.h> |
300 | ||
6465356a A |
301 | #include <sys/_types/_dev_t.h> |
302 | #include <sys/_types/_mode_t.h> | |
3d9156a7 | 303 | |
6465356a | 304 | u_int32_t arc4random(void); |
1f2f436a A |
305 | void arc4random_addrandom(unsigned char * /*dat*/, int /*datlen*/); |
306 | void arc4random_buf(void * /*buf*/, size_t /*nbytes*/) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | |
3d9156a7 | 307 | void arc4random_stir(void); |
1f2f436a A |
308 | u_int32_t |
309 | arc4random_uniform(u_int32_t /*upper_bound*/) __OSX_AVAILABLE_STARTING(__MAC_10_7, __IPHONE_4_3); | |
34e8f829 | 310 | #ifdef __BLOCKS__ |
1f2f436a | 311 | int atexit_b(void (^)(void)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); |
34e8f829 | 312 | void *bsearch_b(const void *, const void *, size_t, |
1f2f436a | 313 | size_t, int (^)(const void *, const void *)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); |
34e8f829 | 314 | #endif /* __BLOCKS__ */ |
9385eb3d A |
315 | |
316 | /* getcap(3) functions */ | |
317 | char *cgetcap(char *, const char *, int); | |
318 | int cgetclose(void); | |
319 | int cgetent(char **, char **, const char *); | |
320 | int cgetfirst(char **, char **); | |
321 | int cgetmatch(const char *, const char *); | |
322 | int cgetnext(char **, char **); | |
323 | int cgetnum(char *, const char *, long *); | |
324 | int cgetset(const char *); | |
325 | int cgetstr(char *, const char *, char **); | |
326 | int cgetustr(char *, const char *, char **); | |
327 | ||
5f125488 | 328 | int daemon(int, int) __DARWIN_1050(daemon) __OSX_AVAILABLE_BUT_DEPRECATED_MSG(__MAC_10_0, __MAC_10_5, __IPHONE_2_0, __IPHONE_2_0, "Use posix_spawn APIs instead.") __WATCHOS_PROHIBITED __TVOS_PROHIBITED; |
3d9156a7 A |
329 | char *devname(dev_t, mode_t); |
330 | char *devname_r(dev_t, mode_t, char *buf, int len); | |
9385eb3d A |
331 | char *getbsize(int *, long *); |
332 | int getloadavg(double [], int); | |
333 | const char | |
334 | *getprogname(void); | |
335 | ||
9385eb3d A |
336 | int heapsort(void *, size_t, size_t, |
337 | int (*)(const void *, const void *)); | |
34e8f829 A |
338 | #ifdef __BLOCKS__ |
339 | int heapsort_b(void *, size_t, size_t, | |
1f2f436a | 340 | int (^)(const void *, const void *)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); |
34e8f829 | 341 | #endif /* __BLOCKS__ */ |
9385eb3d A |
342 | int mergesort(void *, size_t, size_t, |
343 | int (*)(const void *, const void *)); | |
34e8f829 A |
344 | #ifdef __BLOCKS__ |
345 | int mergesort_b(void *, size_t, size_t, | |
1f2f436a | 346 | int (^)(const void *, const void *)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); |
34e8f829 A |
347 | #endif /* __BLOCKS__ */ |
348 | void psort(void *, size_t, size_t, | |
1f2f436a | 349 | int (*)(const void *, const void *)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); |
34e8f829 A |
350 | #ifdef __BLOCKS__ |
351 | void psort_b(void *, size_t, size_t, | |
1f2f436a | 352 | int (^)(const void *, const void *)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); |
34e8f829 A |
353 | #endif /* __BLOCKS__ */ |
354 | void psort_r(void *, size_t, size_t, void *, | |
1f2f436a | 355 | int (*)(void *, const void *, const void *)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); |
34e8f829 A |
356 | #ifdef __BLOCKS__ |
357 | void qsort_b(void *, size_t, size_t, | |
1f2f436a | 358 | int (^)(const void *, const void *)) __OSX_AVAILABLE_STARTING(__MAC_10_6, __IPHONE_3_2); |
34e8f829 | 359 | #endif /* __BLOCKS__ */ |
9385eb3d A |
360 | void qsort_r(void *, size_t, size_t, void *, |
361 | int (*)(void *, const void *, const void *)); | |
362 | int radixsort(const unsigned char **, int, const unsigned char *, | |
363 | unsigned); | |
364 | void setprogname(const char *); | |
365 | int sradixsort(const unsigned char **, int, const unsigned char *, | |
366 | unsigned); | |
367 | void sranddev(void); | |
368 | void srandomdev(void); | |
9385eb3d | 369 | void *reallocf(void *, size_t); |
3d9156a7 | 370 | #if !__DARWIN_NO_LONG_LONG |
5b2abdfb | 371 | long long |
9385eb3d | 372 | strtoq(const char *, char **, int); |
5b2abdfb | 373 | unsigned long long |
9385eb3d | 374 | strtouq(const char *, char **, int); |
3d9156a7 A |
375 | #endif /* !__DARWIN_NO_LONG_LONG */ |
376 | extern char *suboptarg; /* getsubopt(3) external variable */ | |
377 | void *valloc(size_t); | |
224c7076 A |
378 | #endif /* !_ANSI_SOURCE && !_POSIX_SOURCE */ |
379 | ||
380 | /* Poison the following routines if -fshort-wchar is set */ | |
381 | #if !defined(__cplusplus) && defined(__WCHAR_MAX__) && __WCHAR_MAX__ <= 0xffffU | |
382 | #pragma GCC poison mbstowcs mbtowc wcstombs wctomb | |
5b2abdfb A |
383 | #endif |
384 | __END_DECLS | |
385 | ||
3d9156a7 A |
386 | #ifdef _USE_EXTENDED_LOCALES_ |
387 | #include <xlocale/_stdlib.h> | |
388 | #endif /* _USE_EXTENDED_LOCALES_ */ | |
389 | ||
5b2abdfb | 390 | #endif /* _STDLIB_H_ */ |