util.h 269 B

123456789101112131415
  1. #ifndef UTIL_H_
  2. #define UTIL_H_
  3. #include <stdint.h>
  4. #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
  5. #define BUILD_BUG_ON(x) ((void)sizeof(char[1 - 2 * !!(x)]))
  6. typedef _Bool bool;
  7. #define true ((bool)(!!1))
  8. #define false ((bool)(!!0))
  9. #endif /* UTIL_H_ */