diff options
author | Araq <rumpf_a@web.de> | 2018-08-05 14:17:24 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-08-05 14:17:24 +0200 |
commit | 7ac6462cbd30bcdb1c3805fbb06be13b3346ce2a (patch) | |
tree | 2e79c210ccd19a7065b36992e19ab74ff061f5df /lib/pure/ospaths.nim | |
parent | 282c4f3d0a72fbb4c49df51048e2e13fafcd8659 (diff) | |
parent | 74842ed4a981b6ff168d67d05ee92dce350549cb (diff) | |
download | Nim-7ac6462cbd30bcdb1c3805fbb06be13b3346ce2a.tar.gz |
make at least bootstrapping work
Diffstat (limited to 'lib/pure/ospaths.nim')
-rw-r--r-- | lib/pure/ospaths.nim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/pure/ospaths.nim b/lib/pure/ospaths.nim index 4ae5afd6c..a7ebd9d15 100644 --- a/lib/pure/ospaths.nim +++ b/lib/pure/ospaths.nim @@ -147,7 +147,7 @@ else: # UNIX-like operating system DirSep* = '/' AltSep* = DirSep PathSep* = ':' - FileSystemCaseSensitive* = true + FileSystemCaseSensitive* = when defined(macosx): false else: true ExeExt* = "" ScriptExt* = "" DynlibFormat* = when defined(macosx): "lib$1.dylib" else: "lib$1.so" @@ -410,6 +410,11 @@ proc cmpPaths*(pathA, pathB: string): int {. ## | 0 iff pathA == pathB ## | < 0 iff pathA < pathB ## | > 0 iff pathA > pathB + runnableExamples: + when defined(macosx): + doAssert cmpPaths("foo", "Foo") == 0 + elif defined(posix): + doAssert cmpPaths("foo", "Foo") > 0 if FileSystemCaseSensitive: result = cmp(pathA, pathB) else: |