--- /dev/null
+/* 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
-{-# OPTIONS -cpp #-}
+{-# OPTIONS -cpp -fffi #-}
#include "config.h"
-----------------------------------------------------------------------------
--
import System.Environment
import System.IO
-import System.Cmd
import Data.List
import System.Directory
import System.Exit
import Data.Char
+#if __GLASGOW_HASKELL__ < 603
+import Foreign ( withMany, withArray0, nullPtr, Ptr )
+import Foreign.C ( CString, withCString, throwErrnoIfMinus1 )
+#else
+import System.Cmd ( rawSystem )
+#endif
+
main = do
args <- getArgs
case args of
dieProg :: String -> IO a
dieProg msg = do p <- getProgName; die (p ++ ": " ++ msg)
+#if __GLASGOW_HASKELL__ < 603
+#include "../../../libraries/base/System/RawSystem.hs-inc"
+#endif