xref: /csrg-svn/share/zoneinfo/DIST/stdlib.h (revision 39986)
1*39986Sbostic #ifndef lint
2*39986Sbostic #ifndef NOID
3*39986Sbostic #ifndef STDLIB_H
4*39986Sbostic #define STDLIB_H
5*39986Sbostic static char	stdlibhid[] = "@(#)stdlib.h	4.5";
6*39986Sbostic #endif /* !defined STDLIB_H */
7*39986Sbostic #endif /* !defined NOID */
8*39986Sbostic #endif /* !defined lint */
9*39986Sbostic 
10*39986Sbostic #ifdef __STDC__
11*39986Sbostic #ifndef __GNUC__
12*39986Sbostic #define LOOK_FOR_STDLIB
13*39986Sbostic #endif /* !defined __GNUC__ */
14*39986Sbostic #endif /* defined __STDC__ */
15*39986Sbostic 
16*39986Sbostic #ifdef LOOK_FOR_STDLIB
17*39986Sbostic #undef LOOK_FOR_STDLIB
18*39986Sbostic 
19*39986Sbostic #ifdef STDLIB_RECURSING
20*39986Sbostic #include "/usr/include/stdlib.h"
21*39986Sbostic #else /* !defined STDLIB_RECURSING */
22*39986Sbostic #define STDLIB_RECURSING
23*39986Sbostic #include <stdlib.h>
24*39986Sbostic #undef STDLIB_RECURSING
25*39986Sbostic #endif /* !defined STDLIB_RECURSING */
26*39986Sbostic 
27*39986Sbostic #ifndef NULL
28*39986Sbostic /*
29*39986Sbostic ** Stupid Turbo C doesn't define NULL in stdlib.h
30*39986Sbostic */
31*39986Sbostic #include <stdio.h>
32*39986Sbostic #endif /* !defined NULL */
33*39986Sbostic 
34*39986Sbostic #else /* !defined LOOK_FOR_STDLIB */
35*39986Sbostic 
36*39986Sbostic /*
37*39986Sbostic ** size_t
38*39986Sbostic */
39*39986Sbostic 
40*39986Sbostic #include "sys/types.h"
41*39986Sbostic 
42*39986Sbostic #ifndef EXIT_SUCCESS
43*39986Sbostic #define EXIT_SUCCESS	0
44*39986Sbostic #endif /* !defined EXIT_SUCCESS */
45*39986Sbostic 
46*39986Sbostic #ifndef EXIT_FAILURE
47*39986Sbostic #define EXIT_FAILURE	1
48*39986Sbostic #endif /* !defined EXIT_FAILURE */
49*39986Sbostic 
50*39986Sbostic #ifndef NULL
51*39986Sbostic #include <stdio.h>
52*39986Sbostic #endif /* !defined NULL */
53*39986Sbostic 
54*39986Sbostic /*
55*39986Sbostic ** String conversion functions
56*39986Sbostic */
57*39986Sbostic 
58*39986Sbostic #include <math.h>
59*39986Sbostic 
60*39986Sbostic /*
61*39986Sbostic ** Memory management functions
62*39986Sbostic */
63*39986Sbostic 
64*39986Sbostic extern char *	calloc();
65*39986Sbostic extern char *	malloc();
66*39986Sbostic extern char *	realloc();
67*39986Sbostic 
68*39986Sbostic #ifdef USG
69*39986Sbostic extern void	free();
70*39986Sbostic #endif /* defined USG */
71*39986Sbostic 
72*39986Sbostic /*
73*39986Sbostic ** Communication with the environment
74*39986Sbostic */
75*39986Sbostic 
76*39986Sbostic extern char *	getenv();
77*39986Sbostic 
78*39986Sbostic #ifdef USG
79*39986Sbostic extern void	exit();
80*39986Sbostic #endif /* defined USG */
81*39986Sbostic 
82*39986Sbostic /*
83*39986Sbostic ** Searching and sorting functions
84*39986Sbostic */
85*39986Sbostic 
86*39986Sbostic #ifdef USG
87*39986Sbostic extern void	qsort();
88*39986Sbostic #endif /* defined USG */
89*39986Sbostic 
90*39986Sbostic #endif /* !defined LOOK_FOR_STDLIB */
91