aboutsummaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@adacore.com>2015-01-19 16:29:07 +0100
committerJoel Brobecker <brobecker@adacore.com>2015-01-19 16:29:07 +0100
commit1f99f6d0689d20db44c0c7d88e8af1ebe900d187 (patch)
tree98f004dfb5c5d236afb89d467bf5feb2d156f7d9 /libiberty
parentc4621b339e6f3153649898b254685f72df8c013d (diff)
downloadgdb-1f99f6d0689d20db44c0c7d88e8af1ebe900d187.zip
gdb-1f99f6d0689d20db44c0c7d88e8af1ebe900d187.tar.gz
gdb-1f99f6d0689d20db44c0c7d88e8af1ebe900d187.tar.bz2
strerror.c: Do not declare sys_nerr or sys_errlist if already macros
This fixes a MinGW warning in libiberty/strerror.c. 2015-01-19 Eli Zaretskii <eliz@gnu.org> * strerror.c <sys_nerr, sys_errlist>: Declare only if they aren't macros.
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog5
-rw-r--r--libiberty/strerror.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index ac23875..22e3f85 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,8 @@
+2015-01-19 Eli Zaretskii <eliz@gnu.org>
+
+ * strerror.c <sys_nerr, sys_errlist>: Declare only if they aren't
+ macros.
+
2014-12-24 Uros Bizjak <ubizjak@gmail.com>
Ben Elliston <bje@au.ibm.com>
Manuel Lopez-Ibanez <manu@gcc.gnu.org>
diff --git a/libiberty/strerror.c b/libiberty/strerror.c
index 0efadc3..a8a0bd1 100644
--- a/libiberty/strerror.c
+++ b/libiberty/strerror.c
@@ -469,8 +469,13 @@ static const char **sys_errlist;
#else
+
+#ifndef sys_nerr
extern int sys_nerr;
+#endif
+#ifndef sys_errlist
extern char *sys_errlist[];
+#endif
#endif