From: Mathieu Desnoyers Date: Wed, 22 Feb 2012 22:10:29 +0000 (-0500) Subject: Revert "Use XSI-compliant strerror_r by default on non-Linux" X-Git-Tag: v2.0.0-rc2~26 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=943a422e5d4259eea626eb7910b3d11ac39c5105;p=lttng-ust.git Revert "Use XSI-compliant strerror_r by default on non-Linux" This reverts commit 7705281be801c16b35349f9ab17f67419cac1c34. Signed-off-by: Mathieu Desnoyers --- diff --git a/include/usterr-signal-safe.h b/include/usterr-signal-safe.h index 8e2c1cd2..d46b0f6a 100644 --- a/include/usterr-signal-safe.h +++ b/include/usterr-signal-safe.h @@ -115,10 +115,7 @@ do { \ #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()"; \ @@ -126,9 +123,6 @@ do { \ 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; \ diff --git a/include/usterr.h b/include/usterr.h index c25348d7..86c9bf86 100644 --- a/include/usterr.h +++ b/include/usterr.h @@ -87,10 +87,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 +95,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; \