summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-04-23 00:29:11 +0200
committerAraq <rumpf_a@web.de>2014-04-23 00:29:11 +0200
commit3851ee209c688dd695c7bc50185aaa8d89359273 (patch)
tree52f6c36f1e52ec543d7dad5bc5c3f964f8a9317b /lib
parent5aa8278f6c4a3c211dd2e76c3c828a68c55ee28d (diff)
downloadNim-3851ee209c688dd695c7bc50185aaa8d89359273.tar.gz
DLL generation works again
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/os.nim19
1 files changed, 11 insertions, 8 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index 649dcd2d4..e2fc62d77 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -1614,14 +1614,17 @@ when defined(linux) or defined(solaris) or defined(bsd) or defined(aix):
 
 when not (defined(windows) or defined(macosx)):
   proc getApplHeuristic(): string =
-    result = string(paramStr(0))
-    # POSIX guaranties that this contains the executable
-    # as it has been executed by the calling process
-    if len(result) > 0 and result[0] != DirSep: # not an absolute path?
-      # iterate over any path in the $PATH environment variable
-      for p in split(string(getEnv("PATH")), {PathSep}):
-        var x = joinPath(p, result)
-        if existsFile(x): return x
+    when defined(paramStr):
+      result = string(paramStr(0))
+      # POSIX guaranties that this contains the executable
+      # as it has been executed by the calling process
+      if len(result) > 0 and result[0] != DirSep: # not an absolute path?
+        # iterate over any path in the $PATH environment variable
+        for p in split(string(getEnv("PATH")), {PathSep}):
+          var x = joinPath(p, result)
+          if existsFile(x): return x
+    else:
+      result = ""
 
 when defined(macosx):
   type
> 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234