147186Sbostic /*- 263160Sbostic * Copyright (c) 1990, 1993 363160Sbostic * The Regents of the University of California. All rights reserved. 447186Sbostic * 547186Sbostic * %sccs.include.redist.c% 647186Sbostic * 7*65415Sbostic * @(#)ansi.h 8.2 (Berkeley) 01/04/94 847186Sbostic */ 947186Sbostic 1047186Sbostic #ifndef _ANSI_H_ 1147186Sbostic #define _ANSI_H_ 1247186Sbostic 1347186Sbostic /* 1447186Sbostic * Types which are fundamental to the implementation and may appear in 1547186Sbostic * more than one standard header are defined here. Standard headers 1647186Sbostic * then use: 1754255Sbostic * #ifdef _BSD_SIZE_T_ 1854255Sbostic * typedef _BSD_SIZE_T_ size_t; 1954255Sbostic * #undef _BSD_SIZE_T_ 2047186Sbostic * #endif 2147186Sbostic */ 2254255Sbostic #define _BSD_CLOCK_T_ unsigned long /* clock() */ 2354255Sbostic #define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */ 2454255Sbostic #define _BSD_SIZE_T_ unsigned int /* sizeof() */ 2554255Sbostic #define _BSD_SSIZE_T_ int /* byte count or error */ 2654255Sbostic #define _BSD_TIME_T_ long /* time() */ 2754255Sbostic #define _BSD_VA_LIST_ char * /* va_list */ 2847186Sbostic 2960450Sbostic /* 3060450Sbostic * Runes (wchar_t) is declared to be an ``int'' instead of the more natural 3160450Sbostic * ``unsigned long'' or ``long''. Two things are happening here. It is not 3260450Sbostic * unsigned so that EOF (-1) can be naturally assigned to it and used. Also, 3360450Sbostic * it looks like 10646 will be a 31 bit standard. This means that if your 3460450Sbostic * ints cannot hold 32 bits, you will be in trouble. The reason an int was 3560450Sbostic * chosen over a long is that the is*() and to*() routines take ints (says 3660450Sbostic * ANSI C), but they use _RUNE_T_ instead of int. By changing it here, you 3760450Sbostic * lose a bit of ANSI conformance, but your programs will still work. 3860450Sbostic * 3960450Sbostic * Note that _WCHAR_T_ and _RUNE_T_ must be of the same type. When wchar_t 4060450Sbostic * and rune_t are typedef'd, _WCHAR_T_ will be undef'd, but _RUNE_T remains 4160450Sbostic * defined for ctype.h. 4260450Sbostic */ 4360450Sbostic #define _BSD_WCHAR_T_ int /* wchar_t */ 4460450Sbostic #define _BSD_RUNE_T_ int /* rune_t */ 4560450Sbostic 4647186Sbostic #endif /* _ANSI_H_ */ 47