This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[PATCH] Conditionally include nlist.h in solib-legacy.c


I've just committed the changes below.  Hopefully, these will (finally)
fix J.T.'s NetBSD 1.3 solib-legacy.c build problems.  I did test builds
on SunOS 4.1.4, NetBSD 1.4, NetBSD 1.5, FreeBSD 4.2, Red Hat Linux 7,
Solaris 8 (x86), and Unixware 7.

	* 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.

Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.59
diff -u -p -r1.59 configure.in
--- configure.in	2001/03/19 05:46:26	1.59
+++ configure.in	2001/03/20 02:51:41
@@ -118,7 +118,7 @@ case $host_os in solaris2.7 | solaris2.8
     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 \
Index: solib-legacy.c
===================================================================
RCS file: /cvs/src/src/gdb/solib-legacy.c,v
retrieving revision 1.2
diff -u -p -r1.2 solib-legacy.c
--- solib-legacy.c	2001/03/19 05:46:27	1.2
+++ solib-legacy.c	2001/03/20 02:51:41
@@ -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 <nlist.h>
+#endif
+
 #include <link.h>
 
 /* Fetch (and possibly build) an appropriate link_map_offsets structure


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]