From 486363b69b062711ab7e542b7f5ae6d3d9f4bbde Mon Sep 17 00:00:00 2001 From: Kevin Buettner Date: Tue, 20 Mar 2001 02:57:42 +0000 Subject: [PATCH] Conditionally include nlist.h in solib-legacy.c for older *BSD systems. --- gdb/ChangeLog | 7 +++++++ gdb/config.in | 3 +++ gdb/configure | 2 +- gdb/configure.in | 2 +- gdb/solib-legacy.c | 6 ++++++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 313ec321850..436ae00e512 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2001-03-19 Kevin Buettner + + * configure.in (AC_CHECK_HEADERS): Check for existence of nlist.h. + * configure: Regenerate. + * config.in: Regenerate. + * solib-legacy.c (nlist.h): Include if HAVE_NLIST_H is defined. + 2001-03-19 Kevin Buettner * config/i386/i386v42mp.mh (NATDEPFILES): List all files on diff --git a/gdb/config.in b/gdb/config.in index db4f52595ff..2d6e84a0fa0 100644 --- a/gdb/config.in +++ b/gdb/config.in @@ -289,6 +289,9 @@ /* Define if you have the header file. */ #undef HAVE_NL_TYPES_H +/* Define if you have the header file. */ +#undef HAVE_NLIST_H + /* Define if you have the header file. */ #undef HAVE_OBJLIST_H diff --git a/gdb/configure b/gdb/configure index 33f1627e32d..5879c1f15d8 100755 --- a/gdb/configure +++ b/gdb/configure @@ -3379,7 +3379,7 @@ EOF esac; esac -for ac_hdr in ctype.h endian.h link.h thread_db.h proc_service.h \ +for ac_hdr in ctype.h endian.h nlist.h link.h thread_db.h proc_service.h \ memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ term.h termio.h termios.h unistd.h wait.h sys/wait.h \ diff --git a/gdb/configure.in b/gdb/configure.in index f39f48fe911..6764b6edbf6 100644 --- a/gdb/configure.in +++ b/gdb/configure.in @@ -118,7 +118,7 @@ case $host_os in solaris2.7 | solaris2.8) case "$GCC" in yes) AC_DEFINE(_MSE_INT_H) esac; esac -AC_CHECK_HEADERS(ctype.h endian.h link.h thread_db.h proc_service.h \ +AC_CHECK_HEADERS(ctype.h endian.h nlist.h link.h thread_db.h proc_service.h \ memory.h objlist.h ptrace.h sgtty.h stddef.h stdlib.h \ string.h sys/procfs.h sys/ptrace.h sys/reg.h stdint.h \ term.h termio.h termios.h unistd.h wait.h sys/wait.h \ diff --git a/gdb/solib-legacy.c b/gdb/solib-legacy.c index e6507f20e40..2e32e187f0a 100644 --- a/gdb/solib-legacy.c +++ b/gdb/solib-legacy.c @@ -25,6 +25,12 @@ #include "solib-svr4.h" #ifdef HAVE_LINK_H + +#ifdef HAVE_NLIST_H +/* nlist.h needs to be included before link.h on some older *BSD systems. */ +#include +#endif + #include /* Fetch (and possibly build) an appropriate link_map_offsets structure -- 2.30.2