summary refs log tree commit diff stats
path: root/compiler/nimconf.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-11-08 15:47:00 +0100
committerAraq <rumpf_a@web.de>2014-11-08 15:47:00 +0100
commit830e0c0009d25d84a26fc997722eee4ecd015fd9 (patch)
tree1902dc5afe39a9f57052891c37f34e5e590a1e47 /compiler/nimconf.nim
parentcb976c9c9a0ff0ff16fabc7543a4594c60458caa (diff)
downloadNim-830e0c0009d25d84a26fc997722eee4ecd015fd9.tar.gz
the codegen doesn't emit deepCopy for parallel statements
Diffstat (limited to 'compiler/nimconf.nim')
-rw-r--r--compiler/nimconf.nim8
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/nimconf.nim b/compiler/nimconf.nim
index 98fe831d3..bcf9b5359 100644
--- a/compiler/nimconf.nim
+++ b/compiler/nimconf.nim
@@ -113,7 +113,7 @@ proc parseDirective(L: var TLexer, tok: var TToken) =
   case whichKeyword(tok.ident)
   of wIf:
     setLen(condStack, len(condStack) + 1)
-    var res = evalppIf(L, tok)
+    let res = evalppIf(L, tok)
     condStack[high(condStack)] = res
     if not res: jumpToDirective(L, tok, jdElseEndif)
   of wElif: doElif(L, tok)
@@ -224,8 +224,10 @@ proc loadConfigs*(cfg: string) =
   if libpath == "": 
     # choose default libpath:
     var prefix = getPrefixDir()
-    if prefix == "/usr": libpath = "/usr/lib/nim"
-    elif prefix == "/usr/local": libpath = "/usr/local/lib/nim"
+    when defined(posix):
+      if prefix == "/usr": libpath = "/usr/lib/nim"
+      elif prefix == "/usr/local": libpath = "/usr/local/lib/nim"
+      else: libpath = joinPath(prefix, "lib")
     else: libpath = joinPath(prefix, "lib")
 
   if optSkipConfigFile notin gGlobalOptions: