should compile on netbsd

This commit is contained in:
Araq 2014-01-23 20:43:56 +01:00
commit de538deb7a
3 changed files with 8 additions and 8 deletions

View file

@ -1586,7 +1586,7 @@ proc getAppFilename*(): string {.rtl, extern: "nos$1", tags: [FReadIO].} =
# little heuristic that may work on other POSIX-like systems:
result = string(getEnv("_"))
if len(result) == 0:
result = string(ParamStr(0))
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?