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