1 /* $NetBSD: int.h,v 1.1.1.1 2009/12/13 16:54:39 kardel Exp $ */ 2 3 /* 4 * Copyright (C) 2004, 2005, 2007 Internet Systems Consortium, Inc. ("ISC") 5 * Copyright (C) 1999-2001 Internet Software Consortium. 6 * 7 * Permission to use, copy, modify, and/or distribute this software for any 8 * purpose with or without fee is hereby granted, provided that the above 9 * copyright notice and this permission notice appear in all copies. 10 * 11 * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH 12 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 13 * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, 14 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 15 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE 16 * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /* Id: int.h,v 1.16 2007/06/19 23:47:19 tbox Exp */ 21 22 #ifndef ISC_INT_H 23 #define ISC_INT_H 1 24 25 /*! \file */ 26 27 typedef char isc_int8_t; 28 typedef unsigned char isc_uint8_t; 29 typedef short isc_int16_t; 30 typedef unsigned short isc_uint16_t; 31 typedef int isc_int32_t; 32 typedef unsigned int isc_uint32_t; 33 typedef long long isc_int64_t; 34 typedef unsigned long long isc_uint64_t; 35 36 #define ISC_INT8_MIN -128 37 #define ISC_INT8_MAX 127 38 #define ISC_UINT8_MAX 255 39 40 #define ISC_INT16_MIN -32768 41 #define ISC_INT16_MAX 32767 42 #define ISC_UINT16_MAX 65535 43 44 /*% 45 * Note that "int" is 32 bits on all currently supported Unix-like operating 46 * systems, but "long" can be either 32 bits or 64 bits, thus the 32 bit 47 * constants are not qualified with "L". 48 */ 49 #define ISC_INT32_MIN -2147483648 50 #define ISC_INT32_MAX 2147483647 51 #define ISC_UINT32_MAX 4294967295U 52 53 #define ISC_INT64_MIN -9223372036854775808LL 54 #define ISC_INT64_MAX 9223372036854775807LL 55 #define ISC_UINT64_MAX 18446744073709551615ULL 56 57 #endif /* ISC_INT_H */ 58