diff options
author | Peter S. Mazinger <ps.m@gmx.net> | 2011-03-18 23:21:15 +0100 |
---|---|---|
committer | Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> | 2012-06-15 14:00:27 +0200 |
commit | 938467ad2d9972c8d7ddcbde5dd9fe634da1ca3b (patch) | |
tree | 8c584aa253eaf9b37b29ba52292c136b3932eb98 /libc/string | |
parent | 145a5962d8b6f39f8cbe4d616a5e543307aa2aac (diff) |
*_strerror_r.c: keep all occurences in sync with string.h
libc-internal.h: this has to provide the reversed case of what string.h defines.
Accomodate for later possibility to compile without _GNU_SOURCE defined
Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Diffstat (limited to 'libc/string')
-rw-r--r-- | libc/string/__glibc_strerror_r.c | 7 | ||||
-rw-r--r-- | libc/string/__xpg_strerror_r.c | 9 |
2 files changed, 15 insertions, 1 deletions
diff --git a/libc/string/__glibc_strerror_r.c b/libc/string/__glibc_strerror_r.c index e97e55234..96b881700 100644 --- a/libc/string/__glibc_strerror_r.c +++ b/libc/string/__glibc_strerror_r.c @@ -5,9 +5,13 @@ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ +/* get rid of REDIRECT */ +#define strerror_r __hide_strerror_r + #include <features.h> #include <string.h> +#undef strerror_r char *__glibc_strerror_r(int errnum, char *strerrbuf, size_t buflen) { @@ -16,3 +20,6 @@ char *__glibc_strerror_r(int errnum, char *strerrbuf, size_t buflen) return strerrbuf; } libc_hidden_def(__glibc_strerror_r) +#if !defined __USE_XOPEN2K || defined __USE_GNU +strong_alias(__glibc_strerror_r,strerror_r) +#endif diff --git a/libc/string/__xpg_strerror_r.c b/libc/string/__xpg_strerror_r.c index 5979b1e37..3e78da1be 100644 --- a/libc/string/__xpg_strerror_r.c +++ b/libc/string/__xpg_strerror_r.c @@ -5,11 +5,16 @@ * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. */ +/* get rid of REDIRECT */ +#define strerror_r __hide_strerror_r + #include <features.h> #include <errno.h> #include <string.h> #include "_syserrmsg.h" +#undef strerror_r + #ifdef __UCLIBC_HAS_ERRNO_MESSAGES__ extern const char _string_syserrmsgs[] attribute_hidden; @@ -267,4 +272,6 @@ int __xpg_strerror_r(int errnum, char *strerrbuf, size_t buflen) #endif /* __UCLIBC_HAS_ERRNO_MESSAGES__ */ libc_hidden_def(__xpg_strerror_r) -strong_alias_untyped(__xpg_strerror_r, strerror_r) +#if defined __USE_XOPEN2K && !defined __USE_GNU +strong_alias(__xpg_strerror_r,strerror_r) +#endif |