xref: /original-bsd/sys/hp300/include/ansi.h (revision 333da485)
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.2 (Berkeley) 01/04/94
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 #define	_BSD_CLOCK_T_	unsigned long		/* clock() */
23 #define	_BSD_PTRDIFF_T_	int			/* ptr1 - ptr2 */
24 #define	_BSD_SIZE_T_	unsigned int		/* sizeof() */
25 #define	_BSD_SSIZE_T_	int			/* byte count or error */
26 #define	_BSD_TIME_T_	long			/* time() */
27 #define	_BSD_VA_LIST_	char *			/* va_list */
28 
29 /*
30  * Runes (wchar_t) is declared to be an ``int'' instead of the more natural
31  * ``unsigned long'' or ``long''.  Two things are happening here.  It is not
32  * unsigned so that EOF (-1) can be naturally assigned to it and used.  Also,
33  * it looks like 10646 will be a 31 bit standard.  This means that if your
34  * ints cannot hold 32 bits, you will be in trouble.  The reason an int was
35  * chosen over a long is that the is*() and to*() routines take ints (says
36  * ANSI C), but they use _RUNE_T_ instead of int.  By changing it here, you
37  * lose a bit of ANSI conformance, but your programs will still work.
38  *
39  * Note that _WCHAR_T_ and _RUNE_T_ must be of the same type.  When wchar_t
40  * and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains
41  * defined for ctype.h.
42  */
43 #define	_BSD_WCHAR_T_	int			/* wchar_t */
44 #define	_BSD_RUNE_T_	int			/* rune_t */
45 
46 #endif	/* _ANSI_H_ */
47