1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate /* Copyright (c) 1988 AT&T */ 28*7c478bd9Sstevel@tonic-gate /* All Rights Reserved */ 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate 31*7c478bd9Sstevel@tonic-gate #ifndef _STDLIB_H 32*7c478bd9Sstevel@tonic-gate #define _STDLIB_H 33*7c478bd9Sstevel@tonic-gate 34*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.22 */ 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate #include <iso/stdlib_iso.h> 37*7c478bd9Sstevel@tonic-gate #include <iso/stdlib_c99.h> 38*7c478bd9Sstevel@tonic-gate 39*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || defined(_XPG4) 40*7c478bd9Sstevel@tonic-gate #include <sys/wait.h> 41*7c478bd9Sstevel@tonic-gate #endif 42*7c478bd9Sstevel@tonic-gate 43*7c478bd9Sstevel@tonic-gate /* 44*7c478bd9Sstevel@tonic-gate * Allow global visibility for symbols defined in 45*7c478bd9Sstevel@tonic-gate * C++ "std" namespace in <iso/stdlib_iso.h>. 46*7c478bd9Sstevel@tonic-gate */ 47*7c478bd9Sstevel@tonic-gate #if __cplusplus >= 199711L 48*7c478bd9Sstevel@tonic-gate using std::div_t; 49*7c478bd9Sstevel@tonic-gate using std::ldiv_t; 50*7c478bd9Sstevel@tonic-gate using std::size_t; 51*7c478bd9Sstevel@tonic-gate using std::abort; 52*7c478bd9Sstevel@tonic-gate using std::abs; 53*7c478bd9Sstevel@tonic-gate using std::atexit; 54*7c478bd9Sstevel@tonic-gate using std::atof; 55*7c478bd9Sstevel@tonic-gate using std::atoi; 56*7c478bd9Sstevel@tonic-gate using std::atol; 57*7c478bd9Sstevel@tonic-gate using std::bsearch; 58*7c478bd9Sstevel@tonic-gate using std::calloc; 59*7c478bd9Sstevel@tonic-gate using std::div; 60*7c478bd9Sstevel@tonic-gate using std::exit; 61*7c478bd9Sstevel@tonic-gate using std::free; 62*7c478bd9Sstevel@tonic-gate using std::getenv; 63*7c478bd9Sstevel@tonic-gate using std::labs; 64*7c478bd9Sstevel@tonic-gate using std::ldiv; 65*7c478bd9Sstevel@tonic-gate using std::malloc; 66*7c478bd9Sstevel@tonic-gate using std::mblen; 67*7c478bd9Sstevel@tonic-gate using std::mbstowcs; 68*7c478bd9Sstevel@tonic-gate using std::mbtowc; 69*7c478bd9Sstevel@tonic-gate using std::qsort; 70*7c478bd9Sstevel@tonic-gate using std::rand; 71*7c478bd9Sstevel@tonic-gate using std::realloc; 72*7c478bd9Sstevel@tonic-gate using std::srand; 73*7c478bd9Sstevel@tonic-gate using std::strtod; 74*7c478bd9Sstevel@tonic-gate using std::strtol; 75*7c478bd9Sstevel@tonic-gate using std::strtoul; 76*7c478bd9Sstevel@tonic-gate using std::system; 77*7c478bd9Sstevel@tonic-gate using std::wcstombs; 78*7c478bd9Sstevel@tonic-gate using std::wctomb; 79*7c478bd9Sstevel@tonic-gate #endif 80*7c478bd9Sstevel@tonic-gate 81*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 82*7c478bd9Sstevel@tonic-gate extern "C" { 83*7c478bd9Sstevel@tonic-gate #endif 84*7c478bd9Sstevel@tonic-gate 85*7c478bd9Sstevel@tonic-gate #ifndef _UID_T 86*7c478bd9Sstevel@tonic-gate #define _UID_T 87*7c478bd9Sstevel@tonic-gate #if defined(_LP64) || defined(_I32LPx) 88*7c478bd9Sstevel@tonic-gate typedef int uid_t; /* UID type */ 89*7c478bd9Sstevel@tonic-gate #else 90*7c478bd9Sstevel@tonic-gate typedef long uid_t; /* (historical version) */ 91*7c478bd9Sstevel@tonic-gate #endif 92*7c478bd9Sstevel@tonic-gate #endif /* !_UID_T */ 93*7c478bd9Sstevel@tonic-gate 94*7c478bd9Sstevel@tonic-gate #if defined(__STDC__) 95*7c478bd9Sstevel@tonic-gate 96*7c478bd9Sstevel@tonic-gate /* large file compilation environment setup */ 97*7c478bd9Sstevel@tonic-gate #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 98*7c478bd9Sstevel@tonic-gate 99*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 100*7c478bd9Sstevel@tonic-gate #pragma redefine_extname mkstemp mkstemp64 101*7c478bd9Sstevel@tonic-gate #else /* __PRAGMA_REDEFINE_EXTNAME */ 102*7c478bd9Sstevel@tonic-gate #define mkstemp mkstemp64 103*7c478bd9Sstevel@tonic-gate #endif /* __PRAGMA_REDEFINE_EXTNAME */ 104*7c478bd9Sstevel@tonic-gate 105*7c478bd9Sstevel@tonic-gate #endif /* _FILE_OFFSET_BITS == 64 */ 106*7c478bd9Sstevel@tonic-gate 107*7c478bd9Sstevel@tonic-gate /* In the LP64 compilation environment, all APIs are already large file */ 108*7c478bd9Sstevel@tonic-gate #if defined(_LP64) && defined(_LARGEFILE64_SOURCE) 109*7c478bd9Sstevel@tonic-gate 110*7c478bd9Sstevel@tonic-gate #ifdef __PRAGMA_REDEFINE_EXTNAME 111*7c478bd9Sstevel@tonic-gate #pragma redefine_extname mkstemp64 mkstemp 112*7c478bd9Sstevel@tonic-gate #else /* __PRAGMA_REDEFINE_EXTNAME */ 113*7c478bd9Sstevel@tonic-gate #define mkstemp64 mkstemp 114*7c478bd9Sstevel@tonic-gate #endif /* __PRAGMA_REDEFINE_EXTNAME */ 115*7c478bd9Sstevel@tonic-gate 116*7c478bd9Sstevel@tonic-gate #endif /* _LP64 && _LARGEFILE64_SOURCE */ 117*7c478bd9Sstevel@tonic-gate 118*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 119*7c478bd9Sstevel@tonic-gate (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ 120*7c478bd9Sstevel@tonic-gate (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT) 121*7c478bd9Sstevel@tonic-gate extern int rand_r(unsigned int *); 122*7c478bd9Sstevel@tonic-gate #endif 123*7c478bd9Sstevel@tonic-gate 124*7c478bd9Sstevel@tonic-gate extern void _exithandle(void); 125*7c478bd9Sstevel@tonic-gate 126*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 127*7c478bd9Sstevel@tonic-gate (!defined(_STRICT_STDC) && !defined(_POSIX_C_SOURCE)) || \ 128*7c478bd9Sstevel@tonic-gate defined(_XPG4) 129*7c478bd9Sstevel@tonic-gate extern double drand48(void); 130*7c478bd9Sstevel@tonic-gate extern double erand48(unsigned short *); 131*7c478bd9Sstevel@tonic-gate extern long jrand48(unsigned short *); 132*7c478bd9Sstevel@tonic-gate extern void lcong48(unsigned short *); 133*7c478bd9Sstevel@tonic-gate extern long lrand48(void); 134*7c478bd9Sstevel@tonic-gate extern long mrand48(void); 135*7c478bd9Sstevel@tonic-gate extern long nrand48(unsigned short *); 136*7c478bd9Sstevel@tonic-gate extern unsigned short *seed48(unsigned short *); 137*7c478bd9Sstevel@tonic-gate extern void srand48(long); 138*7c478bd9Sstevel@tonic-gate extern int putenv(char *); 139*7c478bd9Sstevel@tonic-gate extern void setkey(const char *); 140*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */ 141*7c478bd9Sstevel@tonic-gate 142*7c478bd9Sstevel@tonic-gate /* 143*7c478bd9Sstevel@tonic-gate * swab() has historically been in <stdlib.h> as delivered from AT&T 144*7c478bd9Sstevel@tonic-gate * and continues to be visible in the default compilation environment. 145*7c478bd9Sstevel@tonic-gate * As of Issue 4 of the X/Open Portability Guides, swab() was declared 146*7c478bd9Sstevel@tonic-gate * in <unistd.h>. As a result, with respect to X/Open namespace the 147*7c478bd9Sstevel@tonic-gate * swab() declaration in this header is only visible for the XPG3 148*7c478bd9Sstevel@tonic-gate * environment. 149*7c478bd9Sstevel@tonic-gate */ 150*7c478bd9Sstevel@tonic-gate #if (defined(__EXTENSIONS__) || \ 151*7c478bd9Sstevel@tonic-gate (!defined(_STRICT_STDC__) && !defined(_POSIX_C_SOURCE))) && \ 152*7c478bd9Sstevel@tonic-gate (!defined(_XOPEN_SOURCE) || (defined(_XPG3) && !defined(_XPG4))) 153*7c478bd9Sstevel@tonic-gate #ifndef _SSIZE_T 154*7c478bd9Sstevel@tonic-gate #define _SSIZE_T 155*7c478bd9Sstevel@tonic-gate #if defined(_LP64) || defined(_I32LPx) 156*7c478bd9Sstevel@tonic-gate typedef long ssize_t; /* size of something in bytes or -1 */ 157*7c478bd9Sstevel@tonic-gate #else 158*7c478bd9Sstevel@tonic-gate typedef int ssize_t; /* (historical version) */ 159*7c478bd9Sstevel@tonic-gate #endif 160*7c478bd9Sstevel@tonic-gate #endif /* !_SSIZE_T */ 161*7c478bd9Sstevel@tonic-gate 162*7c478bd9Sstevel@tonic-gate extern void swab(const char *, char *, ssize_t); 163*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */ 164*7c478bd9Sstevel@tonic-gate 165*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 166*7c478bd9Sstevel@tonic-gate !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \ 167*7c478bd9Sstevel@tonic-gate (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) 168*7c478bd9Sstevel@tonic-gate extern int mkstemp(char *); 169*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) ... */ 170*7c478bd9Sstevel@tonic-gate 171*7c478bd9Sstevel@tonic-gate #if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ 172*7c478bd9Sstevel@tonic-gate !defined(__PRAGMA_REDEFINE_EXTNAME)) 173*7c478bd9Sstevel@tonic-gate extern int mkstemp64(char *); 174*7c478bd9Sstevel@tonic-gate #endif /* _LARGEFILE64_SOURCE... */ 175*7c478bd9Sstevel@tonic-gate 176*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 177*7c478bd9Sstevel@tonic-gate (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ 178*7c478bd9Sstevel@tonic-gate defined(_XPG4_2) 179*7c478bd9Sstevel@tonic-gate extern long a64l(const char *); 180*7c478bd9Sstevel@tonic-gate extern char *ecvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD); 181*7c478bd9Sstevel@tonic-gate extern char *fcvt(double, int, int *_RESTRICT_KYWD, int *_RESTRICT_KYWD); 182*7c478bd9Sstevel@tonic-gate extern char *gcvt(double, int, char *); 183*7c478bd9Sstevel@tonic-gate extern int getsubopt(char **, char *const *, char **); 184*7c478bd9Sstevel@tonic-gate extern int grantpt(int); 185*7c478bd9Sstevel@tonic-gate extern char *initstate(unsigned, char *, size_t); 186*7c478bd9Sstevel@tonic-gate extern char *l64a(long); 187*7c478bd9Sstevel@tonic-gate extern char *mktemp(char *); 188*7c478bd9Sstevel@tonic-gate extern char *ptsname(int); 189*7c478bd9Sstevel@tonic-gate extern long random(void); 190*7c478bd9Sstevel@tonic-gate extern char *realpath(const char *_RESTRICT_KYWD, char *_RESTRICT_KYWD); 191*7c478bd9Sstevel@tonic-gate extern char *setstate(const char *); 192*7c478bd9Sstevel@tonic-gate extern void srandom(unsigned); 193*7c478bd9Sstevel@tonic-gate extern int unlockpt(int); 194*7c478bd9Sstevel@tonic-gate /* Marked LEGACY in SUSv2 and removed in SUSv3 */ 195*7c478bd9Sstevel@tonic-gate #if !defined(_XPG6) || defined(__EXTENSIONS__) 196*7c478bd9Sstevel@tonic-gate extern int ttyslot(void); 197*7c478bd9Sstevel@tonic-gate extern void *valloc(size_t); 198*7c478bd9Sstevel@tonic-gate #endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */ 199*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || ... || defined(_XPG4_2) */ 200*7c478bd9Sstevel@tonic-gate 201*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 202*7c478bd9Sstevel@tonic-gate (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) || \ 203*7c478bd9Sstevel@tonic-gate defined(_XPG6) 204*7c478bd9Sstevel@tonic-gate extern int posix_openpt(int); 205*7c478bd9Sstevel@tonic-gate extern int setenv(const char *, const char *, int); 206*7c478bd9Sstevel@tonic-gate extern int unsetenv(const char *); 207*7c478bd9Sstevel@tonic-gate #endif 208*7c478bd9Sstevel@tonic-gate 209*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 210*7c478bd9Sstevel@tonic-gate (!defined(_STRICT_STDC) && !defined(__XOPEN_OR_POSIX)) 211*7c478bd9Sstevel@tonic-gate extern void closefrom(int); 212*7c478bd9Sstevel@tonic-gate extern int dup2(int, int); 213*7c478bd9Sstevel@tonic-gate extern int fdwalk(int (*)(void *, int), void *); 214*7c478bd9Sstevel@tonic-gate extern char *qecvt(long double, int, int *, int *); 215*7c478bd9Sstevel@tonic-gate extern char *qfcvt(long double, int, int *, int *); 216*7c478bd9Sstevel@tonic-gate extern char *qgcvt(long double, int, char *); 217*7c478bd9Sstevel@tonic-gate extern char *getcwd(char *, size_t); 218*7c478bd9Sstevel@tonic-gate extern const char *getexecname(void); 219*7c478bd9Sstevel@tonic-gate extern char *getlogin(void); 220*7c478bd9Sstevel@tonic-gate extern int getopt(int, char *const *, const char *); 221*7c478bd9Sstevel@tonic-gate extern char *optarg; 222*7c478bd9Sstevel@tonic-gate extern int optind, opterr, optopt; 223*7c478bd9Sstevel@tonic-gate extern char *getpass(const char *); 224*7c478bd9Sstevel@tonic-gate extern char *getpassphrase(const char *); 225*7c478bd9Sstevel@tonic-gate extern int getpw(uid_t, char *); 226*7c478bd9Sstevel@tonic-gate extern int isatty(int); 227*7c478bd9Sstevel@tonic-gate extern void *memalign(size_t, size_t); 228*7c478bd9Sstevel@tonic-gate extern char *ttyname(int); 229*7c478bd9Sstevel@tonic-gate 230*7c478bd9Sstevel@tonic-gate #if !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE) 231*7c478bd9Sstevel@tonic-gate extern char *lltostr(long long, char *); 232*7c478bd9Sstevel@tonic-gate extern char *ulltostr(unsigned long long, char *); 233*7c478bd9Sstevel@tonic-gate #endif /* !defined(_STRICT_STDC) && defined(_LONGLONG_TYPE) */ 234*7c478bd9Sstevel@tonic-gate 235*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(_STRICT_STDC) ... */ 236*7c478bd9Sstevel@tonic-gate 237*7c478bd9Sstevel@tonic-gate #else /* not __STDC__ */ 238*7c478bd9Sstevel@tonic-gate 239*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(_XOPEN_OR_POSIX) || \ 240*7c478bd9Sstevel@tonic-gate (_POSIX_C_SOURCE - 0 >= 199506L) || defined(_REENTRANT) 241*7c478bd9Sstevel@tonic-gate extern int rand_r(); 242*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || defined(_REENTRANT) ... */ 243*7c478bd9Sstevel@tonic-gate 244*7c478bd9Sstevel@tonic-gate extern void _exithandle(); 245*7c478bd9Sstevel@tonic-gate 246*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) || defined(_XPG4) 247*7c478bd9Sstevel@tonic-gate extern double drand48(); 248*7c478bd9Sstevel@tonic-gate extern double erand48(); 249*7c478bd9Sstevel@tonic-gate extern long jrand48(); 250*7c478bd9Sstevel@tonic-gate extern void lcong48(); 251*7c478bd9Sstevel@tonic-gate extern long lrand48(); 252*7c478bd9Sstevel@tonic-gate extern long mrand48(); 253*7c478bd9Sstevel@tonic-gate extern long nrand48(); 254*7c478bd9Sstevel@tonic-gate extern unsigned short *seed48(); 255*7c478bd9Sstevel@tonic-gate extern void srand48(); 256*7c478bd9Sstevel@tonic-gate extern int putenv(); 257*7c478bd9Sstevel@tonic-gate extern void setkey(); 258*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE) ... */ 259*7c478bd9Sstevel@tonic-gate 260*7c478bd9Sstevel@tonic-gate #if (defined(__EXTENSIONS__) || !defined(_POSIX_C_SOURCE)) && \ 261*7c478bd9Sstevel@tonic-gate (!defined(_XOPEN_SOURCE) || (defined(_XPG3) && !defined(_XPG4))) 262*7c478bd9Sstevel@tonic-gate extern void swab(); 263*7c478bd9Sstevel@tonic-gate #endif 264*7c478bd9Sstevel@tonic-gate 265*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || \ 266*7c478bd9Sstevel@tonic-gate !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \ 267*7c478bd9Sstevel@tonic-gate (defined(_LARGEFILE_SOURCE) && _FILE_OFFSET_BITS == 64) 268*7c478bd9Sstevel@tonic-gate extern int mkstemp(); 269*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) ... */ 270*7c478bd9Sstevel@tonic-gate 271*7c478bd9Sstevel@tonic-gate #if defined(_LARGEFILE64_SOURCE) && !((_FILE_OFFSET_BITS == 64) && \ 272*7c478bd9Sstevel@tonic-gate !defined(__PRAGMA_REDEFINE_EXTNAME)) 273*7c478bd9Sstevel@tonic-gate extern int mkstemp64(); 274*7c478bd9Sstevel@tonic-gate #endif /* _LARGEFILE64_SOURCE... */ 275*7c478bd9Sstevel@tonic-gate 276*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) 277*7c478bd9Sstevel@tonic-gate extern long a64l(); 278*7c478bd9Sstevel@tonic-gate extern char *ecvt(); 279*7c478bd9Sstevel@tonic-gate extern char *fcvt(); 280*7c478bd9Sstevel@tonic-gate extern char *gcvt(); 281*7c478bd9Sstevel@tonic-gate extern int getsubopt(); 282*7c478bd9Sstevel@tonic-gate extern int grantpt(); 283*7c478bd9Sstevel@tonic-gate extern char *initstate(); 284*7c478bd9Sstevel@tonic-gate extern char *l64a(); 285*7c478bd9Sstevel@tonic-gate extern char *mktemp(); 286*7c478bd9Sstevel@tonic-gate extern char *ptsname(); 287*7c478bd9Sstevel@tonic-gate extern long random(); 288*7c478bd9Sstevel@tonic-gate extern char *realpath(); 289*7c478bd9Sstevel@tonic-gate extern char *setstate(); 290*7c478bd9Sstevel@tonic-gate extern void srandom(); 291*7c478bd9Sstevel@tonic-gate /* Marked LEGACY in SUSv2 and removed in SUSv3 */ 292*7c478bd9Sstevel@tonic-gate #if !defined(_XPG6) || defined(__EXTENSIONS__) 293*7c478bd9Sstevel@tonic-gate extern int ttyslot(); 294*7c478bd9Sstevel@tonic-gate extern void *valloc(); 295*7c478bd9Sstevel@tonic-gate #endif /* !defined(_XPG6) || defined(__EXTENSIONS__) */ 296*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || ... || defined(_XPG4_2) */ 297*7c478bd9Sstevel@tonic-gate 298*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) || defined(_XPG6) 299*7c478bd9Sstevel@tonic-gate extern int posix_openpt(); 300*7c478bd9Sstevel@tonic-gate extern int setenv(); 301*7c478bd9Sstevel@tonic-gate extern int unsetenv(); 302*7c478bd9Sstevel@tonic-gate #endif 303*7c478bd9Sstevel@tonic-gate 304*7c478bd9Sstevel@tonic-gate #if defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) 305*7c478bd9Sstevel@tonic-gate extern void closefrom(); 306*7c478bd9Sstevel@tonic-gate extern int dup2(); 307*7c478bd9Sstevel@tonic-gate extern int fdwalk(); 308*7c478bd9Sstevel@tonic-gate extern char *qecvt(); 309*7c478bd9Sstevel@tonic-gate extern char *qfcvt(); 310*7c478bd9Sstevel@tonic-gate extern char *qgcvt(); 311*7c478bd9Sstevel@tonic-gate extern char *getcwd(); 312*7c478bd9Sstevel@tonic-gate extern char *getexecname(); 313*7c478bd9Sstevel@tonic-gate extern char *getlogin(); 314*7c478bd9Sstevel@tonic-gate extern int getopt(); 315*7c478bd9Sstevel@tonic-gate extern char *optarg; 316*7c478bd9Sstevel@tonic-gate extern int optind, opterr, optopt; 317*7c478bd9Sstevel@tonic-gate extern char *getpass(); 318*7c478bd9Sstevel@tonic-gate extern char *getpassphrase(); 319*7c478bd9Sstevel@tonic-gate extern int getpw(); 320*7c478bd9Sstevel@tonic-gate extern int isatty(); 321*7c478bd9Sstevel@tonic-gate extern void *memalign(); 322*7c478bd9Sstevel@tonic-gate extern char *ttyname(); 323*7c478bd9Sstevel@tonic-gate 324*7c478bd9Sstevel@tonic-gate #if defined(_LONGLONG_TYPE) 325*7c478bd9Sstevel@tonic-gate extern char *lltostr(); 326*7c478bd9Sstevel@tonic-gate extern char *ulltostr(); 327*7c478bd9Sstevel@tonic-gate #endif /* defined(_LONGLONG_TYPE) */ 328*7c478bd9Sstevel@tonic-gate #endif /* defined(__EXTENSIONS__) || !defined(__XOPEN_OR_POSIX) ... */ 329*7c478bd9Sstevel@tonic-gate 330*7c478bd9Sstevel@tonic-gate #endif /* __STDC__ */ 331*7c478bd9Sstevel@tonic-gate 332*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 333*7c478bd9Sstevel@tonic-gate } 334*7c478bd9Sstevel@tonic-gate #endif 335*7c478bd9Sstevel@tonic-gate 336*7c478bd9Sstevel@tonic-gate #endif /* _STDLIB_H */ 337