From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] sim: mips: avoid _ namespace
Date: Thu, 25 Nov 2021 23:49:00 -0500 [thread overview]
Message-ID: <20211126044900.16718-1-vapier@gentoo.org> (raw)
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
reply other threads:[~2021-11-26 4:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211126044900.16718-1-vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).