1290001Sglebius/*
2290001Sglebius * Copyright (C) 2004, 2005, 2007  Internet Systems Consortium, Inc. ("ISC")
3290001Sglebius * Copyright (C) 1999-2001  Internet Software Consortium.
4290001Sglebius *
5290001Sglebius * Permission to use, copy, modify, and/or distribute this software for any
6290001Sglebius * purpose with or without fee is hereby granted, provided that the above
7290001Sglebius * copyright notice and this permission notice appear in all copies.
8290001Sglebius *
9290001Sglebius * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10290001Sglebius * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11290001Sglebius * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12290001Sglebius * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13290001Sglebius * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14290001Sglebius * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15290001Sglebius * PERFORMANCE OF THIS SOFTWARE.
16290001Sglebius */
17290001Sglebius
18290001Sglebius/* $Id: int.h,v 1.16 2007/06/19 23:47:19 tbox Exp $ */
19290001Sglebius
20290001Sglebius#ifndef ISC_INT_H
21290001Sglebius#define ISC_INT_H 1
22290001Sglebius
23290001Sglebius/*! \file */
24290001Sglebius
25290001Sglebiustypedef char				isc_int8_t;
26290001Sglebiustypedef unsigned char			isc_uint8_t;
27290001Sglebiustypedef short				isc_int16_t;
28290001Sglebiustypedef unsigned short			isc_uint16_t;
29290001Sglebiustypedef int				isc_int32_t;
30290001Sglebiustypedef unsigned int			isc_uint32_t;
31290001Sglebiustypedef long long			isc_int64_t;
32290001Sglebiustypedef unsigned long long		isc_uint64_t;
33290001Sglebius
34290001Sglebius#define ISC_INT8_MIN	-128
35290001Sglebius#define ISC_INT8_MAX	127
36290001Sglebius#define ISC_UINT8_MAX	255
37290001Sglebius
38290001Sglebius#define ISC_INT16_MIN	-32768
39290001Sglebius#define ISC_INT16_MAX	32767
40290001Sglebius#define ISC_UINT16_MAX	65535
41290001Sglebius
42290001Sglebius/*%
43290001Sglebius * Note that "int" is 32 bits on all currently supported Unix-like operating
44290001Sglebius * systems, but "long" can be either 32 bits or 64 bits, thus the 32 bit
45290001Sglebius * constants are not qualified with "L".
46290001Sglebius */
47290001Sglebius#define ISC_INT32_MIN	-2147483648
48290001Sglebius#define ISC_INT32_MAX	2147483647
49290001Sglebius#define ISC_UINT32_MAX	4294967295U
50290001Sglebius
51290001Sglebius#define ISC_INT64_MIN	-9223372036854775808LL
52290001Sglebius#define ISC_INT64_MAX	9223372036854775807LL
53290001Sglebius#define ISC_UINT64_MAX	18446744073709551615ULL
54290001Sglebius
55290001Sglebius#endif /* ISC_INT_H */
56