inttypes.h.in 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /* This is an ISO C 9X header file. We omit this copy to the include
  2. directory if the local platform does not have inttypes.h, it contains
  3. [u]int[8,16,32]_t fixed width types */
  4. #include <config.h>
  5. #undef int32_t
  6. #undef uint32_t
  7. #undef int16_t
  8. #undef uint16_t
  9. #undef int8_t
  10. #undef uint8_t
  11. /* Generate the fixed bit size types */
  12. #if SIZEOF_INT == 4
  13. typedef int int32_t;
  14. typedef unsigned int uint32_t;
  15. #else
  16. # if SIZEOF_LONG == 4
  17. typedef long int32_t;
  18. typedef unsigned long uint32_t;
  19. # else
  20. # if SIZEOF_SHORT == 4
  21. typedef short int32_t;
  22. typedef unsigned short uint32_t;
  23. # else
  24. # error Must have a form of 32-bit integer
  25. # endif
  26. # endif
  27. #endif
  28. #if SIZEOF_INT == 2
  29. typedef int int16_t;
  30. typedef unsigned int uint16_t;
  31. #else
  32. # if SIZEOF_LONG == 2
  33. typedef long int16_t;
  34. typedef unsigned long uint16_t;
  35. # else
  36. # if SIZEOF_SHORT == 2
  37. typedef short int16_t;
  38. typedef unsigned short uint16_t;
  39. # else
  40. # error Must have a form of 16-bit integer
  41. # endif
  42. # endif
  43. #endif
  44. typedef signed char int8_t;
  45. typedef unsigned char uint8_t;