* [PATCH] sim: mips: avoid _ namespace
@ 2021-11-26 4:49 Mike Frysinger
0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2021-11-26 4:49 UTC (permalink / raw)
To: gdb-patches
Some C libraries export _P symbols in their headers (like older
newlib and its ctype.h), so use P_ instead to avoid conflicts.
---
sim/mips/interp.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index 30d417bab569..2cc7524d4465 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -1468,14 +1468,14 @@ sim_monitor (SIM_DESC sd,
sim_io_printf(sd,"<binary not supported>");
else
{
-#define _P(c, fmt64, fmt32) \
+#define P_(c, fmt64, fmt32) \
case c: \
if (longlong) \
sim_io_printf (sd, "%" fmt64, lv); \
else \
sim_io_printf (sd, "%" fmt32, (int)lv); \
break;
-#define P(c, fmtc) _P(c, PRI##fmtc##64, PRI##fmtc##32)
+#define P(c, fmtc) P_(c, PRI##fmtc##64, PRI##fmtc##32)
switch (c)
{
P('d', d)
@@ -1486,7 +1486,7 @@ sim_monitor (SIM_DESC sd,
}
}
#undef P
-#undef _P
+#undef P_
}
else if (strchr ("eEfgG", c))
{
--
2.33.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-11-26 4:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-26 4:49 [PATCH] sim: mips: avoid _ namespace Mike Frysinger
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).