limits.h revision 719
150397Sobrien/* 2169689Skan * Copyright (c) 1988 The Regents of the University of California. 3169689Skan * All rights reserved. 418334Speter * 518334Speter * Redistribution and use in source and binary forms, with or without 618334Speter * modification, are permitted provided that the following conditions 7132718Skan * are met: 818334Speter * 1. Redistributions of source code must retain the above copyright 9132718Skan * notice, this list of conditions and the following disclaimer. 1018334Speter * 2. Redistributions in binary form must reproduce the above copyright 1118334Speter * notice, this list of conditions and the following disclaimer in the 1218334Speter * documentation and/or other materials provided with the distribution. 1318334Speter * 3. All advertising materials mentioning features or use of this software 14132718Skan * must display the following acknowledgement: 1518334Speter * This product includes software developed by the University of 1618334Speter * California, Berkeley and its contributors. 1718334Speter * 4. Neither the name of the University nor the names of its contributors 1818334Speter * may be used to endorse or promote products derived from this software 1918334Speter * without specific prior written permission. 20132718Skan * 21169689Skan * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 22169689Skan * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 2318334Speter * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 2490075Sobrien * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 2590075Sobrien * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26132718Skan * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2718334Speter * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2818334Speter * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2918334Speter * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 3018334Speter * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 3118334Speter * SUCH DAMAGE. 3218334Speter * 3318334Speter * from: @(#)limits.h 7.2 (Berkeley) 6/28/90 3418334Speter * $Id: limits.h,v 1.2 1993/10/16 14:39:19 rgrimes Exp $ 35132718Skan */ 36132718Skan 37132718Skan#ifndef _MACHINE_LIMITS_H_ 38132718Skan#define _MACHINE_LIMITS_H_ 1 3950397Sobrien 4050397Sobrien#define CHAR_BIT 8 /* number of bits in a char */ 4150397Sobrien#define CLK_TCK 60 /* ticks per second */ 4218334Speter#define MB_LEN_MAX 1 /* no multibyte characters */ 4318334Speter 4490075Sobrien#define SCHAR_MIN (-0x7f-1) /* max value for a signed char */ 4518334Speter#define SCHAR_MAX 0x7f /* min value for a signed char */ 4690075Sobrien 4790075Sobrien#define UCHAR_MAX 0xff /* max value for an unsigned char */ 4890075Sobrien#define CHAR_MAX 0x7f /* max value for a char */ 4918334Speter#define CHAR_MIN (-0x7f-1) /* min value for a char */ 50132718Skan 5190075Sobrien#define USHRT_MAX 0xffff /* max value for an unsigned short */ 52117395Skan#define SHRT_MAX 0x7fff /* max value for a short */ 53117395Skan#define SHRT_MIN (-0x7fff-1) /* min value for a short */ 5418334Speter 55117395Skan#define UINT_MAX 0xffffffff /* max value for an unsigned int */ 5690075Sobrien#define INT_MAX 0x7fffffff /* max value for an int */ 5790075Sobrien#define INT_MIN (-0x7fffffff-1) /* min value for an int */ 58117395Skan 59117395Skan#define ULONG_MAX 0xffffffff /* max value for an unsigned long */ 6090075Sobrien#define LONG_MAX 0x7fffffff /* max value for a long */ 6118334Speter#define LONG_MIN (-0x7fffffff-1) /* min value for a long */ 6218334Speter#endif /* _MACHINE_LIMITS_H_ */ 6318334Speter