Commit | Line | Data |
---|---|---|
1cc1b02a KB |
1 | /*- |
2 | * Copyright (c) 1990 The Regents of the University of California. | |
3 | * All rights reserved. | |
4 | * | |
5 | * %sccs.include.redist.c% | |
6 | * | |
f7c699ab | 7 | * @(#)stdlib.h 5.11 (Berkeley) %G% |
1cc1b02a KB |
8 | */ |
9 | ||
10 | #ifndef _STDLIB_H_ | |
11 | #define _STDLIB_H_ | |
f5e55301 | 12 | #include <sys/types.h> |
1cc1b02a KB |
13 | |
14 | #ifdef _WCHAR_T_ | |
15 | typedef _WCHAR_T_ wchar_t; | |
16 | #undef _WCHAR_T_ | |
17 | #endif | |
18 | ||
19 | typedef struct { | |
20 | int quot; /* quotient */ | |
21 | int rem; /* remainder */ | |
22 | } div_t; | |
23 | typedef struct { | |
24 | long quot; /* quotient */ | |
25 | long rem; /* remainder */ | |
26 | } ldiv_t; | |
27 | ||
28 | #define EXIT_FAILURE 1 | |
29 | #define EXIT_SUCCESS 0 | |
30 | ||
f5e55301 | 31 | #define RAND_MAX 0x7fffffff |
1cc1b02a KB |
32 | |
33 | #define MB_CUR_MAX 1 /* XXX */ | |
34 | ||
9992a62a KB |
35 | #include <sys/cdefs.h> |
36 | ||
37 | __BEGIN_DECLS | |
38 | void abort __P((void)); | |
39 | int abs __P((int)); | |
11e892b9 | 40 | int atexit __P((void (*)(void))); |
993000f1 DS |
41 | double atof __P((const char *)); |
42 | int atoi __P((const char *)); | |
43 | long atol __P((const char *)); | |
44 | void *bsearch __P((const void *, const void *, size_t, | |
45 | size_t, int (*)(const void *, const void *))); | |
46 | void *calloc __P((size_t, size_t)); | |
47 | div_t div __P((int, int)); | |
48 | void exit __P((int)); | |
49 | void free __P((void *)); | |
50 | char *getenv __P((const char *)); | |
9992a62a | 51 | long labs __P((long)); |
993000f1 DS |
52 | ldiv_t ldiv __P((long, long)); |
53 | void *malloc __P((size_t)); | |
54 | void qsort __P((void *, size_t, size_t, | |
55 | int (*)(const void *, const void *))); | |
9992a62a | 56 | int rand __P((void)); |
993000f1 DS |
57 | void *realloc __P((void *, size_t)); |
58 | void srand __P((unsigned)); | |
59 | double strtod __P((const char *, char **)); | |
60 | long strtol __P((const char *, char **, int)); | |
fac5dcaf | 61 | unsigned long |
993000f1 DS |
62 | strtoul __P((const char *, char **, int)); |
63 | int system __P((const char *)); | |
1cc1b02a | 64 | |
b0aa9dc4 | 65 | /* these are currently just stubs */ |
993000f1 DS |
66 | int mblen __P((const char *, size_t)); |
67 | size_t mbstowcs __P((wchar_t *, const char *, size_t)); | |
68 | int wctomb __P((char *, wchar_t)); | |
69 | int mbtowc __P((wchar_t *, const char *, size_t)); | |
70 | size_t wcstombs __P((char *, const wchar_t *, size_t)); | |
b0aa9dc4 | 71 | |
6670c0eb | 72 | #ifndef _ANSI_SOURCE |
993000f1 DS |
73 | void cfree __P((void *)); |
74 | int putenv __P((const char *)); | |
75 | int setenv __P((const char *, const char *, int)); | |
76 | #endif /* not ANSI */ | |
77 | ||
78 | #if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) | |
79 | void *alloca __P((size_t)); /* built-in for gcc */ | |
83265d28 | 80 | int getopt __P((int, char * const *, const char *)); |
f7c699ab | 81 | int getsubopt __P((char **, char * const *, char **)); |
993000f1 DS |
82 | char *initstate __P((unsigned, char *, int)); |
83 | int radixsort __P((const u_char **, int, const u_char *, u_char)); | |
84 | long random __P((void)); | |
85 | char *setstate __P((char *)); | |
86 | void srandom __P((unsigned)); | |
87 | void unsetenv __P((const char *)); | |
88 | #endif /* neither ANSI nor POSIX */ | |
1cc1b02a | 89 | |
9992a62a | 90 | __END_DECLS |
fac5dcaf | 91 | |
1cc1b02a | 92 | #endif /* _STDLIB_H_ */ |