Mercurial > hg > octave-nkf > gnulib-hg
changeset 17719:41c703805963
Define macros for glibc
This patch helps build error.c without warnings on glibc.
error: Fix -Wundef warnings in glibc
* lib/error.c [_LIBC]: Define default macros for
glibc.
(print_errno_message) [defined HAVE_STRERROR_R || _LIBC]:
Check _LIBC before STRERROR_R_CHAR_P.
author | Siddhesh Poyarekar <siddhesh@redhat.com> |
---|---|
date | Wed, 09 Jul 2014 15:26:49 +0530 |
parents | cc408fc7021c |
children | 42ec2a5efa7a |
files | ChangeLog lib/error.c |
diffstat | 2 files changed, 10 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2014-07-10 Siddhesh Poyarekar <siddhesh@redhat.com> + error: Fix -Wundef warnings in glibc + * lib/error.c [_LIBC]: Define default macros for + glibc. + (print_errno_message) [defined HAVE_STRERROR_R || _LIBC]: + Check _LIBC before STRERROR_R_CHAR_P. + error: Sync from glibc master * lib/error.c [_LIBC]: Remove INTUSE usage. (error_tail): Remove unused macro ALLOCA_LIMIT.
--- a/lib/error.c +++ b/lib/error.c @@ -39,6 +39,9 @@ # include <stdint.h> # include <wchar.h> # define mbsrtowcs __mbsrtowcs +# define USE_UNLOCKED_IO 0 +# define _GL_ATTRIBUTE_FORMAT_PRINTF(a, b) +# define _GL_ARG_NONNULL(a) #endif #if USE_UNLOCKED_IO @@ -171,7 +174,7 @@ #if defined HAVE_STRERROR_R || _LIBC char errbuf[1024]; -# if STRERROR_R_CHAR_P || _LIBC +# if _LIBC || STRERROR_R_CHAR_P s = __strerror_r (errnum, errbuf, sizeof errbuf); # else if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)