stdlib.h (7c478bd95313f5f23a4c958a745db2134aa03244) stdlib.h (7c4dcc5546f9f002dfc2b95de47c90f00d07c066)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*
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/*
23 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
22 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27/* Copyright (c) 1988 AT&T */
28/* All Rights Reserved */
29
30
31#ifndef _STDLIB_H

--- 61 unchanged lines hidden (view full) ---

93
94#if defined(__STDC__)
95
96/* large file compilation environment setup */
97#if !defined(_LP64) && _FILE_OFFSET_BITS == 64
98
99#ifdef __PRAGMA_REDEFINE_EXTNAME
100#pragma redefine_extname mkstemp mkstemp64
23 * Use is subject to license terms.
24 */
25
26/* Copyright (c) 1988 AT&T */
27/* All Rights Reserved */
28
29
30#ifndef _STDLIB_H

--- 61 unchanged lines hidden (view full) ---

92
93#if defined(__STDC__)
94
95/* large file compilation environment setup */
96#if !defined(_LP64) && _FILE_OFFSET_BITS == 64
97
98#ifdef __PRAGMA_REDEFINE_EXTNAME
99#pragma redefine_extname mkstemp mkstemp64
100#pragma redefine_extname mkstemps mkstemps64
101#else /* __PRAGMA_REDEFINE_EXTNAME */
102#define mkstemp mkstemp64
101#else /* __PRAGMA_REDEFINE_EXTNAME */
102#define mkstemp mkstemp64
103#define mkstemps mkstemps64
103#endif /* __PRAGMA_REDEFINE_EXTNAME */
104
105#endif /* _FILE_OFFSET_BITS == 64 */
106
107/* In the LP64 compilation environment, all APIs are already large file */
108#if defined(_LP64) && defined(_LARGEFILE64_SOURCE)
109
110#ifdef __PRAGMA_REDEFINE_EXTNAME
111#pragma redefine_extname mkstemp64 mkstemp
104#endif /* __PRAGMA_REDEFINE_EXTNAME */
105
106#endif /* _FILE_OFFSET_BITS == 64 */
107
108/* In the LP64 compilation environment, all APIs are already large file */
109#if defined(_LP64) && defined(_LARGEFILE64_SOURCE)
110
111#ifdef __PRAGMA_REDEFINE_EXTNAME
112#pragma redefine_extname mkstemp64 mkstemp
113#pragma redefine_extname mkstemps64 mkstemps
112#else /* __PRAGMA_REDEFINE_EXTNAME */
113#define mkstemp64 mkstemp
114#else /* __PRAGMA_REDEFINE_EXTNAME */
115#define mkstemp64 mkstemp
116#define mkstemps64 mkstemps
114#endif /* __PRAGMA_REDEFINE_EXTNAME */
115
116#endif /* _LP64 && _LARGEFILE64_SOURCE */
117
118#if defined(__EXTENSIONS__) || \
119 (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
120 (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT)
121extern int rand_r(unsigned int *);

--- 39 unchanged lines hidden (view full) ---

161
162extern void swab(const char *, char *, ssize_t);
163#endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */
164
165#if defined(__EXTENSIONS__) || \
166 !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
167 (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64)
168extern int mkstemp(char *);
117#endif /* __PRAGMA_REDEFINE_EXTNAME */
118
119#endif /* _LP64 && _LARGEFILE64_SOURCE */
120
121#if defined(__EXTENSIONS__) || \
122 (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
123 (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT)
124extern int rand_r(unsigned int *);

--- 39 unchanged lines hidden (view full) ---

164
165extern void swab(const char *, char *, ssize_t);
166#endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */
167
168#if defined(__EXTENSIONS__) || \
169 !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
170 (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64)
171extern int mkstemp(char *);
172extern int mkstemps(char *, int);
169#endif /* defined(__EXTENSIONS__) ... */
170
171#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
172 !defined(__PRAGMA_REDEFINE_EXTNAME))
173extern int mkstemp64(char *);
173#endif /* defined(__EXTENSIONS__) ... */
174
175#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
176 !defined(__PRAGMA_REDEFINE_EXTNAME))
177extern int mkstemp64(char *);
178extern int mkstemps64(char *, int);
174#endif /* _LARGEFILE64_SOURCE... */
175
176#if defined(__EXTENSIONS__) || \
177 (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
178 defined(_XPG4_2)
179extern long a64l(const char *);
180extern char *ecvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
181extern char *fcvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD);

--- 39 unchanged lines hidden (view full) ---

221extern char *optarg;
222extern int optind, opterr, optopt;
223extern char *getpass(const char *);
224extern char *getpassphrase(const char *);
225extern int getpw(uid_t, char *);
226extern int isatty(int);
227extern void *memalign(size_t, size_t);
228extern char *ttyname(int);
179#endif /* _LARGEFILE64_SOURCE... */
180
181#if defined(__EXTENSIONS__) || \
182 (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \
183 defined(_XPG4_2)
184extern long a64l(const char *);
185extern char *ecvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD);
186extern char *fcvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD);

--- 39 unchanged lines hidden (view full) ---

226extern char *optarg;
227extern int optind, opterr, optopt;
228extern char *getpass(const char *);
229extern char *getpassphrase(const char *);
230extern int getpw(uid_t, char *);
231extern int isatty(int);
232extern void *memalign(size_t, size_t);
233extern char *ttyname(int);
234extern char *mkdtemp(char *);
229
230#if !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE)
231extern char *lltostr(long long, char *);
232extern char *ulltostr(unsigned long long, char *);
233#endif /* !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE) */
234
235#endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */
236

--- 24 unchanged lines hidden (view full) ---

261 (!defined(_XOPEN_SOURCE) || (defined(_XPG3) && !defined(_XPG4)))
262extern void swab();
263#endif
264
265#if defined(__EXTENSIONS__) || \
266 !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
267 (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64)
268extern int mkstemp();
235
236#if !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE)
237extern char *lltostr(long long, char *);
238extern char *ulltostr(unsigned long long, char *);
239#endif /* !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE) */
240
241#endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */
242

--- 24 unchanged lines hidden (view full) ---

267 (!defined(_XOPEN_SOURCE) || (defined(_XPG3) && !defined(_XPG4)))
268extern void swab();
269#endif
270
271#if defined(__EXTENSIONS__) || \
272 !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
273 (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64)
274extern int mkstemp();
275extern int mkstemps();
269#endif /* defined(__EXTENSIONS__) ... */
270
271#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
272 !defined(__PRAGMA_REDEFINE_EXTNAME))
273extern int mkstemp64();
276#endif /* defined(__EXTENSIONS__) ... */
277
278#if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \
279 !defined(__PRAGMA_REDEFINE_EXTNAME))
280extern int mkstemp64();
281extern int mkstemps64();
274#endif /* _LARGEFILE64_SOURCE... */
275
276#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)
277extern long a64l();
278extern char *ecvt();
279extern char *fcvt();
280extern char *gcvt();
281extern int getsubopt();

--- 33 unchanged lines hidden (view full) ---

315extern char *optarg;
316extern int optind, opterr, optopt;
317extern char *getpass();
318extern char *getpassphrase();
319extern int getpw();
320extern int isatty();
321extern void *memalign();
322extern char *ttyname();
282#endif /* _LARGEFILE64_SOURCE... */
283
284#if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2)
285extern long a64l();
286extern char *ecvt();
287extern char *fcvt();
288extern char *gcvt();
289extern int getsubopt();

--- 33 unchanged lines hidden (view full) ---

323extern char *optarg;
324extern int optind, opterr, optopt;
325extern char *getpass();
326extern char *getpassphrase();
327extern int getpw();
328extern int isatty();
329extern void *memalign();
330extern char *ttyname();
331extern char *mkdtemp();
323
324#if defined(_LONGLONG_TYPE)
325extern char *lltostr();
326extern char *ulltostr();
327#endif /* defined(_LONGLONG_TYPE) */
328#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */
329
330#endif /* __STDC__ */
331
332#ifdef __cplusplus
333}
334#endif
335
336#endif /* _STDLIB_H */
332
333#if defined(_LONGLONG_TYPE)
334extern char *lltostr();
335extern char *ulltostr();
336#endif /* defined(_LONGLONG_TYPE) */
337#endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */
338
339#endif /* __STDC__ */
340
341#ifdef __cplusplus
342}
343#endif
344
345#endif /* _STDLIB_H */