Nim namespace for cpp (#7453)

- new option --usenamespace to generate nim cpp code in its own namespace Nim
- minor changes for compatibility with the new Embarcadero = Borland C++-Builder (bcc)
This commit is contained in:
AdrianV
2018-04-15 13:43:01 +02:00
committed by Andreas Rumpf
parent 70c0ff1be2
commit 0ce28d15cc
8 changed files with 44 additions and 7 deletions

View File

@@ -295,7 +295,7 @@ else:
when (defined(x86) or defined(amd64)) and defined(vcc):
proc cpuRelax* {.importc: "YieldProcessor", header: "<windows.h>".}
elif (defined(x86) or defined(amd64)) and someGcc:
elif (defined(x86) or defined(amd64)) and (someGcc or defined(bcc)):
proc cpuRelax* {.inline.} =
{.emit: """asm volatile("pause" ::: "memory");""".}
elif someGcc or defined(tcc):