enet_apple_logging.h 437 B

123456789101112131415
  1. #ifndef ENET_APPLE_LOGGING_H
  2. #define ENET_APPLE_LOGGING_H
  3. // Partly used from StackOverflow:
  4. // https://stackoverflow.com/questions/8372484/nslog-style-debug-messages-from-c-code
  5. // Only compile this in if we're on an Apple-based system.
  6. #if __APPLE__
  7. #include <CoreFoundation/CoreFoundation.h>
  8. extern "C" void NSLog(CFStringRef format, ...);
  9. #define AppleNSLog(fmt, ...) \
  10. { \
  11. NSLog(CFSTR(fmt), ##__VA_ARGS__); \
  12. }
  13. #endif
  14. #endif