From 943a422e5d4259eea626eb7910b3d11ac39c5105 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Wed, 22 Feb 2012 17:10:29 -0500 Subject: [PATCH] Revert "Use XSI-compliant strerror_r by default on non-Linux" This reverts commit 7705281be801c16b35349f9ab17f67419cac1c34. Signed-off-by: Mathieu Desnoyers --- include/usterr-signal-safe.h | 8 +------- include/usterr.h | 8 +------- 2 files changed, 2 insertions(+), 14 deletions(-) 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; \ -- 2.34.1