_limits.h revision 4
14Srgrimes/*
24Srgrimes * Copyright (c) 1988 The Regents of the University of California.
34Srgrimes * All rights reserved.
44Srgrimes *
54Srgrimes * Redistribution and use in source and binary forms, with or without
64Srgrimes * modification, are permitted provided that the following conditions
74Srgrimes * are met:
84Srgrimes * 1. Redistributions of source code must retain the above copyright
94Srgrimes *    notice, this list of conditions and the following disclaimer.
104Srgrimes * 2. Redistributions in binary form must reproduce the above copyright
114Srgrimes *    notice, this list of conditions and the following disclaimer in the
124Srgrimes *    documentation and/or other materials provided with the distribution.
134Srgrimes * 3. All advertising materials mentioning features or use of this software
144Srgrimes *    must display the following acknowledgement:
154Srgrimes *	This product includes software developed by the University of
164Srgrimes *	California, Berkeley and its contributors.
174Srgrimes * 4. Neither the name of the University nor the names of its contributors
184Srgrimes *    may be used to endorse or promote products derived from this software
194Srgrimes *    without specific prior written permission.
204Srgrimes *
214Srgrimes * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
224Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
234Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
244Srgrimes * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
254Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
264Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
274Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
284Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
294Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
304Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
314Srgrimes * SUCH DAMAGE.
324Srgrimes *
334Srgrimes *	@(#)limits.h	7.2 (Berkeley) 6/28/90
344Srgrimes */
354Srgrimes
364Srgrimes#define	CHAR_BIT	8		/* number of bits in a char */
374Srgrimes#define	CLK_TCK		60		/* ticks per second */
384Srgrimes#define	MB_LEN_MAX	1		/* no multibyte characters */
394Srgrimes
404Srgrimes#define SCHAR_MIN	(-0x7f-1)	/* max value for a signed char */
414Srgrimes#define	SCHAR_MAX	0x7f		/* min value for a signed char */
424Srgrimes
434Srgrimes#define	UCHAR_MAX	0xff		/* max value for an unsigned char */
444Srgrimes#define	CHAR_MAX	0x7f		/* max value for a char */
454Srgrimes#define	CHAR_MIN	(-0x7f-1)	/* min value for a char */
464Srgrimes
474Srgrimes#define	USHRT_MAX	0xffff		/* max value for an unsigned short */
484Srgrimes#define	SHRT_MAX	0x7fff		/* max value for a short */
494Srgrimes#define SHRT_MIN        (-0x7fff-1)     /* min value for a short */
504Srgrimes
514Srgrimes#define	UINT_MAX	0xffffffff	/* max value for an unsigned int */
524Srgrimes#define	INT_MAX		0x7fffffff	/* max value for an int */
534Srgrimes#define	INT_MIN		(-0x7fffffff-1)	/* min value for an int */
544Srgrimes
554Srgrimes#define	ULONG_MAX	0xffffffff	/* max value for an unsigned long */
564Srgrimes#define	LONG_MAX	0x7fffffff	/* max value for a long */
574Srgrimes#define	LONG_MIN	(-0x7fffffff-1)	/* min value for a long */
58