diff options
author | Dmitry V. Levin <ldv@altlinux.org> | 2013-11-13 18:09:04 +0000 |
---|---|---|
committer | Dmitry V. Levin <ldv@altlinux.org> | 2013-11-13 22:13:35 +0000 |
commit | 03ef0b2665363adf6100bc4af479a14b5f17bc27 (patch) | |
tree | aeb3d48db51901541e6c20e3457bfb4d38a427de | |
parent | 0506f0f430c15677c7724f9c4500093e0e7e15d3 (diff) | |
download | strace-03ef0b2665363adf6100bc4af479a14b5f17bc27.tar.gz strace-03ef0b2665363adf6100bc4af479a14b5f17bc27.tar.bz2 strace-03ef0b2665363adf6100bc4af479a14b5f17bc27.tar.xz |
Assume that <sys/ptrace.h> provides a valid ptrace prototype
We used to explicitly list architectures where <sys/ptrace.h> from glibc
is known to provide a valid prototype for ptrace, and use a homegrown
replacement for all the rest. Situation seems to be better nowadays,
glibc is not the only libc available, so let's use ptrace prototype from
<sys/ptrace.h> by default, leaving the replacement for rare broken cases
if any.
* defs.h: Use ptrace prototype workaround iff
NEED_PTRACE_PROTOTYPE_WORKAROUND is defined.
-rw-r--r-- | defs.h | 25 |
1 files changed, 7 insertions, 18 deletions
@@ -150,28 +150,17 @@ extern char *stpcpy(char *dst, const char *src); */ #define USE_CUSTOM_PRINTF 0 -#if (defined(SPARC) || defined(SPARC64) \ - || defined(I386) || defined(X32) || defined(X86_64) \ - || defined(ARM) || defined(AARCH64) \ - || defined(AVR32) \ - || defined(OR1K) \ - || defined(METAG) \ - || defined(TILE) \ - || defined(XTENSA) \ - || defined(ARC) \ - ) && defined(__GLIBC__) -# include <sys/ptrace.h> -#else -/* Work around awkward prototype in ptrace.h. */ +#ifdef NEED_PTRACE_PROTOTYPE_WORKAROUND # define ptrace xptrace # include <sys/ptrace.h> # undef ptrace -# ifdef POWERPC -# define __KERNEL__ -# include <asm/ptrace.h> -# undef __KERNEL__ -# endif extern long ptrace(int, int, char *, long); +#else +# include <sys/ptrace.h> +#endif + +#if defined(POWERPC) +# include <asm/ptrace.h> #endif #if defined(TILE) |