* acconfig.h (HAVE_STRUCT_REG_R_FS, HAVE_STRUCT_R_GS): Remove
authorMark Kettenis <kettenis@gnu.org>
Fri, 21 Jan 2005 13:49:22 +0000 (13:49 +0000)
committerMark Kettenis <kettenis@gnu.org>
Fri, 21 Jan 2005 13:49:22 +0000 (13:49 +0000)
undefs.
* configure.ac: Use AC_CHECK_MEMBERS to check whether `struct
thread' has a td_pcb member and whether `struct reg' has r_fs and
r_gs members.
* configure, config.in: Regenerate.

gdb/ChangeLog
gdb/acconfig.h
gdb/config.in
gdb/configure
gdb/configure.ac

index d5fe71e31dda1f92d6065fa81ddc5f967029d990..1ca68e250f2be1749a1223314e4ea70801d1d4f7 100644 (file)
@@ -1,3 +1,12 @@
+2005-01-21  Mark Kettenis  <kettenis@gnu.org>
+
+       * acconfig.h (HAVE_STRUCT_REG_R_FS, HAVE_STRUCT_R_GS): Remove
+       undefs.
+       * configure.ac: Use AC_CHECK_MEMBERS to check whether `struct
+       thread' has a td_pcb member and whether `struct reg' has r_fs and
+       r_gs members.
+       * configure, config.in: Regenerate.
+
 2005-01-21  Mark Kettenis  <kettenis@gnu.org>
 
        * configure.ac: Remove ia64-*-aix* junk.
 2005-01-21  Mark Kettenis  <kettenis@gnu.org>
 
        * configure.ac: Remove ia64-*-aix* junk.
index 01e3b3fdcb099e1a62e641bc921a826852a71db7..e625697e1c146cf041421a29a4f2cb23d435b3b6 100644 (file)
@@ -3,12 +3,6 @@
 # undef _GNU_SOURCE
 #endif
 
 # undef _GNU_SOURCE
 #endif
 
-/* Define if your struct reg has r_fs.  */
-#undef HAVE_STRUCT_REG_R_FS
-
-/* Define if your struct reg has r_gs.  */
-#undef HAVE_STRUCT_REG_R_GS
-
 /* Define if pstatus_t type is available */
 #undef HAVE_PSTATUS_T
 
 /* Define if pstatus_t type is available */
 #undef HAVE_PSTATUS_T
 
index 63b9e6187c805f6eaa480289f159fb9373cfdeef..9c6414a369b0de2f53df2e501f6a8a6016338ffc 100644 (file)
@@ -4,12 +4,6 @@
 # undef _GNU_SOURCE
 #endif
 
 # undef _GNU_SOURCE
 #endif
 
-/* Define if your struct reg has r_fs.  */
-#undef HAVE_STRUCT_REG_R_FS
-
-/* Define if your struct reg has r_gs.  */
-#undef HAVE_STRUCT_REG_R_GS
-
 /* Define if pstatus_t type is available */
 #undef HAVE_PSTATUS_T
 
 /* Define if pstatus_t type is available */
 #undef HAVE_PSTATUS_T
 
 /* Define to 1 if your system has struct reg in <machine/reg.h>. */
 #undef HAVE_STRUCT_REG
 
 /* Define to 1 if your system has struct reg in <machine/reg.h>. */
 #undef HAVE_STRUCT_REG
 
+/* Define to 1 if `r_fs' is member of `struct reg'. */
+#undef HAVE_STRUCT_REG_R_FS
+
+/* Define to 1 if `r_gs' is member of `struct reg'. */
+#undef HAVE_STRUCT_REG_R_GS
+
 /* Define to 1 if `st_blocks' is member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLOCKS
 
 /* Define to 1 if `st_blocks' is member of `struct stat'. */
 #undef HAVE_STRUCT_STAT_ST_BLOCKS
 
-/* Define to 1 if your system has td_pcb in struct thread. */
+/* Define to 1 if `td_pcb' is member of `struct thread'. */
 #undef HAVE_STRUCT_THREAD_TD_PCB
 
 /* Define to 1 if you have the `syscall' function. */
 #undef HAVE_STRUCT_THREAD_TD_PCB
 
 /* Define to 1 if you have the `syscall' function. */
index 38fef3fbf1e388411879ea1a2e5b25a50600d7d6..d22a2df3ffcf9c3cd603504c9e92f5a87b26109d 100755 (executable)
@@ -16746,10 +16746,10 @@ _ACEOF
 
 fi
 
 
 fi
 
-# See if <sys/proc.h> defines `struct thread' with a td_pcb member.
-echo "$as_me:$LINENO: checking for td_pcb in struct thread" >&5
-echo $ECHO_N "checking for td_pcb in struct thread... $ECHO_C" >&6
-if test "${gdb_cv_struct_thread_td_pcb+set}" = set; then
+# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
+echo "$as_me:$LINENO: checking for struct thread.td_pcb" >&5
+echo $ECHO_N "checking for struct thread.td_pcb... $ECHO_C" >&6
+if test "${ac_cv_member_struct_thread_td_pcb+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -16760,10 +16760,14 @@ cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <sys/param.h>
 #include <sys/proc.h>
 /* end confdefs.h.  */
 #include <sys/param.h>
 #include <sys/proc.h>
+
+
 int
 main ()
 {
 int
 main ()
 {
-struct thread td; td.td_pcb;
+static struct thread ac_aggr;
+if (ac_aggr.td_pcb)
+return 0;
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -16790,25 +16794,76 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_struct_thread_td_pcb=yes
+  ac_cv_member_struct_thread_td_pcb=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_struct_thread_td_pcb=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/param.h>
+#include <sys/proc.h>
+
+
+int
+main ()
+{
+static struct thread ac_aggr;
+if (sizeof ac_aggr.td_pcb)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_thread_td_pcb=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_thread_td_pcb=no
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gdb_cv_struct_thread_td_pcb" >&5
-echo "${ECHO_T}$gdb_cv_struct_thread_td_pcb" >&6
-if test $gdb_cv_struct_thread_td_pcb = yes; then
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_thread_td_pcb" >&5
+echo "${ECHO_T}$ac_cv_member_struct_thread_td_pcb" >&6
+if test $ac_cv_member_struct_thread_td_pcb = yes; then
 
 
-cat >>confdefs.h <<\_ACEOF
+cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_THREAD_TD_PCB 1
 _ACEOF
 
 #define HAVE_STRUCT_THREAD_TD_PCB 1
 _ACEOF
 
+
 fi
 
 fi
 
+
 # See if <sys/lwp.h> defines `struct lwp`.
 echo "$as_me:$LINENO: checking for struct lwp" >&5
 echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
 # See if <sys/lwp.h> defines `struct lwp`.
 echo "$as_me:$LINENO: checking for struct lwp" >&5
 echo $ECHO_N "checking for struct lwp... $ECHO_C" >&6
@@ -16937,9 +16992,9 @@ 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'.
 
 # 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'.
-echo "$as_me:$LINENO: checking for r_fs in struct reg" >&5
-echo $ECHO_N "checking for r_fs in struct reg... $ECHO_C" >&6
-if test "${gdb_cv_struct_reg_r_fs+set}" = set; then
+echo "$as_me:$LINENO: checking for struct reg.r_fs" >&5
+echo $ECHO_N "checking for struct reg.r_fs... $ECHO_C" >&6
+if test "${ac_cv_member_struct_reg_r_fs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -16949,10 +17004,58 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <machine/reg.h>
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <machine/reg.h>
+
+int
+main ()
+{
+static struct reg ac_aggr;
+if (ac_aggr.r_fs)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_reg_r_fs=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <machine/reg.h>
+
 int
 main ()
 {
 int
 main ()
 {
-struct reg r; r.r_fs;
+static struct reg ac_aggr;
+if (sizeof ac_aggr.r_fs)
+return 0;
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -16979,26 +17082,30 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_struct_reg_r_fs=yes
+  ac_cv_member_struct_reg_r_fs=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_struct_reg_r_fs=no
+ac_cv_member_struct_reg_r_fs=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gdb_cv_struct_reg_r_fs" >&5
-echo "${ECHO_T}$gdb_cv_struct_reg_r_fs" >&6
-if test $gdb_cv_struct_reg_r_fs = yes; then
-  cat >>confdefs.h <<\_ACEOF
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_fs" >&5
+echo "${ECHO_T}$ac_cv_member_struct_reg_r_fs" >&6
+if test $ac_cv_member_struct_reg_r_fs = yes; then
+
+cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_REG_R_FS 1
 _ACEOF
 
 #define HAVE_STRUCT_REG_R_FS 1
 _ACEOF
 
+
 fi
 fi
-echo "$as_me:$LINENO: checking for r_gs in struct reg" >&5
-echo $ECHO_N "checking for r_gs in struct reg... $ECHO_C" >&6
-if test "${gdb_cv_struct_reg_r_gs+set}" = set; then
+echo "$as_me:$LINENO: checking for struct reg.r_gs" >&5
+echo $ECHO_N "checking for struct reg.r_gs... $ECHO_C" >&6
+if test "${ac_cv_member_struct_reg_r_gs+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
@@ -17008,10 +17115,13 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <machine/reg.h>
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 #include <machine/reg.h>
+
 int
 main ()
 {
 int
 main ()
 {
-struct reg r; r.r_gs;
+static struct reg ac_aggr;
+if (ac_aggr.r_gs)
+return 0;
   ;
   return 0;
 }
   ;
   return 0;
 }
@@ -17038,24 +17148,74 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
   ac_status=$?
   echo "$as_me:$LINENO: \$? = $ac_status" >&5
   (exit $ac_status); }; }; then
-  gdb_cv_struct_reg_r_gs=yes
+  ac_cv_member_struct_reg_r_gs=yes
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
-gdb_cv_struct_reg_r_gs=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <machine/reg.h>
+
+int
+main ()
+{
+static struct reg ac_aggr;
+if (sizeof ac_aggr.r_gs)
+return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>conftest.er1
+  ac_status=$?
+  grep -v '^ *+' conftest.er1 >conftest.err
+  rm -f conftest.er1
+  cat conftest.err >&5
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+        { ac_try='test -z "$ac_c_werror_flag"
+                        || test ! -s conftest.err'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; } &&
+        { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_member_struct_reg_r_gs=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_member_struct_reg_r_gs=no
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 fi
 rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
-echo "$as_me:$LINENO: result: $gdb_cv_struct_reg_r_gs" >&5
-echo "${ECHO_T}$gdb_cv_struct_reg_r_gs" >&6
-if test $gdb_cv_struct_reg_r_gs = yes; then
-  cat >>confdefs.h <<\_ACEOF
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_member_struct_reg_r_gs" >&5
+echo "${ECHO_T}$ac_cv_member_struct_reg_r_gs" >&6
+if test $ac_cv_member_struct_reg_r_gs = yes; then
+
+cat >>confdefs.h <<_ACEOF
 #define HAVE_STRUCT_REG_R_GS 1
 _ACEOF
 
 #define HAVE_STRUCT_REG_R_GS 1
 _ACEOF
 
+
 fi
 
 fi
 
+
 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
 echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
 echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
 echo "$as_me:$LINENO: checking for PTRACE_GETREGS" >&5
 echo $ECHO_N "checking for PTRACE_GETREGS... $ECHO_C" >&6
index d51b0a567cf2174830c40ca264f0b36fca09fb7f..e30e4af6f44c9a3e73d5994b8848e16bb7d8e0eb 100644 (file)
@@ -589,15 +589,11 @@ if test "$gdb_with_regex" = yes; then
     [Define to 1 if the regex included in libiberty should be used.])
 fi
 
     [Define to 1 if the regex included in libiberty should be used.])
 fi
 
-# See if <sys/proc.h> defines `struct thread' with a td_pcb member.
-AC_CACHE_CHECK([for td_pcb in struct thread], gdb_cv_struct_thread_td_pcb,
-[AC_TRY_COMPILE([#include <sys/param.h>
-#include <sys/proc.h>], [struct thread td; td.td_pcb;],
-gdb_cv_struct_thread_td_pcb=yes, gdb_cv_struct_thread_td_pcb=no)])
-if test $gdb_cv_struct_thread_td_pcb = yes; then
-  AC_DEFINE(HAVE_STRUCT_THREAD_TD_PCB, 1,
-            [Define to 1 if your system has td_pcb in struct thread.])
-fi
+# Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
+AC_CHECK_MEMBERS([struct thread.td_pcb], [], [],
+[#include <sys/param.h>
+#include <sys/proc.h>
+])
 
 # See if <sys/lwp.h> defines `struct lwp`.
 AC_CACHE_CHECK([for struct lwp], gdb_cv_struct_lwp,
 
 # See if <sys/lwp.h> defines `struct lwp`.
 AC_CACHE_CHECK([for struct lwp], gdb_cv_struct_lwp,
@@ -621,18 +617,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'.
 
 # 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_CACHE_CHECK([for r_fs in struct reg], gdb_cv_struct_reg_r_fs,
-[AC_TRY_COMPILE([#include <machine/reg.h>], [struct reg r; r.r_fs;],
-gdb_cv_struct_reg_r_fs=yes, gdb_cv_struct_reg_r_fs=no)])
-if test $gdb_cv_struct_reg_r_fs = yes; then
-  AC_DEFINE(HAVE_STRUCT_REG_R_FS)
-fi
-AC_CACHE_CHECK([for r_gs in struct reg], gdb_cv_struct_reg_r_gs,
-[AC_TRY_COMPILE([#include <machine/reg.h>], [struct reg r; r.r_gs;],
-gdb_cv_struct_reg_r_gs=yes, gdb_cv_struct_reg_r_gs=no)])
-if test $gdb_cv_struct_reg_r_gs = yes; then
-  AC_DEFINE(HAVE_STRUCT_REG_R_GS)
-fi
+AC_CHECK_MEMBERS([struct reg.r_fs, struct reg.r_gs], [], [],
+                 [#include <machine/reg.h>])
 
 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
 AC_MSG_CHECKING(for PTRACE_GETREGS)
 
 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
 AC_MSG_CHECKING(for PTRACE_GETREGS)
This page took 0.040152 seconds and 4 git commands to generate.