about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2017-07-23 23:22:53 +0000
committerDmitry V. Levin <ldv@altlinux.org>2017-07-23 23:22:53 +0000
commitcab91f947a6059907a314a91f4c90abcccfb0262 (patch)
treec28e08faf83fd061882f9c56e86b7b8ccff0ee0e
parent64a1daed189ab6fff11b33dd8d493962460f0f6c (diff)
downloadglibc-cab91f947a6059907a314a91f4c90abcccfb0262.tar.gz
glibc-cab91f947a6059907a314a91f4c90abcccfb0262.tar.xz
glibc-cab91f947a6059907a314a91f4c90abcccfb0262.zip
S390: fix sys/ptrace.h to make it includible again after asm/ptrace.h
sys/ptrace.h on S390 used to be includible both before and after
asm/ptrace.h, until commit b08a6a0dea63742313ed3d9577c1e2d83436b196
among other changes introduced PTRACE_SINGLEBLOCK enum constant which
is also defined in asm/ptrace.h as a macro, making sys/ptrace.h fail
to compile when included after asm/ptrace.h.

* sysdeps/unix/sysv/linux/s390/sys/ptrace.h [_LINUX_PTRACE_H ||
_S390_PTRACE_H]: Undefine all PTRACE_* macro constants defined
later as enum constants, except PTRACE_PEEKUSER, PTRACE_POKEUSER,
and PTRACE_SEIZE_DEVEL that are not defined by Linux headers.
-rw-r--r--ChangeLog7
-rw-r--r--sysdeps/unix/sysv/linux/s390/sys/ptrace.h68
2 files changed, 59 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index 1033f385b9..b0be632ec2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-07-23  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* sysdeps/unix/sysv/linux/s390/sys/ptrace.h [_LINUX_PTRACE_H ||
+	_S390_PTRACE_H]: Undefine all PTRACE_* macro constants defined
+	later as enum constants, except PTRACE_PEEKUSER, PTRACE_POKEUSER,
+	and PTRACE_SEIZE_DEVEL that are not defined by Linux headers.
+
 2017-07-23  John David Anglin  <danglin@gcc.gnu.org>
 
 	[BZ 19170]
diff --git a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
index 88079fc7a7..e9136471f8 100644
--- a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
@@ -24,24 +24,60 @@
 #include <bits/types.h>
 
 __BEGIN_DECLS
-#ifdef _LINUX_PTRACE_H
+#if defined _LINUX_PTRACE_H || defined _S390_PTRACE_H
 /* Kludge to stop stuff gdb & strace compiles from getting upset
  */
-#undef PTRACE_TRACEME
-#undef PTRACE_PEEKTEXT
-#undef PTRACE_PEEKDATA
-#undef PTRACE_PEEKUSR
-#undef PTRACE_POKETEXT
-#undef PTRACE_POKEDATA
-#undef PTRACE_POKEUSR
-#undef PTRACE_CONT
-#undef PTRACE_KILL
-#undef PTRACE_SINGLESTEP
-
-#undef PTRACE_ATTACH
-#undef PTRACE_DETACH
-
-#undef PTRACE_SYSCALL
+# undef PTRACE_TRACEME
+# undef PTRACE_PEEKTEXT
+# undef PTRACE_PEEKDATA
+# undef PTRACE_POKETEXT
+# undef PTRACE_POKEDATA
+# undef PTRACE_CONT
+# undef PTRACE_KILL
+# undef PTRACE_SINGLESTEP
+# undef PTRACE_SINGLEBLOCK
+# undef PTRACE_ATTACH
+# undef PTRACE_DETACH
+# undef PTRACE_SYSCALL
+# undef PTRACE_SETOPTIONS
+# undef PTRACE_GETEVENTMSG
+# undef PTRACE_GETSIGINFO
+# undef PTRACE_SETSIGINFO
+# undef PTRACE_GETREGSET
+# undef PTRACE_SETREGSET
+# undef PTRACE_SEIZE
+# undef PTRACE_INTERRUPT
+# undef PTRACE_LISTEN
+# undef PTRACE_PEEKSIGINFO
+# undef PTRACE_GETSIGMASK
+# undef PTRACE_SETSIGMASK
+# undef PTRACE_SECCOMP_GET_FILTER
+# undef PTRACE_PEEKUSR_AREA
+# undef PTRACE_POKEUSR_AREA
+# undef PTRACE_GET_LAST_BREAK
+# undef PTRACE_ENABLE_TE
+# undef PTRACE_DISABLE_TE
+# undef PTRACE_TE_ABORT_RAND
+# undef PTRACE_O_TRACESYSGOOD
+# undef PTRACE_O_TRACEFORK
+# undef PTRACE_O_TRACEVFORK
+# undef PTRACE_O_TRACECLONE
+# undef PTRACE_O_TRACEEXEC
+# undef PTRACE_O_TRACEVFORKDONE
+# undef PTRACE_O_TRACEEXIT
+# undef PTRACE_O_TRACESECCOMP
+# undef PTRACE_O_EXITKILL
+# undef PTRACE_O_SUSPEND_SECCOMP
+# undef PTRACE_O_MASK
+# undef PTRACE_EVENT_FORK
+# undef PTRACE_EVENT_VFORK
+# undef PTRACE_EVENT_CLONE
+# undef PTRACE_EVENT_EXEC
+# undef PTRACE_EVENT_VFORK_DONE
+# undef PTRACE_EVENT_EXIT
+# undef PTRACE_EVENT_SECCOMP
+# undef PTRACE_EVENT_STOP
+# undef PTRACE_PEEKSIGINFO_SHARED
 #endif
 /* Type of the REQUEST argument to `ptrace.'  */
 enum __ptrace_request