|
|
1.1 ! root 1: /* ! 2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved. ! 3: * ! 4: * @APPLE_LICENSE_HEADER_START@ ! 5: * ! 6: * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights ! 7: * Reserved. This file contains Original Code and/or Modifications of ! 8: * Original Code as defined in and that are subject to the Apple Public ! 9: * Source License Version 1.1 (the "License"). You may not use this file ! 10: * except in compliance with the License. Please obtain a copy of the ! 11: * License at http://www.apple.com/publicsource and read it before using ! 12: * this file. ! 13: * ! 14: * The Original Code and all software distributed under the License are ! 15: * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER ! 16: * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, ! 17: * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, ! 18: * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the ! 19: * License for the specific language governing rights and limitations ! 20: * under the License. ! 21: * ! 22: * @APPLE_LICENSE_HEADER_END@ ! 23: */ ! 24: ! 25: /*- ! 26: * Copyright (c) 1990, 1993 ! 27: * The Regents of the University of California. All rights reserved. ! 28: * ! 29: * Redistribution and use in source and binary forms, with or without ! 30: * modification, are permitted provided that the following conditions ! 31: * are met: ! 32: * 1. Redistributions of source code must retain the above copyright ! 33: * notice, this list of conditions and the following disclaimer. ! 34: * 2. Redistributions in binary form must reproduce the above copyright ! 35: * notice, this list of conditions and the following disclaimer in the ! 36: * documentation and/or other materials provided with the distribution. ! 37: * 3. All advertising materials mentioning features or use of this software ! 38: * must display the following acknowledgement: ! 39: * This product includes software developed by the University of ! 40: * California, Berkeley and its contributors. ! 41: * 4. Neither the name of the University nor the names of its contributors ! 42: * may be used to endorse or promote products derived from this software ! 43: * without specific prior written permission. ! 44: * ! 45: * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ! 46: * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ! 47: * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ! 48: * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE ! 49: * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ! 50: * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ! 51: * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ! 52: * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ! 53: * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ! 54: * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ! 55: * SUCH DAMAGE. ! 56: * ! 57: * @(#)stdlib.h 8.5 (Berkeley) 5/19/95 ! 58: */ ! 59: ! 60: #ifndef _STDLIB_H_ ! 61: #define _STDLIB_H_ ! 62: ! 63: #include <machine/ansi.h> ! 64: ! 65: #ifndef _BSD_SIZE_T_DEFINED_ ! 66: #define _BSD_SIZE_T_DEFINED_ ! 67: typedef _BSD_SIZE_T_ size_t; ! 68: #endif ! 69: ! 70: #ifndef _BSD_WCHAR_T_DEFINED_ ! 71: #define _BSD_WCHAR_T_DEFINED_ ! 72: #ifndef _ANSI_SOURCE ! 73: typedef _BSD_WCHAR_T_ rune_t; ! 74: #endif ! 75: typedef _BSD_WCHAR_T_ wchar_t; ! 76: #endif ! 77: ! 78: typedef struct { ! 79: int quot; /* quotient */ ! 80: int rem; /* remainder */ ! 81: } div_t; ! 82: ! 83: typedef struct { ! 84: long quot; /* quotient */ ! 85: long rem; /* remainder */ ! 86: } ldiv_t; ! 87: ! 88: #ifndef NULL ! 89: #define NULL 0 ! 90: #endif ! 91: ! 92: #define EXIT_FAILURE 1 ! 93: #define EXIT_SUCCESS 0 ! 94: ! 95: #define RAND_MAX 0x7fffffff ! 96: ! 97: extern int __mb_cur_max; ! 98: #define MB_CUR_MAX __mb_cur_max ! 99: ! 100: #include <sys/cdefs.h> ! 101: ! 102: __BEGIN_DECLS ! 103: __dead void ! 104: abort __P((void)); ! 105: __pure int ! 106: abs __P((int)); ! 107: int atexit __P((void (*)(void))); ! 108: double atof __P((const char *)); ! 109: int atoi __P((const char *)); ! 110: long atol __P((const char *)); ! 111: void *bsearch __P((const void *, const void *, size_t, ! 112: size_t, int (*)(const void *, const void *))); ! 113: void *calloc __P((size_t, size_t)); ! 114: __pure div_t ! 115: div __P((int, int)); ! 116: __dead void ! 117: exit __P((int)); ! 118: void free __P((void *)); ! 119: char *getenv __P((const char *)); ! 120: __pure long ! 121: labs __P((long)); ! 122: __pure ldiv_t ! 123: ldiv __P((long, long)); ! 124: void *malloc __P((size_t)); ! 125: void qsort __P((void *, size_t, size_t, ! 126: int (*)(const void *, const void *))); ! 127: int rand __P((void)); ! 128: void *realloc __P((void *, size_t)); ! 129: void srand __P((unsigned)); ! 130: double strtod __P((const char *, char **)); ! 131: long strtol __P((const char *, char **, int)); ! 132: unsigned long ! 133: strtoul __P((const char *, char **, int)); ! 134: int system __P((const char *)); ! 135: ! 136: /* These are currently just stubs. */ ! 137: int mblen __P((const char *, size_t)); ! 138: size_t mbstowcs __P((wchar_t *, const char *, size_t)); ! 139: int wctomb __P((char *, wchar_t)); ! 140: int mbtowc __P((wchar_t *, const char *, size_t)); ! 141: size_t wcstombs __P((char *, const wchar_t *, size_t)); ! 142: ! 143: #ifndef _ANSI_SOURCE ! 144: int putenv __P((const char *)); ! 145: int setenv __P((const char *, const char *, int)); ! 146: #endif ! 147: ! 148: #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) ! 149: void *alloca __P((size_t)); /* built-in for gcc */ ! 150: /* getcap(3) functions */ ! 151: char *getbsize __P((int *, long *)); ! 152: char *cgetcap __P((char *, char *, int)); ! 153: int cgetclose __P((void)); ! 154: int cgetent __P((char **, char **, char *)); ! 155: int cgetfirst __P((char **, char **)); ! 156: int cgetmatch __P((char *, char *)); ! 157: int cgetnext __P((char **, char **)); ! 158: int cgetnum __P((char *, char *, long *)); ! 159: int cgetset __P((char *)); ! 160: int cgetstr __P((char *, char *, char **)); ! 161: int cgetustr __P((char *, char *, char **)); ! 162: ! 163: int daemon __P((int, int)); ! 164: char *devname __P((int, int)); ! 165: int getloadavg __P((double [], int)); ! 166: ! 167: char *group_from_gid __P((unsigned long, int)); ! 168: int heapsort __P((void *, size_t, size_t, ! 169: int (*)(const void *, const void *))); ! 170: char *initstate __P((unsigned long, char *, long)); ! 171: int mergesort __P((void *, size_t, size_t, ! 172: int (*)(const void *, const void *))); ! 173: int radixsort __P((const unsigned char **, int, const unsigned char *, ! 174: unsigned)); ! 175: int sradixsort __P((const unsigned char **, int, const unsigned char *, ! 176: unsigned)); ! 177: long random __P((void)); ! 178: char *realpath __P((const char *, char resolved_path[])); ! 179: char *setstate __P((char *)); ! 180: void srandom __P((unsigned long)); ! 181: char *user_from_uid __P((unsigned long, int)); ! 182: #ifndef __STRICT_ANSI__ ! 183: long long ! 184: strtoq __P((const char *, char **, int)); ! 185: unsigned long long ! 186: strtouq __P((const char *, char **, int)); ! 187: #endif ! 188: void unsetenv __P((const char *)); ! 189: #endif ! 190: __END_DECLS ! 191: ! 192: #endif /* _STDLIB_H_ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.