public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/grte] powerpc: Undefine Linux ptrace macros that conflict with __ptrace_request
@ 2021-08-27 23:27 Fangrui Song
  0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-08-27 23:27 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=3d67bc8070d3ad7b201b3424053af210b8e22c82

commit 3d67bc8070d3ad7b201b3424053af210b8e22c82
Author: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Date:   Mon Feb 26 10:40:17 2018 -0300

    powerpc: Undefine Linux ptrace macros that conflict with __ptrace_request
    
    Linux ptrace headers define macros whose tokens conflict with the
    constants of enum __ptrace_request causing build errors when
    asm/ptrace.h or linux/ptrace.h are included before sys/ptrace.h.
    
            * sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Undefine Linux
            macros used in __ptrace_request.
    
    Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
    (cherry picked from commit 398c6fddafcee2dc4c2b2574417a2d0cfccaeec1)

Diff:
---
 ChangeLog                                    |  5 ++++
 sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h | 43 ++++++++++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 8d05fbeab5..6ae33c2dbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-02-26  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
+
+	* sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h: Undefine Linux
+	macros used in __ptrace_request.
+
 2018-02-21  Mike FABIAN  <mfabian@redhat.com>
 
 	[BZ #22517]
diff --git a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
index 75567b2bad..1c68895159 100644
--- a/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
+++ b/sysdeps/unix/sysv/linux/powerpc/sys/ptrace.h
@@ -24,6 +24,49 @@
 
 __BEGIN_DECLS
 
+#if defined _LINUX_PTRACE_H || defined _ASM_POWERPC_PTRACE_H
+/* Do not let Linux headers macros interfere with enum __ptrace_request.  */
+# undef PTRACE_ATTACH
+# undef PTRACE_CONT
+# undef PTRACE_DETACH
+# undef PTRACE_GET_DEBUGREG
+# undef PTRACE_GETEVENTMSG
+# undef PTRACE_GETEVRREGS
+# undef PTRACE_GETFPREGS
+# undef PTRACE_GETREGS
+# undef PTRACE_GETREGS64
+# undef PTRACE_GETREGSET
+# undef PTRACE_GETSIGINFO
+# undef PTRACE_GETSIGMASK
+# undef PTRACE_GETVRREGS
+# undef PTRACE_GETVSRREGS
+# undef PTRACE_INTERRUPT
+# undef PTRACE_KILL
+# undef PTRACE_LISTEN
+# undef PTRACE_PEEKDATA
+# undef PTRACE_PEEKSIGINFO
+# undef PTRACE_PEEKTEXT
+# undef PTRACE_POKEDATA
+# undef PTRACE_POKETEXT
+# undef PTRACE_SECCOMP_GET_FILTER
+# undef PTRACE_SEIZE
+# undef PTRACE_SET_DEBUGREG
+# undef PTRACE_SETEVRREGS
+# undef PTRACE_SETFPREGS
+# undef PTRACE_SETOPTIONS
+# undef PTRACE_SETREGS
+# undef PTRACE_SETREGS64
+# undef PTRACE_SETREGSET
+# undef PTRACE_SETSIGINFO
+# undef PTRACE_SETSIGMASK
+# undef PTRACE_SETVRREGS
+# undef PTRACE_SETVSRREGS
+# undef PTRACE_SINGLEBLOCK
+# undef PTRACE_SINGLESTEP
+# undef PTRACE_SYSCALL
+# undef PTRACE_TRACEME
+#endif
+
 /* Type of the REQUEST argument to `ptrace.'  */
 enum __ptrace_request
 {


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-27 23:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 23:27 [glibc/maskray/grte] powerpc: Undefine Linux ptrace macros that conflict with __ptrace_request Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).