From c0f9d658279d4d352672e283df53c1072925fc97 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 25 Nov 2021 23:48:02 -0500 Subject: [PATCH] sim: mips: avoid _ namespace 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 30d417bab56..2cc7524d446 100644 --- a/sim/mips/interp.c +++ b/sim/mips/interp.c @@ -1468,14 +1468,14 @@ sim_monitor (SIM_DESC sd, sim_io_printf(sd,""); 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.30.2