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