/contrib/ntp/include/isc/int.h

https://bitbucket.org/freebsd/freebsd-head/ · C++ Header · 53 lines · 23 code · 8 blank · 22 comment · 0 complexity · d59f2ba534e2ef3e159029096f971ca0 MD5 · raw file

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