aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2015-08-31 03:22:13 +0200
committerMattias Andrée <maandree@operamail.com>2015-08-31 03:22:13 +0200
commitd0542bcbfcce215320768ea3bd5aef55be816a70 (patch)
treed0e0f053e1cd0f93d26b1005cf14619346632772
parentwint_t and wchar_t are not portable, additionally they are not guaranteed to be defined as expected and thus should not be used (diff)
downloadslibc-d0542bcbfcce215320768ea3bd5aef55be816a70.tar.gz
slibc-d0542bcbfcce215320768ea3bd5aef55be816a70.tar.bz2
slibc-d0542bcbfcce215320768ea3bd5aef55be816a70.tar.xz
do not define strerror_r if _SLIBC_SOURCE is used
Signed-off-by: Mattias Andrée <maandree@operamail.com>
-rw-r--r--include/string.h4
1 files changed, 3 insertions, 1 deletions
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.