diff options
author | Markus F.X.J. Oberhumer <markus.oberhumer@oberhumer.com> | 2017-06-13 10:12:23 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-06-13 10:12:23 +0200 |
commit | 963679389c6866672b939fcd0bd4c631be81fca7 (patch) | |
tree | 3c8807e902ad94fbe272b9ca784eefdb975d9e93 | |
parent | a939a4b3a4dd4b2f339a53c1bf771d90bd49513c (diff) | |
download | Nim-963679389c6866672b939fcd0bd4c631be81fca7.tar.gz |
cgen: #undef some more predefined symbols. (#5831)
This is a followup to issue #5171.
-rw-r--r-- | compiler/cgen.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim index c67dd6581..3797a92c2 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -601,8 +601,18 @@ proc generateHeaders(m: BModule) = addf(m.s[cfsHeaders], "#include \"$1\"$N", [rope(it)]) else: addf(m.s[cfsHeaders], "#include $1$N", [rope(it)]) + add(m.s[cfsHeaders], "#undef LANGUAGE_C" & tnl) + add(m.s[cfsHeaders], "#undef MIPSEB" & tnl) + add(m.s[cfsHeaders], "#undef MIPSEL" & tnl) + add(m.s[cfsHeaders], "#undef PPC" & tnl) + add(m.s[cfsHeaders], "#undef R3000" & tnl) + add(m.s[cfsHeaders], "#undef R4000" & tnl) + add(m.s[cfsHeaders], "#undef i386" & tnl) add(m.s[cfsHeaders], "#undef linux" & tnl) + add(m.s[cfsHeaders], "#undef mips" & tnl) add(m.s[cfsHeaders], "#undef near" & tnl) + add(m.s[cfsHeaders], "#undef powerpc" & tnl) + add(m.s[cfsHeaders], "#undef unix" & tnl) proc initFrame(p: BProc, procname, filename: Rope): Rope = discard cgsym(p.module, "nimFrame") |