X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Fusterr.h;h=35d576ec1815ab755cd80b8a8b2659fbacfe62ee;hb=febf46068e00f3482a9e1b479f70aead4353d195;hp=c25348d74ce9d8869965c629d15c61d3dcf54950;hpb=7705281be801c16b35349f9ab17f67419cac1c34;p=lttng-ust.git diff --git a/include/usterr.h b/include/usterr.h index c25348d7..35d576ec 100644 --- a/include/usterr.h +++ b/include/usterr.h @@ -27,7 +27,6 @@ #include #include -#include "lttng/ust-tid.h" #include "share.h" enum ust_loglevel { @@ -58,7 +57,7 @@ static inline int ust_debug(void) do { \ fprintf(stderr, UST_STR_COMPONENT "[%ld/%ld]: " fmt " (in %s() at " __FILE__ ":" XSTR(__LINE__) ")\n", \ (long) getpid(), \ - (long) gettid(), \ + (long) syscall(SYS_gettid), \ ## args, \ __func__); \ } while(0) @@ -87,10 +86,7 @@ static inline int ust_debug(void) #define ERR(fmt, args...) ERRMSG("Error: " fmt, ## args) #define BUG(fmt, args...) ERRMSG("BUG: " fmt, ## args) -#if !defined(__linux__) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE)) -/* - * Version using XSI strerror_r. - */ +#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !defined(_GNU_SOURCE) #define PERROR(call, args...)\ do { \ char buf[200] = "Error in strerror_r()"; \ @@ -98,9 +94,6 @@ static inline int ust_debug(void) ERRMSG("Error: " call ": %s", ## args, buf); \ } while(0); #else -/* - * Version using GNU strerror_r, for linux with appropriate defines. - */ #define PERROR(call, args...)\ do { \ char *buf; \