Merge branch 'master' of github.com:Araq/Nimrod
This commit is contained in:
commit
1392049aea
3 changed files with 8 additions and 7 deletions
10
koch.nim
10
koch.nim
|
|
@ -180,11 +180,11 @@ proc tests(args: string) =
|
||||||
# we compile the tester with taintMode:on to have a basic
|
# we compile the tester with taintMode:on to have a basic
|
||||||
# taint mode test :-)
|
# taint mode test :-)
|
||||||
exec("nimrod cc --taintMode:on tests/tester")
|
exec("nimrod cc --taintMode:on tests/tester")
|
||||||
exec("tests/tester reject")
|
exec(getCurrentDir() / "tests/tester".exe & " reject")
|
||||||
exec("tests/tester compile")
|
exec(getCurrentDir() / "tests/tester".exe & " compile")
|
||||||
exec("tests/tester examples")
|
exec(getCurrentDir() / "tests/tester".exe & " examples")
|
||||||
exec("tests/tester run")
|
exec(getCurrentDir() / "tests/tester".exe & " run")
|
||||||
exec("tests/tester merge")
|
exec(getCurrentDir() / "tests/tester".exe & " merge")
|
||||||
|
|
||||||
proc showHelp() =
|
proc showHelp() =
|
||||||
quit(HelpText % [NimrodVersion & repeatChar(44-len(NimrodVersion)),
|
quit(HelpText % [NimrodVersion & repeatChar(44-len(NimrodVersion)),
|
||||||
|
|
|
||||||
|
|
@ -868,7 +868,8 @@ iterator walkDirRec*(dir: string, filter={pcFile, pcDir}): string =
|
||||||
|
|
||||||
proc rawRemoveDir(dir: string) =
|
proc rawRemoveDir(dir: string) =
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
if RemoveDirectoryA(dir) == 0'i32 and GetLastError() != 3'i32: OSError()
|
if RemoveDirectoryA(dir) != 0'i32 and GetLastError() != 3'i32 and
|
||||||
|
GetLastError() != 18'i32: OSError()
|
||||||
else:
|
else:
|
||||||
if rmdir(dir) != 0'i32 and errno != ENOENT: OSError()
|
if rmdir(dir) != 0'i32 and errno != ENOENT: OSError()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,7 +131,7 @@ proc countProcessors*(): int {.rtl, extern: "nosp$1".} =
|
||||||
## Returns 0 if it cannot be detected.
|
## Returns 0 if it cannot be detected.
|
||||||
when defined(windows):
|
when defined(windows):
|
||||||
var x = getenv("NUMBER_OF_PROCESSORS")
|
var x = getenv("NUMBER_OF_PROCESSORS")
|
||||||
if x.len > 0: result = parseInt(x)
|
if x.len > 0: result = parseInt(x.string)
|
||||||
elif defined(macosx) or defined(bsd):
|
elif defined(macosx) or defined(bsd):
|
||||||
var
|
var
|
||||||
mib: array[0..3, cint]
|
mib: array[0..3, cint]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue