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