From 37b77e8a953abe50aaf303041213f51fe820fcd2 Mon Sep 17 00:00:00 2001 From: rrt Date: Wed, 15 Aug 2001 15:02:04 +0000 Subject: [PATCH] [project @ 2001-08-15 15:02:04 by rrt] Cut'n'paste the latest version of rawSystem, not the horrible old past-its-sell-by-date version I had in my smelly old tree. --- ghc/compiler/main/SysTools.lhs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghc/compiler/main/SysTools.lhs b/ghc/compiler/main/SysTools.lhs index 5469d2c..56dd3fc 100644 --- a/ghc/compiler/main/SysTools.lhs +++ b/ghc/compiler/main/SysTools.lhs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: SysTools.lhs,v 1.51 2001/08/15 14:59:34 rrt Exp $ +-- $Id: SysTools.lhs,v 1.52 2001/08/15 15:02:04 rrt Exp $ -- -- (c) The University of Glasgow 2001 -- @@ -805,12 +805,12 @@ getProcessID = Posix.getProcessID rawSystem :: String -> IO ExitCode rawSystem "" = ioException (IOError Nothing InvalidArgument "rawSystem" "null command" Nothing) rawSystem cmd = - withUnsafeCString cmd $ \s -> do + withCString cmd $ \s -> do status <- throwErrnoIfMinus1 "rawSystem" (primRawSystem s) case status of 0 -> return ExitSuccess n -> return (ExitFailure n) -foreign import ccall "rawSystemCmd" unsafe primRawSystem :: UnsafeCString -> IO Int +foreign import ccall "rawSystemCmd" unsafe primRawSystem :: CString -> IO Int \end{code} -- 1.7.10.4