Don't close thread handles provided by WaitForDebugEvent
[deliverable/binutils-gdb.git] / gdb / ptrace.m4
index e5fe7fa966063e1435f054401f4854ec27ec4bdf..0fcd855aa8fd44f9614b0aced6f7649af733060e 100644 (file)
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2012-2015 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2020 Free Software Foundation, Inc.
 dnl
 dnl This file is part of GDB.
 dnl
@@ -31,11 +31,7 @@ gdb_ptrace_headers='
 # include <unistd.h>
 #endif
 '
-# There is no point in checking if we don't have a prototype.
-AC_CHECK_DECLS(ptrace, [], [
-  : ${gdb_cv_func_ptrace_ret='int'}
-  : ${gdb_cv_func_ptrace_args='int,int,long,long'}
-], $gdb_ptrace_headers)
+
 # Check return type.  Varargs (used on GNU/Linux) conflict with the
 # empty argument list, so check for that explicitly.
 AC_CACHE_CHECK([return type of ptrace], gdb_cv_func_ptrace_ret,
@@ -52,7 +48,7 @@ AC_DEFINE_UNQUOTED(PTRACE_TYPE_RET, $gdb_cv_func_ptrace_ret,
 AC_CACHE_CHECK([types of arguments for ptrace], gdb_cv_func_ptrace_args, [
   AC_TRY_COMPILE($gdb_ptrace_headers,
     [extern long ptrace (enum __ptrace_request, ...);],
-    [gdb_cv_func_ptrace_args='int,int,long,long'],[
+    [gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'],[
 for gdb_arg1 in 'int' 'long'; do
  for gdb_arg2 in 'pid_t' 'int' 'long'; do
   for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
@@ -81,6 +77,8 @@ ac_save_IFS=$IFS; IFS=','
 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
 IFS=$ac_save_IFS
 shift
+AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG1, $[1],
+  [Define to the type of arg 1 for ptrace.])
 AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG3, $[3],
   [Define to the type of arg 3 for ptrace.])
 AC_DEFINE_UNQUOTED(PTRACE_TYPE_ARG4, $[4],
This page took 0.025268 seconds and 4 git commands to generate.