summaryrefslogtreecommitdiff
path: root/libiberty
diff options
context:
space:
mode:
authorRoger Sayle <roger@eyesopen.com>2004-11-20 02:44:34 +0000
committerRoger Sayle <sayle@gcc.gnu.org>2004-11-20 02:44:34 +0000
commit2d59754f6a83fcfb57baba3ebeefaab2a96a5e78 (patch)
treed8bed8ae1d98f89d6c74d74f364cf3e41a582625 /libiberty
parentedca1aa6ec3f516f0ccd5454d871964520de58ba (diff)
objalloc.c, [...]: Include "config.h" before "ansidecl.h" to avoid redeclaration errors with...
* objalloc.c, strsignal.c, xstrerror.c: Include "config.h" before "ansidecl.h" to avoid redeclaration errors with native compilers. * regex.c: Protect config.h from multiple inclusion. From-SVN: r90954
Diffstat (limited to 'libiberty')
-rw-r--r--libiberty/ChangeLog6
-rw-r--r--libiberty/objalloc.c2
-rw-r--r--libiberty/regex.c6
-rw-r--r--libiberty/strsignal.c3
-rw-r--r--libiberty/xstrerror.c2
5 files changed, 13 insertions, 6 deletions
diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog
index 756214a2122..bddcee9da40 100644
--- a/libiberty/ChangeLog
+++ b/libiberty/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-19 Roger Sayle <roger@eyesopen.com>
+
+ * objalloc.c, strsignal.c, xstrerror.c: Include "config.h" before
+ "ansidecl.h" to avoid redeclaration errors with native compilers.
+ * regex.c: Protect config.h from multiple inclusion.
+
2004-11-12 Mike Stump <mrs@apple.com>
* Makefile.in (libiberty.html): Fix html generation.
diff --git a/libiberty/objalloc.c b/libiberty/objalloc.c
index 50995691e33..1cda7b98619 100644
--- a/libiberty/objalloc.c
+++ b/libiberty/objalloc.c
@@ -17,8 +17,8 @@ along with this program; if not, write to the Free Software
Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#include "ansidecl.h"
#include "config.h"
+#include "ansidecl.h"
#include "objalloc.h"
diff --git a/libiberty/regex.c b/libiberty/regex.c
index 522b0eedf44..3babf6cbe34 100644
--- a/libiberty/regex.c
+++ b/libiberty/regex.c
@@ -32,8 +32,10 @@
#undef _GNU_SOURCE
#define _GNU_SOURCE
-#ifdef HAVE_CONFIG_H
-# include <config.h>
+#ifndef INSIDE_RECURSION
+# ifdef HAVE_CONFIG_H
+# include <config.h>
+# endif
#endif
#include <ansidecl.h>
diff --git a/libiberty/strsignal.c b/libiberty/strsignal.c
index a8a7d341fef..1ff984debc3 100644
--- a/libiberty/strsignal.c
+++ b/libiberty/strsignal.c
@@ -2,11 +2,10 @@
Written by Fred Fish. fnf@cygnus.com
This file is in the public domain. */
+#include "config.h"
#include "ansidecl.h"
#include "libiberty.h"
-#include "config.h"
-
/* We need to declare sys_siglist, because even if the system provides
it we can't assume that it is declared in <signal.h> (for example,
SunOS provides sys_siglist, but it does not declare it in any
diff --git a/libiberty/xstrerror.c b/libiberty/xstrerror.c
index 9000d178f9c..e3f1ca04a26 100644
--- a/libiberty/xstrerror.c
+++ b/libiberty/xstrerror.c
@@ -15,8 +15,8 @@ will never return a @code{NULL} pointer.
#include <stdio.h>
-#include "libiberty.h"
#include "config.h"
+#include "libiberty.h"
#ifdef VMS
#include <errno.h>