[PATCH] Check for additional PTRACE options, events, etc.
Steve Bennett
steveb at workware.net.au
Mon Jul 18 03:05:23 UTC 2011
Also fix up the existing tests in configure.ac which
were causing incorrect detection. Seems that AC_CHECK_DECLS
doesn't like additional whitespace between identifiers.
Signed-off-by: Steve Bennett <steveb at workware.net.au>
Reported-By: Douglas Mencken <dougmencken at gmail.com>
---
configure.ac | 11 +----------
defs.h | 15 +++++++++++++++
2 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index 402f088..fb64665 100644
--- a/configure.ac
+++ b/configure.ac
@@ -306,16 +306,7 @@ AC_CHECK_MEMBERS([struct sigcontext.sc_hi2],,, [#include <signal.h>
AC_CHECK_DECLS([sys_errlist])
AC_CHECK_DECLS([sys_siglist, _sys_siglist],,, [#include <signal.h>])
-AC_CHECK_DECLS([\
- PTRACE_SETOPTIONS, \
- PTRACE_GETEVENTMSG, \
- PTRACE_GETSIGINFO, \
- PTRACE_O_TRACEFORK, \
- PTRACE_O_TRACEVFORK, \
- PTRACE_O_TRACECLONE, \
- PTRACE_EVENT_FORK, \
- PTRACE_EVENT_VFORK, \
- PTRACE_EVENT_CLONE],,, [#include <sys/ptrace.h>])
+AC_CHECK_DECLS([PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG, PTRACE_GETSIGINFO, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK, PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACESYSGOOD, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK, PTRACE_EVENT_VFORK_DONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_EXIT, PTRACE_EVENT_CLONE],,, [#include <sys/ptrace.h>])
AC_PATH_PROG([PERL], [perl])
diff --git a/defs.h b/defs.h
index 0e80868..8f81f4d 100644
--- a/defs.h
+++ b/defs.h
@@ -326,6 +326,12 @@ extern int mp_ioctl(int f, int c, void *a, int s);
# if !HAVE_DECL_PTRACE_O_TRACECLONE
# define PTRACE_O_TRACECLONE 0x00000008
# endif
+# if !HAVE_DECL_PTRACE_O_TRACESYSGOOD
+# define PTRACE_O_TRACESYSGOOD 0x00000001
+# endif
+# if !HAVE_DECL_PTRACE_O_TRACEEXEC
+# define PTRACE_O_TRACEEXEC 0x00000010
+# endif
# if !HAVE_DECL_PTRACE_EVENT_FORK
# define PTRACE_EVENT_FORK 1
@@ -336,6 +342,15 @@ extern int mp_ioctl(int f, int c, void *a, int s);
# if !HAVE_DECL_PTRACE_EVENT_CLONE
# define PTRACE_EVENT_CLONE 3
# endif
+# if !HAVE_DECL_PTRACE_EVENT_EXEC
+# define PTRACE_EVENT_EXEC 4
+# endif
+# if !HAVE_DECL_PTRACE_EVENT_VFORK_DONE
+# define PTRACE_EVENT_VFORK_DONE 5
+# endif
+# if !HAVE_DECL_PTRACE_EVENT_EXIT
+# define PTRACE_EVENT_EXIT 4
+# endif
#endif /* LINUX */
#if !defined __GNUC__
--
1.7.5.4
More information about the Strace-devel
mailing list