[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Define macros for glibc
From: |
Siddhesh Poyarekar |
Subject: |
[PATCH] Define macros for glibc |
Date: |
Wed, 9 Jul 2014 15:39:46 +0530 |
User-agent: |
Mutt/1.5.22.1-rc1 (2013-10-16) |
hi,
This is the second patch as promised. This patch helps build error.c
without warnings on glibc. I intend to merge the remaining
differences into the glibc version of error.c
Siddhesh
* lib/error.c [_LIBC]: Define default macros for
glibc.
(print_errno_message) [defined HAVE_STRERROR_R || _LIBC]:
Check _LIBC before STRERROR_R_CHAR_P.
diff --git a/lib/error.c b/lib/error.c
index 9a3525a..7b99cd7 100644
--- 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 @@ print_errno_message (int errnum)
#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)
pgp4RL_lpz7dl.pgp
Description: PGP signature
- [PATCH] Define macros for glibc,
Siddhesh Poyarekar <=