00db10
commit cab91f947a6059907a314a91f4c90abcccfb0262
00db10
Author: Dmitry V. Levin <ldv@altlinux.org>
00db10
Date:   Sun Jul 23 23:22:53 2017 +0000
00db10
00db10
    S390: fix sys/ptrace.h to make it includible again after asm/ptrace.h
00db10
    
00db10
    sys/ptrace.h on S390 used to be includible both before and after
00db10
    asm/ptrace.h, until commit b08a6a0dea63742313ed3d9577c1e2d83436b196
00db10
    among other changes introduced PTRACE_SINGLEBLOCK enum constant which
00db10
    is also defined in asm/ptrace.h as a macro, making sys/ptrace.h fail
00db10
    to compile when included after asm/ptrace.h.
00db10
    
00db10
    * sysdeps/unix/sysv/linux/s390/sys/ptrace.h [_LINUX_PTRACE_H ||
00db10
    _S390_PTRACE_H]: Undefine all PTRACE_* macro constants defined
00db10
    later as enum constants, except PTRACE_PEEKUSER, PTRACE_POKEUSER,
00db10
    and PTRACE_SEIZE_DEVEL that are not defined by Linux headers.
00db10
00db10
diff --git a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
00db10
index 88079fc..e913647 100644
00db10
--- a/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
00db10
+++ b/sysdeps/unix/sysv/linux/s390/sys/ptrace.h
00db10
@@ -24,24 +24,60 @@
00db10
 #include <bits/types.h>
00db10
 
00db10
 __BEGIN_DECLS
00db10
-#ifdef _LINUX_PTRACE_H
00db10
+#if defined _LINUX_PTRACE_H || defined _S390_PTRACE_H
00db10
 /* Kludge to stop stuff gdb & strace compiles from getting upset
00db10
  */
00db10
-#undef PTRACE_TRACEME
00db10
-#undef PTRACE_PEEKTEXT
00db10
-#undef PTRACE_PEEKDATA
00db10
-#undef PTRACE_PEEKUSR
00db10
-#undef PTRACE_POKETEXT
00db10
-#undef PTRACE_POKEDATA
00db10
-#undef PTRACE_POKEUSR
00db10
-#undef PTRACE_CONT
00db10
-#undef PTRACE_KILL
00db10
-#undef PTRACE_SINGLESTEP
00db10
-
00db10
-#undef PTRACE_ATTACH
00db10
-#undef PTRACE_DETACH
00db10
-
00db10
-#undef PTRACE_SYSCALL
00db10
+# undef PTRACE_TRACEME
00db10
+# undef PTRACE_PEEKTEXT
00db10
+# undef PTRACE_PEEKDATA
00db10
+# undef PTRACE_POKETEXT
00db10
+# undef PTRACE_POKEDATA
00db10
+# undef PTRACE_CONT
00db10
+# undef PTRACE_KILL
00db10
+# undef PTRACE_SINGLESTEP
00db10
+# undef PTRACE_SINGLEBLOCK
00db10
+# undef PTRACE_ATTACH
00db10
+# undef PTRACE_DETACH
00db10
+# undef PTRACE_SYSCALL
00db10
+# undef PTRACE_SETOPTIONS
00db10
+# undef PTRACE_GETEVENTMSG
00db10
+# undef PTRACE_GETSIGINFO
00db10
+# undef PTRACE_SETSIGINFO
00db10
+# undef PTRACE_GETREGSET
00db10
+# undef PTRACE_SETREGSET
00db10
+# undef PTRACE_SEIZE
00db10
+# undef PTRACE_INTERRUPT
00db10
+# undef PTRACE_LISTEN
00db10
+# undef PTRACE_PEEKSIGINFO
00db10
+# undef PTRACE_GETSIGMASK
00db10
+# undef PTRACE_SETSIGMASK
00db10
+# undef PTRACE_SECCOMP_GET_FILTER
00db10
+# undef PTRACE_PEEKUSR_AREA
00db10
+# undef PTRACE_POKEUSR_AREA
00db10
+# undef PTRACE_GET_LAST_BREAK
00db10
+# undef PTRACE_ENABLE_TE
00db10
+# undef PTRACE_DISABLE_TE
00db10
+# undef PTRACE_TE_ABORT_RAND
00db10
+# undef PTRACE_O_TRACESYSGOOD
00db10
+# undef PTRACE_O_TRACEFORK
00db10
+# undef PTRACE_O_TRACEVFORK
00db10
+# undef PTRACE_O_TRACECLONE
00db10
+# undef PTRACE_O_TRACEEXEC
00db10
+# undef PTRACE_O_TRACEVFORKDONE
00db10
+# undef PTRACE_O_TRACEEXIT
00db10
+# undef PTRACE_O_TRACESECCOMP
00db10
+# undef PTRACE_O_EXITKILL
00db10
+# undef PTRACE_O_SUSPEND_SECCOMP
00db10
+# undef PTRACE_O_MASK
00db10
+# undef PTRACE_EVENT_FORK
00db10
+# undef PTRACE_EVENT_VFORK
00db10
+# undef PTRACE_EVENT_CLONE
00db10
+# undef PTRACE_EVENT_EXEC
00db10
+# undef PTRACE_EVENT_VFORK_DONE
00db10
+# undef PTRACE_EVENT_EXIT
00db10
+# undef PTRACE_EVENT_SECCOMP
00db10
+# undef PTRACE_EVENT_STOP
00db10
+# undef PTRACE_PEEKSIGINFO_SHARED
00db10
 #endif
00db10
 /* Type of the REQUEST argument to `ptrace.'  */
00db10
 enum __ptrace_request