summaryrefslogtreecommitdiff
path: root/ghc/compiler/cbits/rawSystem.c
diff options
context:
space:
mode:
authorsimonmar <unknown>2003-06-12 16:06:07 +0000
committersimonmar <unknown>2003-06-12 16:06:07 +0000
commit526db217c5fc53d963d65b7ac39d2f42d14c2bde (patch)
tree09b6cebccf9e51f46b5fad166e68a94fb5897d1b /ghc/compiler/cbits/rawSystem.c
parentdc2ae820b941d9368a34dcc63ec6f3eac5df7cd5 (diff)
downloadhaskell-526db217c5fc53d963d65b7ac39d2f42d14c2bde.tar.gz
[project @ 2003-06-12 16:06:05 by simonmar]
Change the type of System.Cmd.rawSystem: rawSystem :: FilePath -> [String] -> IO ExitCode and implement it properly on both Windows & Unix. The intended meaning is that the program is executed with *exactly* these arguments. We now re-use this rawSystem in the compiler itself (using it directly from the library if __GLASGOW_HASKELL__ >= 601). The previous implementation of SysTools.runSomething was broken on 4.08, because Posix.executeFile was broken. However, implementing the new rawSystem on 4.08 is tricky, because it uses the FFI marshalling libraries which weren't present on 4.08. Hence, bootstrapping from 4.08 is now not possible (it was already not possible on Windows). It could be made possible by importing enough FFI marshalling support, but I won't bother doing that unless/until it is needed.
Diffstat (limited to 'ghc/compiler/cbits/rawSystem.c')
-rw-r--r--ghc/compiler/cbits/rawSystem.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ghc/compiler/cbits/rawSystem.c b/ghc/compiler/cbits/rawSystem.c
new file mode 100644
index 0000000000..d103f4808b
--- /dev/null
+++ b/ghc/compiler/cbits/rawSystem.c
@@ -0,0 +1,6 @@
+/* Grab rawSystem from the library sources iff we're bootstrapping with an
+ * old version of GHC.
+ */
+#if __GLASGOW_HASKELL__ < 601
+#include "../../libraries/base/cbits/rawSystem.c"
+#endif