Merge pull request #836 from skunkwerks/feature/add-freebsd-debugs

add support for debug flags in FreeBSD
This commit is contained in:
Adam Ierymenko
2018-09-14 08:08:59 -07:00
committed by GitHub
4 changed files with 20 additions and 4 deletions

View File

@ -76,6 +76,9 @@
#ifdef __APPLE__
#define ZT_THREAD_ID (long)0 // (long)gettid()
#endif
#ifdef __FreeBSD__
#define ZT_THREAD_ID (long)0 // (long)gettid()
#endif
#ifdef _WIN32
#define ZT_THREAD_ID (long)0 //
#endif
@ -96,7 +99,7 @@
#define DEBUG_INFO(fmt, ...) fprintf(stderr, ZT_GRN "INFO [%ld]: %17s:%5d:%25s: " fmt "\n" \
ZT_RESET, ZT_THREAD_ID, ZT_FILENAME, __LINE__, __FUNCTION__, __VA_ARGS__)
#endif
#if defined(__linux__) or defined(__APPLE__)
#if defined(__linux__) or defined(__APPLE__) or defined(__FreeBSD__)
#define DEBUG_INFO(fmt, args ...) fprintf(stderr, ZT_GRN "INFO [%ld]: %17s:%5d:%25s: " fmt "\n" \
ZT_RESET, ZT_THREAD_ID, ZT_FILENAME, __LINE__, __FUNCTION__, ##args)
#endif