limits.h 607 B

12345678910111213141516171819202122232425262728
  1. #ifndef __LIMITS_H
  2. #define __LIMITS_H
  3. #define CHAR_BIT 8
  4. #define CHAR_MIN (-128)
  5. #define CHAR_MAX 127
  6. #define SCHAR_MIN CHAR_MIN
  7. #define SCHAR_MAX CHAR_MAX
  8. #define UCHAR_MAX 256
  9. #define SHRT_MIN (-32768)
  10. #define SHRT_MAX 32767
  11. #define USHRT_MAX 65535
  12. // Use a subtraction to avoid intermediate overflows
  13. #define INT_MIN (-2147483647-1)
  14. #define INT_MAX 2147483647
  15. #define UINT_MAX 4294967295U
  16. #define LONG_MIN INT_MIN
  17. #define LONG_MAX INT_MAX
  18. #define ULONG_MAX UINT_MAX
  19. #define LLONG_MIN (-9223372036854775807L-1)
  20. #define LLONG_MAX 9223372036854775807L
  21. #define ULLONG_MAX 18446744073709551615UL
  22. #endif