summaryrefslogtreecommitdiffstats
path: root/bfd/som.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2007-10-16 15:15:50 +0000
committerNick Clifton <nickc@redhat.com>2007-10-16 15:15:50 +0000
commit8bc9c89276b610c8688f2b350178e1fc4900fb74 (patch)
treecb386fccd189d22761ca807ac441e9c306169b37 /bfd/som.c
parent504b7d2026f1fbbe912b6f513c069c0d47ba2505 (diff)
downloadppe42-binutils-8bc9c89276b610c8688f2b350178e1fc4900fb74.tar.gz
ppe42-binutils-8bc9c89276b610c8688f2b350178e1fc4900fb74.zip
PR 5146
* configure.in (AC_CHECK_HEADERS): Add alloca.h * configure: Regenerate. * config.in: Regenerate. * som.c: Replace alloca-conf.h inclusion with code recommended in autoconf documentation. * elf64-hppa.c: Likewise.
Diffstat (limited to 'bfd/som.c')
-rw-r--r--bfd/som.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/bfd/som.c b/bfd/som.c
index 006af8cae2..a43271c5b5 100644
--- a/bfd/som.c
+++ b/bfd/som.c
@@ -23,7 +23,6 @@
Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "alloca-conf.h"
#include "sysdep.h"
#include "bfd.h"
@@ -38,6 +37,30 @@
#include <machine/reg.h>
#include <sys/file.h>
+/* This is the code recommended in the autoconf documentation, almost
+ verbatim. */
+
+#ifndef __GNUC__
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+/* Indented so that pre-ansi C compilers will ignore it, rather than
+ choke on it. Some versions of AIX require this to be the first
+ thing in the file. */
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+# if !defined (__STDC__) && !defined (__hpux)
+extern char *alloca ();
+# else
+extern void *alloca ();
+# endif /* __STDC__, __hpux */
+# endif /* alloca */
+# endif /* _AIX */
+# endif /* HAVE_ALLOCA_H */
+#endif /* __GNUC__ */
+
static bfd_reloc_status_type hppa_som_reloc
(bfd *, arelent *, asymbol *, void *, asection *, bfd *, char **);
static bfd_boolean som_mkobject (bfd *);
OpenPOWER on IntegriCloud