X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=System%2FCmd.hs;h=2d8635ffd15e5a6cf0319f7f150b0fb6de0831dd;hb=125d2c6be8edb21dc42354e2cc51e60f38fc45d4;hp=730b0ca83a6122cbdc0fc9ef54d3987a434f27cb;hpb=9d5fa78b12f58036e1bcaeaae47d0c40740811a7;p=haskell-directory.git diff --git a/System/Cmd.hs b/System/Cmd.hs index 730b0ca..2d8635f 100644 --- a/System/Cmd.hs +++ b/System/Cmd.hs @@ -123,16 +123,12 @@ translate :: String -> String translate str = '\'' : foldr escape "'" str where escape '\'' = showString "'\\''" escape c = showChar c -#elif __HUGS__ +#else /* mingw32_HOST_OS && ! __GLASGOW_HASKELL__ */ +# if __HUGS__ rawSystem cmd args = system (unwords (cmd : map translate args)) - -translate :: String -> String -translate str = '"' : foldr escape "\"" str - where escape '"' = showString "\\\"" - escape '\\' = showString "\\\\" - escape c = showChar c -#else /* mingw32_HOST_OS && ! __GLASGOW_HASKELL__ && ! __HUGS__ */ +# else rawSystem cmd args = system (unwords (map translate (cmd:args))) +#endif -- copied from System.Process (qv) translate :: String -> String