xref: /original-bsd/share/zoneinfo/DIST/nonstd.h (revision a8ef28ca)
1ab135e72Sbostic #ifndef NONSTD_H
2ab135e72Sbostic 
3ab135e72Sbostic #define NONSTD_H
4ab135e72Sbostic 
5ab135e72Sbostic #ifndef lint
6ab135e72Sbostic #ifndef NOID
7ab135e72Sbostic static char	nonstdhid[] = "@(#)nonstd.h	4.2";
8ab135e72Sbostic #endif /* !defined NOID */
9ab135e72Sbostic #endif /* !defined lint */
10ab135e72Sbostic 
11ab135e72Sbostic #ifdef __STDC__
12ab135e72Sbostic 
13ab135e72Sbostic #define P(s)		s
14ab135e72Sbostic 
15ab135e72Sbostic #ifdef __TURBOC__
16ab135e72Sbostic /*
17ab135e72Sbostic ** Cover for stupid Turbo C
18ab135e72Sbostic */
19ab135e72Sbostic #define genericptr_t	void *
20ab135e72Sbostic #else /* !defined __TURBOC__ */
21ab135e72Sbostic typedef void *		genericptr_t;
22ab135e72Sbostic #endif /* !defined __TURBOC__ */
23ab135e72Sbostic 
24ab135e72Sbostic #define alloc_size_t	size_t
25ab135e72Sbostic #define qsort_size_t	size_t
26ab135e72Sbostic #define fread_size_t	size_t
27ab135e72Sbostic #define fwrite_size_t	size_t
28ab135e72Sbostic 
29ab135e72Sbostic #else /* !defined __STDC__ */
30ab135e72Sbostic 
31*a8ef28caSdonn #define P(s)		()
32ab135e72Sbostic 
33ab135e72Sbostic #ifndef genericptr_t
34ab135e72Sbostic typedef char *		genericptr_t;
35ab135e72Sbostic #endif /* !defined genericptr_t */
36ab135e72Sbostic 
37ab135e72Sbostic #ifndef alloc_size_t
38ab135e72Sbostic typedef unsigned	alloc_size_t;
39ab135e72Sbostic #endif /* !defined alloc_size_t */
40ab135e72Sbostic 
41ab135e72Sbostic #ifndef qsort_size_t
42ab135e72Sbostic #ifdef unix
43ab135e72Sbostic #include "sys/param.h"
44ab135e72Sbostic #endif /* defined unix */
45ab135e72Sbostic #ifdef BSD
46ab135e72Sbostic typedef int		qsort_size_t;
47ab135e72Sbostic #else /* !defined BSD */
48ab135e72Sbostic typedef unsigned	qsort_size_t;
49ab135e72Sbostic #endif /* !defined BSD */
50ab135e72Sbostic #endif /* !defined qsort_size_t */
51ab135e72Sbostic 
52ab135e72Sbostic #ifndef fread_size_t
53ab135e72Sbostic typedef int		fread_size_t;
54ab135e72Sbostic #endif /* !defined fread_size_t */
55ab135e72Sbostic 
56ab135e72Sbostic #ifndef fwrite_size_t
57ab135e72Sbostic typedef int		fwrite_size_t;
58ab135e72Sbostic #endif /* !defined fwrite_size_t */
59ab135e72Sbostic 
60ab135e72Sbostic #define const
61ab135e72Sbostic #define volatile
62ab135e72Sbostic 
63ab135e72Sbostic #endif /* !defined __STDC__ */
64ab135e72Sbostic 
65ab135e72Sbostic #endif /* !defined NONSTD_H */
66ab135e72Sbostic 
67ab135e72Sbostic /*
68ab135e72Sbostic ** UNIX is a registered trademark of AT&T.
69ab135e72Sbostic */
70