limits.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /* Number of bits in a `char'. */
  2. #define CHAR_BIT 8
  3. /* No multibyte characters supported yet. */
  4. #define MB_LEN_MAX 1
  5. /* Minimum and maximum values a `signed char' can hold. */
  6. #define SCHAR_MIN -128
  7. #define SCHAR_MAX 127
  8. /* Maximum value an `unsigned char' can hold. (Minimum is 0). */
  9. #define UCHAR_MAX 255U
  10. /* Minimum and maximum values a `char' can hold. */
  11. #ifdef __CHAR_UNSIGNED__
  12. #define CHAR_MIN 0
  13. #define CHAR_MAX 255U
  14. #else
  15. #define CHAR_MIN -128
  16. #define CHAR_MAX 127
  17. #endif
  18. /* Minimum and maximum values a `signed short int' can hold. */
  19. #define SHRT_MIN -32768
  20. #define SHRT_MAX 32767
  21. /* Maximum value an `unsigned short int' can hold. (Minimum is 0). */
  22. #define USHRT_MAX 65535U
  23. /* Minimum and maximum values a `signed int' can hold. */
  24. #define INT_MIN -2147483648
  25. #define INT_MAX 2147483647
  26. /* Maximum value an `unsigned int' can hold. (Minimum is 0). */
  27. #define UINT_MAX 4294967295U
  28. /* Minimum and maximum values a `signed long int' can hold.
  29. (Same as `int'). */
  30. #define LONG_MIN -2147483648
  31. #define LONG_MAX 2147483647
  32. /* Maximum value an `unsigned long int' can hold. (Minimum is 0). */
  33. #define ULONG_MAX 4294967295U