remove math library specific part of copyright
[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 *
af13b606 7 * @(#)stdlib.h 5.12 (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_
15typedef _WCHAR_T_ wchar_t;
16#undef _WCHAR_T_
17#endif
18
19typedef struct {
20 int quot; /* quotient */
21 int rem; /* remainder */
22} div_t;
23typedef 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
38void abort __P((void));
39int abs __P((int));
11e892b9 40int atexit __P((void (*)(void)));
993000f1
DS
41double atof __P((const char *));
42int atoi __P((const char *));
43long atol __P((const char *));
44void *bsearch __P((const void *, const void *, size_t,
45 size_t, int (*)(const void *, const void *)));
46void *calloc __P((size_t, size_t));
47div_t div __P((int, int));
48void exit __P((int));
49void free __P((void *));
50char *getenv __P((const char *));
9992a62a 51long labs __P((long));
993000f1
DS
52ldiv_t ldiv __P((long, long));
53void *malloc __P((size_t));
54void qsort __P((void *, size_t, size_t,
55 int (*)(const void *, const void *)));
9992a62a 56int rand __P((void));
993000f1
DS
57void *realloc __P((void *, size_t));
58void srand __P((unsigned));
59double strtod __P((const char *, char **));
60long strtol __P((const char *, char **, int));
fac5dcaf 61unsigned long
993000f1
DS
62 strtoul __P((const char *, char **, int));
63int system __P((const char *));
1cc1b02a 64
b0aa9dc4 65/* these are currently just stubs */
993000f1
DS
66int mblen __P((const char *, size_t));
67size_t mbstowcs __P((wchar_t *, const char *, size_t));
68int wctomb __P((char *, wchar_t));
69int mbtowc __P((wchar_t *, const char *, size_t));
70size_t wcstombs __P((char *, const wchar_t *, size_t));
b0aa9dc4 71
6670c0eb 72#ifndef _ANSI_SOURCE
993000f1
DS
73void cfree __P((void *));
74int putenv __P((const char *));
75int setenv __P((const char *, const char *, int));
76#endif /* not ANSI */
77
78#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
79void *alloca __P((size_t)); /* built-in for gcc */
af13b606
DS
80extern char *optarg; /* getopt(3) external variables */
81extern int optind;
82extern int opterr;
83265d28 83int getopt __P((int, char * const *, const char *));
af13b606 84extern char *suboptarg; /* getsubopt(3) external variable */
f7c699ab 85int getsubopt __P((char **, char * 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_ */