common.h 331 B

123456789101112131415161718
  1. #ifndef COMMON_H
  2. #define COMMON_H
  3. #include <stdint.h> // uint*_t
  4. #include <Foundation/Foundation.h>
  5. #define LOG(str, args...) do { NSLog(@str "\n", ##args); } while(0)
  6. #ifdef __LP64__
  7. # define ADDR "0x%016llx"
  8. typedef uint64_t kptr_t;
  9. #else
  10. # define ADDR "0x%08x"
  11. typedef uint32_t kptr_t;
  12. #endif
  13. #endif