summary refs log tree commit diff stats
path: root/compiler/tccgen.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2012-10-30 22:29:03 +0100
committerAraq <rumpf_a@web.de>2012-10-30 22:29:03 +0100
commit2133fbfccef934ae0f8ffafe0ecf4ef378e4cacf (patch)
treef134579954e688260d9417e86e48427129430181 /compiler/tccgen.nim
parent86ed9181570d16406e63754bd409c2b33c73b4a5 (diff)
downloadNim-2133fbfccef934ae0f8ffafe0ecf4ef378e4cacf.tar.gz
bugfix: wrong assertions for C++ code generation; some solaris support; first steps to an effect system
Diffstat (limited to 'compiler/tccgen.nim')
-rwxr-xr-xcompiler/tccgen.nim8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/tccgen.nim b/compiler/tccgen.nim
index 0a7509afe..9ed6db8a1 100755
--- a/compiler/tccgen.nim
+++ b/compiler/tccgen.nim
@@ -59,6 +59,8 @@ proc setupEnvironment =
     #addFile(nimrodDir / r"tinyc\lib\libtcc1.c")
   else:
     addSysincludePath(gTinyC, "/usr/include")
+    when defined(amd64):
+      addSysincludePath(gTinyC, "/usr/include/x86_64-linux-gnu")
 
 proc compileCCode*(ccode: string) = 
   if not libIncluded:
@@ -66,11 +68,11 @@ proc compileCCode*(ccode: string) =
     setupEnvironment()
   discard compileString(gTinyC, ccode)
   
-proc run*() = 
+proc run*() =
   var a: array[0..1, cstring]
   a[0] = ""
   a[1] = ""
-  var err = tinyc.run(gTinyC, 0'i32, addr(a)) != 0'i32
+  var err = tinyc.run(gTinyC, 0'i32, cast[cstringArray](addr(a))) != 0'i32
   closeCCState(gTinyC)
-  if err: rawMessage(errExecutionOfProgramFailed, "")  
+  if err: rawMessage(errExecutionOfProgramFailed, "")