From d0542bcbfcce215320768ea3bd5aef55be816a70 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 31 Aug 2015 03:22:13 +0200 Subject: do not define strerror_r if _SLIBC_SOURCE is used MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/string.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/string.h b/include/string.h index 351b32a..b69c8a5 100644 --- a/include/string.h +++ b/include/string.h @@ -73,7 +73,7 @@ char* strerror(int) char* strerror_l(int, locale_t); -#ifndef _PORTABLE_SOURCE +#if !defined(_PORTABLE_SOURCE) && !defined(_SLIBC_SOURCE) /** * Reenterant variant of `stderror`. * @@ -81,6 +81,7 @@ char* strerror_l(int, locale_t); * is not part of the XSI specification, `strerror_r` * should be used. It is defined to this function if * `(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE`. + * However it is not defined if _SLIBC_SOURCE is defined. * * @param errnum The error code. * @param buf Buffer where the description shall be stored. @@ -98,6 +99,7 @@ int __xsi_strerror_r(int, char*, size_t); /* XSI-compliant strerror_r */ * is not part of the GNU specification, `strerror_r` should * be used. It is defined to this function unless * `(_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE`. + * However it is not defined if _SLIBC_SOURCE is defined. * * @param errnum The error code. * @param buf Buffer where the description shall be stored. -- cgit v1.2.3-70-g09d2