fix "tkill" check
authorTom Tromey <tromey@redhat.com>
Mon, 11 Nov 2013 14:35:57 +0000 (07:35 -0700)
committerTom Tromey <tromey@redhat.com>
Mon, 11 Nov 2013 14:35:57 +0000 (07:35 -0700)
An earlier patch removed the check for "syscall" since the results
were not used in the C code.  However, the result was used, via the
cache variable, elsewhere in configure.

This patch fixes the problem by checking for "syscall" at the point at
which HAVE_TKILL_SYSCALL is defined.

2013-11-11  Tom Tromey  <tromey@redhat.com>

* config.in, configure: Rebuild.
* configure.ac (HAVE_TKILL_SYSCALL): Check for "syscall".

gdb/ChangeLog
gdb/configure
gdb/configure.ac

index a47c14e6e5649c40699c9a5fdaa3dd8d91268045..c35ed65a83477f25e7309b2cbd58e858b704b1fe 100644 (file)
@@ -1,3 +1,8 @@
+2013-11-11  Tom Tromey  <tromey@redhat.com>
+
+       * config.in, configure: Rebuild.
+       * configure.ac (HAVE_TKILL_SYSCALL): Check for "syscall".
+
 2013-11-11  Joel Brobecker  <brobecker@adacore.com>
 
        * remote-sim.c (gdbsim_detach): Break declaration into
index 1728d091a1def2c580c5d6148553c1b67e701704..8b20a133a3b93d7d9662ad39002bf4a1f241bc1b 100755 (executable)
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_sys_syscall_h_has_tkill" >&5
 $as_echo "$gdb_cv_sys_syscall_h_has_tkill" >&6; }
 fi
-if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
+if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
+  ac_fn_c_check_func "$LINENO" "syscall" "ac_cv_func_syscall"
+if test "x$ac_cv_func_syscall" = x""yes; then :
 
 $as_echo "#define HAVE_TKILL_SYSCALL 1" >>confdefs.h
 
+
+fi
+
 fi
 
 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
index 34908abdb30d079d3187774cc2799e31749da683..88db73acad348a1887d7fc75e9d511f2f0bea55d 100644 (file)
@@ -1736,8 +1736,10 @@ if test "x$ac_cv_header_sys_syscall_h" = "xyes"; then
    )
 fi
 dnl See if we can issue tkill syscall.
-if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes" && test "x$ac_cv_func_syscall" = "xyes"; then
-  AC_DEFINE(HAVE_TKILL_SYSCALL, 1, [Define if you support the tkill syscall.])
+if test "x$gdb_cv_sys_syscall_h_has_tkill" = "xyes"; then
+  AC_CHECK_FUNC(syscall,
+    AC_DEFINE(HAVE_TKILL_SYSCALL, 1, [Define if you support the tkill syscall.])
+  )
 fi
 
 dnl Check if we can disable the virtual address space randomization.