stdint.h 756 B

12345678910111213141516171819202122232425262728
  1. /* Minimal freestanding stdint.h for the ring-3 libc. */
  2. #ifndef LIBC_STDINT_H
  3. #define LIBC_STDINT_H
  4. typedef __INT8_TYPE__ int8_t;
  5. typedef __UINT8_TYPE__ uint8_t;
  6. typedef __INT16_TYPE__ int16_t;
  7. typedef __UINT16_TYPE__ uint16_t;
  8. typedef __INT32_TYPE__ int32_t;
  9. typedef __UINT32_TYPE__ uint32_t;
  10. typedef __INT64_TYPE__ int64_t;
  11. typedef __UINT64_TYPE__ uint64_t;
  12. typedef __INTPTR_TYPE__ intptr_t;
  13. typedef __UINTPTR_TYPE__ uintptr_t;
  14. typedef __INTMAX_TYPE__ intmax_t;
  15. typedef __UINTMAX_TYPE__ uintmax_t;
  16. #define INT8_MAX 0x7f
  17. #define INT16_MAX 0x7fff
  18. #define INT32_MAX 0x7fffffff
  19. #define INT64_MAX 0x7fffffffffffffffLL
  20. #define UINT8_MAX 0xffu
  21. #define UINT16_MAX 0xffffu
  22. #define UINT32_MAX 0xffffffffu
  23. #define UINT64_MAX 0xffffffffffffffffULL
  24. #endif