summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-02-14 22:19:40 +0100
committerAraq <rumpf_a@web.de>2014-02-14 22:19:40 +0100
commitf95a8df243354767dc4fc7f907d5a5b26566b58d (patch)
treee07f973245322cc72904d119e30ced2897aef8da /lib/pure
parent49fa421ba77058f683bc476528a3a8f05d20e7e9 (diff)
downloadNim-f95a8df243354767dc4fc7f907d5a5b26566b58d.tar.gz
fixes #811
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/os.nim6
-rw-r--r--lib/pure/osproc.nim5
2 files changed, 7 insertions, 4 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index 75adb1174..89bb92f9a 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -1037,10 +1037,10 @@ proc execShellCmd*(command: string): int {.rtl, extern: "nos$1",
   ## the process has finished. To execute a program without having a
   ## shell involved, use the `execProcess` proc of the `osproc`
   ## module.
-  when defined(windows):
-    result = c_system(command)
-  else:
+  when defined(linux):
     result = c_system(command) shr 8
+  else:
+    result = c_system(command)
 
 # Environment handling cannot be put into RTL, because the ``envPairs``
 # iterator depends on ``environment``.
diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim
index 6df85bbc6..e0689c4a6 100644
--- a/lib/pure/osproc.nim
+++ b/lib/pure/osproc.nim
@@ -791,7 +791,10 @@ elif not defined(useNimRtl):
   proc csystem(cmd: cstring): cint {.nodecl, importc: "system".}
 
   proc execCmd(command: string): int =
-    result = csystem(command) shr 8
+    when defined(linux)
+      result = csystem(command) shr 8
+    else:
+      result = csystem(command)
 
   proc createFdSet(fd: var TFdSet, s: seq[PProcess], m: var int) =
     FD_ZERO(fd)