+#elif !mingw32_HOST_OS
+-- crude fallback implementation: could do much better than this under Unix
+rawSystem cmd args = system (unwords (map translate (cmd:args)))
+
+translate :: String -> String
+translate str = '\'' : foldr escape "'" str
+ where escape '\'' = showString "'\\''"
+ escape c = showChar c
+#else /* mingw32_HOST_OS && ! __GLASGOW_HASKELL__ */
+# if __HUGS__
+rawSystem cmd args = system (unwords (cmd : map translate args))
+# else
+rawSystem cmd args = system (unwords (map translate (cmd:args)))
+#endif
+
+-- copied from System.Process (qv)
+translate :: String -> String
+translate str = '"' : snd (foldr escape (True,"\"") str)
+ where escape '"' (b, str) = (True, '\\' : '"' : str)
+ escape '\\' (True, str) = (True, '\\' : '\\' : str)
+ escape '\\' (False, str) = (False, '\\' : str)
+ escape c (b, str) = (False, c : str)
+#endif