xref: /original-bsd/sys/hp300/include/ansi.h (revision 3705696b)
1 /*-
2  * Copyright (c) 1990, 1993
3  *	The Regents of the University of California.  All rights reserved.
4  *
5  * %sccs.include.redist.c%
6  *
7  *	@(#)ansi.h	8.1 (Berkeley) 06/10/93
8  */
9 
10 #ifndef	_ANSI_H_
11 #define	_ANSI_H_
12 
13 /*
14  * Types which are fundamental to the implementation and may appear in
15  * more than one standard header are defined here.  Standard headers
16  * then use:
17  *	#ifdef	_BSD_SIZE_T_
18  *	typedef	_BSD_SIZE_T_ size_t;
19  *	#undef	_BSD_SIZE_T_
20  *	#endif
21  *
22  * Thanks, ANSI!
23  */
24 #define	_BSD_CLOCK_T_	unsigned long		/* clock() */
25 #define	_BSD_PTRDIFF_T_	int			/* ptr1 - ptr2 */
26 #define	_BSD_SIZE_T_	unsigned int		/* sizeof() */
27 #define	_BSD_SSIZE_T_	int			/* byte count or error */
28 #define	_BSD_TIME_T_	long			/* time() */
29 #define	_BSD_VA_LIST_	char *			/* va_list */
30 
31 /*
32  * Runes (wchar_t) is declared to be an ``int'' instead of the more natural
33  * ``unsigned long'' or ``long''.  Two things are happening here.  It is not
34  * unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
35  * it looks like 10646 will be a 31 bit standard.  This means that if your
36  * ints cannot hold 32 bits, you will be in trouble.  The reason an int was
37  * chosen over a long is that the is*() and to*() routines take ints (says
38  * ANSI C), but they use _RUNE_T_ instead of int.  By changing it here, you
39  * lose a bit of ANSI conformance, but your programs will still work.
40  *
41  * Note that _WCHAR_T_ and _RUNE_T_ must be of the same type.  When wchar_t
42  * and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains
43  * defined for ctype.h.
44  */
45 #define	_BSD_WCHAR_T_	int			/* wchar_t */
46 #define	_BSD_RUNE_T_	int			/* rune_t */
47 
48 #endif	/* _ANSI_H_ */
49