summaryrefslogtreecommitdiff
path: root/boehm-gc/dyn_load.c
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-12 04:37:57 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2002-02-12 04:37:57 +0000
commit0cc01484c3f8c9ec4fec760501aec318bc199adf (patch)
treecef3197531d988920cbff060bdc10742baf06d01 /boehm-gc/dyn_load.c
parentb6c37935d39c0aadd3d6eefb9e09c455c6cbd0a5 (diff)
downloadgcc-0cc01484c3f8c9ec4fec760501aec318bc199adf.tar.gz
Imported GC 6.1 Alpha 3. Finally.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49698 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'boehm-gc/dyn_load.c')
-rw-r--r--boehm-gc/dyn_load.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/boehm-gc/dyn_load.c b/boehm-gc/dyn_load.c
index 984253aa873..d80600bb1d7 100644
--- a/boehm-gc/dyn_load.c
+++ b/boehm-gc/dyn_load.c
@@ -79,6 +79,14 @@
# define l_name lm_name
#endif
+#if defined(LINUX) && defined(__ELF__) || defined(SCO_ELF) || \
+ (defined(FREEBSD) && defined(__ELF__)) || \
+ (defined(NETBSD) && defined(__ELF__)) || defined(HURD)
+# include <stddef.h>
+# include <elf.h>
+# include <link.h>
+#endif
+
/* Newer versions of GNU/Linux define this macro. We
* define it similarly for any ELF systems that don't. */
# ifndef ElfW
@@ -438,10 +446,6 @@ static char *parse_map_entry(char *buf_ptr, word *start, word *end,
/* For glibc 2.2.4+. Unfortunately, it doesn't work for older */
/* versions. Thanks to Jakub Jelinek for most of the code. */
-#include <stddef.h>
-#include <elf.h>
-#include <link.h>
-
# if defined(LINUX) /* Are others OK here, too? */ \
&& (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))