xref: /csrg-svn/sys/hp300/include/limits.h (revision 54360)
136797Sbostic /*
236797Sbostic  * Copyright (c) 1988 The Regents of the University of California.
336797Sbostic  * All rights reserved.
436797Sbostic  *
544541Sbostic  * %sccs.include.redist.c%
636797Sbostic  *
7*54360Sbostic  *	@(#)limits.h	7.5 (Berkeley) 06/24/92
836797Sbostic  */
936797Sbostic 
1036797Sbostic #define	CHAR_BIT	8		/* number of bits in a char */
1136797Sbostic #define	MB_LEN_MAX	1		/* no multibyte characters */
1236797Sbostic 
1352899Sbostic #define	CLK_TCK		60		/* ticks per second */
1452899Sbostic 
1552899Sbostic /*
1652899Sbostic  * According to ANSI (section 2.2.4.2), the values below must be usable by
1752899Sbostic  * #if preprocessing directives.  Additionally, the expression must have the
1852899Sbostic  * same type as would an expression that is an object of the corresponding
1952899Sbostic  * type converted according to the integral promotions.  The subtraction for
2052899Sbostic  * INT_MIN and LONG_MIN is so the value is not unsigned; 2147483648 is an
2152899Sbostic  * unsigned int for 32-bit two's complement ANSI compilers (section 3.1.3.2).
2252899Sbostic  * These numbers work for pcc as well.
2352899Sbostic  */
2452898Sbostic #define	SCHAR_MAX	127		/* min value for a signed char */
2552898Sbostic #define	SCHAR_MIN	-128		/* max value for a signed char */
2636797Sbostic 
2752898Sbostic #define	UCHAR_MAX	255		/* max value for an unsigned char */
2852898Sbostic #define	CHAR_MAX	127		/* max value for a char */
2952899Sbostic #define	CHAR_MIN	-128		/* min value for a char */
3036797Sbostic 
3152898Sbostic #define	USHRT_MAX	65535		/* max value for an unsigned short */
3252898Sbostic #define	SHRT_MAX	32767		/* max value for a short */
3352898Sbostic #define	SHRT_MIN	-32768		/* min value for a short */
3436797Sbostic 
3552898Sbostic #define	UINT_MAX	4294967295	/* max value for an unsigned int */
3652898Sbostic #define	INT_MAX		2147483647	/* max value for an int */
3752898Sbostic #define	INT_MIN		(-2147483647-1)	/* min value for an int */
3836797Sbostic 
3952898Sbostic #define	ULONG_MAX	4294967295	/* max value for an unsigned long */
4052898Sbostic #define	LONG_MAX	2147483647	/* max value for a long */
4152898Sbostic #define	LONG_MIN	(-2147483647-1)	/* min value for a long */
42*54360Sbostic 
43*54360Sbostic /* Maximum/minimum values for types from <machine/include/ansi.h>. */
44*54360Sbostic #ifndef _ANSI_SOURCE
45*54360Sbostic #define	SIZE_T_MAX	UINT_MAX
46*54360Sbostic #endif
47