This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[PATCH] Check for <machine/reg.h> and `struct reg'
- From: Mark Kettenis <kettenis at chello dot nl>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 2 Jan 2004 13:40:52 +0100 (CET)
- Subject: [PATCH] Check for <machine/reg.h> and `struct reg'
This merges a bit of the SPARC branch into mainline. These changes
are needed for native support for the BSD's.
Committed (to mainline).
Index: ChangeLog
from Mark Kettenis <kettenis@gnu.org>
* configure.in: Check for <machine/reg.h>. Check for `struct reg'
in <machine/reg.h>.
* configure, config.in: Regenerate.
Index: configure.in
===================================================================
RCS file: /cvs/src/src/gdb/configure.in,v
retrieving revision 1.137
diff -u -p -r1.137 configure.in
--- configure.in 30 Dec 2003 10:33:37 -0000 1.137
+++ configure.in 2 Jan 2004 12:36:41 -0000
@@ -343,6 +343,7 @@ AC_HEADER_DIRENT
AC_HEADER_STAT
AC_HEADER_STDC
AC_CHECK_HEADERS(link.h)
+AC_CHECK_HEADERS(machine/reg.h)
AC_CHECK_HEADERS(nlist.h)
AC_CHECK_HEADERS(poll.h sys/poll.h)
AC_CHECK_HEADERS(proc_service.h thread_db.h)
@@ -489,6 +490,16 @@ AC_ARG_WITH(included-regex,
if test "$gdb_with_regex" = yes; then
AC_DEFINE(USE_INCLUDED_REGEX, 1,
[Define to 1 if the regex included in libiberty should be used.])
+fi
+
+# See if <machine/reg.h> degines `struct reg'.
+AC_CACHE_CHECK([for struct reg in machine/reg.h], gdb_cv_struct_reg,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <machine/reg.h>], [struct reg r;],
+gdb_cv_struct_reg=yes, gdb_cv_struct_reg=no)])
+if test $gdb_cv_struct_reg = yes; then
+ AC_DEFINE(HAVE_STRUCT_REG, 1,
+ [Define to 1 if your system has struct reg in <machine/reg.h>.])
fi
# See if <machine/reg.h> supports the %fs and %gs i386 segment registers.