/contrib/bind9/lib/isc/unix/include/isc/int.h

https://bitbucket.org/freebsd/freebsd-head/ · C++ Header · 55 lines · 23 code · 9 blank · 23 comment · 0 complexity · aa55ff3e53f860b23057663d2dba31bf MD5 · raw file

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