summaryrefslogtreecommitdiffstats
path: root/scripts/qapi.py
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2016-02-02 07:51:41 -0700
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:32:24 -0600
commit0d02db60f3d76293f521a77f66a1f6ec16401688 (patch)
tree7cc582a2595b66dbbf76be2ee43788803861e4ab /scripts/qapi.py
parentf435891d4e9f501304cca619b55e5d973fb67865 (diff)
downloadhqemu-0d02db60f3d76293f521a77f66a1f6ec16401688.zip
hqemu-0d02db60f3d76293f521a77f66a1f6ec16401688.tar.gz
qapi: Fix compilation failure on MIPS and SPARC
Commit 86f4b687 broke compilation on MIPS and SPARC, which have a preprocessor pollution of '#define mips 1' and '#define sparc 1', respectively. Treat it the same way as we do for the pollution with 'unix', so that QMP remains backwards compatible and only the C code needs to use the alternative 'q_mips', 'q_sparc' spelling. CC: James Hogan <james.hogan@imgtec.com> CC: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Eric Blake <eblake@redhat.com> Tested-by: James Hogan <james.hogan@imgtec.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'scripts/qapi.py')
-rw-r--r--scripts/qapi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/qapi.py b/scripts/qapi.py
index 7519cf8..f40dc9e 100644
--- a/scripts/qapi.py
+++ b/scripts/qapi.py
@@ -1482,7 +1482,7 @@ def c_name(name, protect=True):
'and', 'and_eq', 'bitand', 'bitor', 'compl', 'not',
'not_eq', 'or', 'or_eq', 'xor', 'xor_eq'])
# namespace pollution:
- polluted_words = set(['unix', 'errno'])
+ polluted_words = set(['unix', 'errno', 'mips', 'sparc'])
name = name.translate(c_name_trans)
if protect and (name in c89_words | c99_words | c11_words | gcc_words
| cpp_words | polluted_words):
OpenPOWER on IntegriCloud