3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
24 */
25
26 /* Copyright (c) 1988 AT&T */
27 /* All Rights Reserved */
28
29 #ifndef _STDLIB_H
30 #define _STDLIB_H
31
32 #include <iso/stdlib_iso.h>
33 #include <iso/stdlib_c99.h>
34
35 #if defined(__EXTENSIONS__) || defined(_XPG4)
36 #include <sys/wait.h>
37 #endif
38
39 /*
40 * Allow global visibility for symbols defined in
41 * C++ "std" namespace in <iso/stdlib_iso.h>.
42 */
205 defined(_XPG6)
206 extern int posix_memalign(void **, size_t, size_t);
207 extern int posix_openpt(int);
208 extern int setenv(const char *, const char *, int);
209 extern int unsetenv(const char *);
210 #endif
211
212 #if defined(__EXTENSIONS__) || \
213 (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
214 extern char *canonicalize_file_name(const char *);
215 extern int clearenv(void);
216 extern void closefrom(int);
217 extern int daemon(int, int);
218 extern int dup2(int, int);
219 extern int fdwalk(int (*)(void *, int), void *);
220 extern char *qecvt(long double, int, int *, int *);
221 extern char *qfcvt(long double, int, int *, int *);
222 extern char *qgcvt(long double, int, char *);
223 extern char *getcwd(char *, size_t);
224 extern const char *getexecname(void);
225 extern char *getlogin(void);
226 extern int getopt(int, char *const *, const char *);
227 extern char *optarg;
228 extern int optind, opterr, optopt;
229 extern char *getpass(const char *);
230 extern char *getpassphrase(const char *);
231 extern int getpw(uid_t, char *);
232 extern int isatty(int);
233 extern void *memalign(size_t, size_t);
234 extern char *ttyname(int);
235 extern char *mkdtemp(char *);
236 extern const char *getprogname(void);
237 extern void setprogname(const char *);
238
239 #if !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE)
240 extern char *lltostr(long long, char *);
241 extern char *ulltostr(unsigned long long, char *);
242 #endif /* !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE) */
243
244 #endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */
245
312
313 #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG6)
314 extern int posix_memalign();
315 extern int posix_openpt();
316 extern int setenv();
317 extern int unsetenv();
318 #endif
319
320 #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
321 extern char *canonicalize_file_name();
322 extern int clearenv();
323 extern void closefrom();
324 extern int daemon();
325 extern int dup2();
326 extern int fdwalk();
327 extern char *qecvt();
328 extern char *qfcvt();
329 extern char *qgcvt();
330 extern char *getcwd();
331 extern char *getexecname();
332 extern char *getlogin();
333 extern int getopt();
334 extern char *optarg;
335 extern int optind, opterr, optopt;
336 extern char *getpass();
337 extern char *getpassphrase();
338 extern int getpw();
339 extern int isatty();
340 extern void *memalign();
341 extern char *ttyname();
342 extern char *mkdtemp();
343 extern char *getprogname();
344 extern void setprogname();
345
346 #if defined(_LONGLONG_TYPE)
347 extern char *lltostr();
348 extern char *ulltostr();
349 #endif /* defined(_LONGLONG_TYPE) */
350 #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */
351
352 #endif /* __STDC__ */
|
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Copyright (c) 2013 Gary Mills
24 *
25 * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved.
26 */
27
28 /* Copyright (c) 1988 AT&T */
29 /* All Rights Reserved */
30
31 #ifndef _STDLIB_H
32 #define _STDLIB_H
33
34 #include <iso/stdlib_iso.h>
35 #include <iso/stdlib_c99.h>
36
37 #if defined(__EXTENSIONS__) || defined(_XPG4)
38 #include <sys/wait.h>
39 #endif
40
41 /*
42 * Allow global visibility for symbols defined in
43 * C++ "std" namespace in <iso/stdlib_iso.h>.
44 */
207 defined(_XPG6)
208 extern int posix_memalign(void **, size_t, size_t);
209 extern int posix_openpt(int);
210 extern int setenv(const char *, const char *, int);
211 extern int unsetenv(const char *);
212 #endif
213
214 #if defined(__EXTENSIONS__) || \
215 (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX))
216 extern char *canonicalize_file_name(const char *);
217 extern int clearenv(void);
218 extern void closefrom(int);
219 extern int daemon(int, int);
220 extern int dup2(int, int);
221 extern int fdwalk(int (*)(void *, int), void *);
222 extern char *qecvt(long double, int, int *, int *);
223 extern char *qfcvt(long double, int, int *, int *);
224 extern char *qgcvt(long double, int, char *);
225 extern char *getcwd(char *, size_t);
226 extern const char *getexecname(void);
227
228 #ifndef __GETLOGIN_DEFINED /* Avoid duplicate in unistd.h */
229 #define __GETLOGIN_DEFINED
230 #ifndef __USE_LEGACY_LOGNAME__
231 #ifdef __PRAGMA_REDEFINE_EXTNAME
232 #pragma redefine_extname getlogin getloginx
233 #else /* __PRAGMA_REDEFINE_EXTNAME */
234 extern char *getloginx(void);
235 #define getlogin getloginx
236 #endif /* __PRAGMA_REDEFINE_EXTNAME */
237 #endif /* __USE_LEGACY_LOGNAME__ */
238 extern char *getlogin(void);
239 #endif /* __GETLOGIN_DEFINED */
240
241 extern int getopt(int, char *const *, const char *);
242 extern char *optarg;
243 extern int optind, opterr, optopt;
244 extern char *getpass(const char *);
245 extern char *getpassphrase(const char *);
246 extern int getpw(uid_t, char *);
247 extern int isatty(int);
248 extern void *memalign(size_t, size_t);
249 extern char *ttyname(int);
250 extern char *mkdtemp(char *);
251 extern const char *getprogname(void);
252 extern void setprogname(const char *);
253
254 #if !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE)
255 extern char *lltostr(long long, char *);
256 extern char *ulltostr(unsigned long long, char *);
257 #endif /* !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE) */
258
259 #endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */
260
327
328 #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG6)
329 extern int posix_memalign();
330 extern int posix_openpt();
331 extern int setenv();
332 extern int unsetenv();
333 #endif
334
335 #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX)
336 extern char *canonicalize_file_name();
337 extern int clearenv();
338 extern void closefrom();
339 extern int daemon();
340 extern int dup2();
341 extern int fdwalk();
342 extern char *qecvt();
343 extern char *qfcvt();
344 extern char *qgcvt();
345 extern char *getcwd();
346 extern char *getexecname();
347
348 #ifndef __GETLOGIN_DEFINED /* Avoid duplicate in unistd.h */
349 #define __GETLOGIN_DEFINED
350 #ifndef __USE_LEGACY_LOGNAME__
351 #ifdef __PRAGMA_REDEFINE_EXTNAME
352 #pragma redefine_extname getlogin getloginx
353 #else /* __PRAGMA_REDEFINE_EXTNAME */
354 extern char *getloginx();
355 #define getlogin getloginx
356 #endif /* __PRAGMA_REDEFINE_EXTNAME */
357 #endif /* __USE_LEGACY_LOGNAME__ */
358 extern char *getlogin();
359 #endif /* __GETLOGIN_DEFINED */
360
361 extern int getopt();
362 extern char *optarg;
363 extern int optind, opterr, optopt;
364 extern char *getpass();
365 extern char *getpassphrase();
366 extern int getpw();
367 extern int isatty();
368 extern void *memalign();
369 extern char *ttyname();
370 extern char *mkdtemp();
371 extern char *getprogname();
372 extern void setprogname();
373
374 #if defined(_LONGLONG_TYPE)
375 extern char *lltostr();
376 extern char *ulltostr();
377 #endif /* defined(_LONGLONG_TYPE) */
378 #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */
379
380 #endif /* __STDC__ */
|