Types.h 478 B

1234567891011121314151617181920212223
  1. #ifndef BASIC_TYPES_H
  2. #define BASIC_TYPES_H
  3. #include <stddef.h>
  4. #include <stdint.h>
  5. typedef uint64_t u64;
  6. typedef uint32_t u32;
  7. typedef uint16_t u16;
  8. typedef uint8_t u8;
  9. typedef int64_t i64;
  10. typedef int32_t i32;
  11. typedef int16_t i16;
  12. typedef int8_t i8;
  13. #if defined(__GNUC__)
  14. #define check_format(format_index, arg_start_index) \
  15. __attribute__((format(printf, format_index, arg_start_index)))
  16. #else
  17. #error "please add a 'check_format' option"
  18. #endif
  19. #endif