public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: John Baldwin <jhb@FreeBSD.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] Fix detection of "r_fs" and "r_gs" on FreeBSD.
Date: Mon, 18 Jan 2016 20:14:00 -0000	[thread overview]
Message-ID: <1453148011-66156-1-git-send-email-jhb@FreeBSD.org> (raw)

Include <sys/types.h> as a prerequisite for <machine/reg.h> when checking for
the r_fs and r_gs members in struct reg.  Note that the previous test for
<machine/reg.h> already includes <sys/types.h> as a prerequisite.

gdb/ChangeLog:

	* configure.ac: Include <sys/types.h when checking for "r_fs" in
	"struct reg".
	* configure: Regenerate.
---
 gdb/ChangeLog    | 6 ++++++
 gdb/configure    | 6 ++++--
 gdb/configure.ac | 3 ++-
 3 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index fe8fd6c..f37300e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,9 @@
+2016-01-18  John Baldwin  <jhb@FreeBSD.org>
+
+	* configure.ac: Include <sys/types.h when checking for "r_fs" in
+	"struct reg".
+	* configure: Regenerate.
+
 2016-01-15  Sandra Loosemore  <sandra@codesourcery.com>
 
 	* charset.c [PHONY_ICONV] (GDB_DEFAULT_HOST_CHARSET):
diff --git a/gdb/configure b/gdb/configure
index 4abedd3..11f91e3 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -12782,7 +12782,8 @@ fi
 
 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
-ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <machine/reg.h>
+ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
+#include <machine/reg.h>
 "
 if test "x$ac_cv_member_struct_reg_r_fs" = x""yes; then :
 
@@ -12792,7 +12793,8 @@ _ACEOF
 
 
 fi
-ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <machine/reg.h>
+ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
+#include <machine/reg.h>
 "
 if test "x$ac_cv_member_struct_reg_r_gs" = x""yes; then :
 
diff --git a/gdb/configure.ac b/gdb/configure.ac
index e2a7e68..8f9486e 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1448,7 +1448,8 @@ fi
 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
 AC_CHECK_MEMBERS([struct reg.r_fs, struct reg.r_gs], [], [],
-                 [#include <machine/reg.h>])
+                 [#include <sys/types.h>
+#include <machine/reg.h>])
 
 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
 # Older amd64 Linux's don't have the fs_base and gs_base members of
-- 
2.7.0

             reply	other threads:[~2016-01-18 20:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-18 20:14 John Baldwin [this message]
2016-01-19 11:27 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453148011-66156-1-git-send-email-jhb@FreeBSD.org \
    --to=jhb@freebsd.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).