stdint.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #pragma once
  2. #include <sys/cdefs.h>
  3. __BEGIN_DECLS
  4. typedef __UINT64_TYPE__ uint64_t;
  5. typedef __UINT32_TYPE__ uint32_t;
  6. typedef __UINT16_TYPE__ uint16_t;
  7. typedef __UINT8_TYPE__ uint8_t;
  8. typedef __INT64_TYPE__ int64_t;
  9. typedef __INT32_TYPE__ int32_t;
  10. typedef __INT16_TYPE__ int16_t;
  11. typedef __INT8_TYPE__ int8_t;
  12. typedef __UINT_FAST8_TYPE__ uint_fast8_t;
  13. typedef __UINT_FAST16_TYPE__ uint_fast16_t;
  14. typedef __UINT_FAST32_TYPE__ uint_fast32_t;
  15. typedef __UINT_FAST64_TYPE__ uint_fast64_t;
  16. typedef __INT_FAST8_TYPE__ int_fast8_t;
  17. typedef __INT_FAST16_TYPE__ int_fast16_t;
  18. typedef __INT_FAST32_TYPE__ int_fast32_t;
  19. typedef __INT_FAST64_TYPE__ int_fast64_t;
  20. #define __int8_t_defined 1
  21. #define __uint8_t_defined 1
  22. #define __int16_t_defined 1
  23. #define __uint16_t_defined 1
  24. #define __int32_t_defined 1
  25. #define __uint32_t_defined 1
  26. #define __int64_t_defined 1
  27. #define __uint64_t_defined 1
  28. typedef __PTRDIFF_TYPE__ uintptr_t;
  29. typedef __PTRDIFF_TYPE__ intptr_t;
  30. #define INTPTR_MAX PTRDIFF_MAX
  31. #define INTPTR_MIN PTRDIFF_MIN
  32. #define UINTPTR_MAX __UINTPTR_MAX__
  33. typedef __UINTMAX_TYPE__ uintmax_t;
  34. #define UINTMAX_MAX __UINTMAX_MAX__
  35. #define UINTMAX_MIN __UINTMAX_MIN__
  36. typedef __INTMAX_TYPE__ intmax_t;
  37. #define INTMAX_MAX __INTMAX_MAX__
  38. #define INTMAX_MIN (-INTMAX_MAX - 1)
  39. #define INT8_MIN (-128)
  40. #define INT16_MIN (-32767-1)
  41. #define INT32_MIN (-2147483647-1)
  42. #define INT8_MAX (127)
  43. #define INT16_MAX (32767)
  44. #define INT32_MAX (2147483647)
  45. #define UINT8_MAX (255)
  46. #define UINT16_MAX (65535)
  47. #define UINT32_MAX (4294967295U)
  48. #define INT64_C(x) x##LL
  49. #define UINT64_C(x) x##ULL
  50. __END_DECLS