[commit: process] encoding: windows fixes (a4d13cd)
Max Bolingbroke
batterseapower at hotmail.com
Wed Apr 6 16:37:18 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/process
On branch : encoding
http://hackage.haskell.org/trac/ghc/changeset/a4d13cde8a3bef35152b301d1ddfb82c505f4297
>---------------------------------------------------------------
commit a4d13cde8a3bef35152b301d1ddfb82c505f4297
Author: Max Bolingbroke <batterseapower at hotmail.com>
Date: Tue Apr 5 11:54:54 2011 +0100
windows fixes
>---------------------------------------------------------------
System/Process/Internals.hs | 15 +++++++--------
include/runProcess.h | 2 +-
2 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/System/Process/Internals.hs b/System/Process/Internals.hs
index 49cf69f..bcfa7d0 100644
--- a/System/Process/Internals.hs
+++ b/System/Process/Internals.hs
@@ -214,6 +214,13 @@ runGenProcess_
#ifdef __GLASGOW_HASKELL__
+withFilePathLike :: FilePath -> (Ptr CString -> IO a) -> IO a
+#if __GLASGOW_HASKELL__ >= 611 && MIN_VERSION_base(4,3,2)
+withFilePathLike = GHC.withCString fileSystemEncoding
+#else
+withFilePathLike = withCString
+#endif
+
-- -----------------------------------------------------------------------------
-- POSIX runProcess with signal handling in the child
@@ -363,18 +370,10 @@ foreign import ccall unsafe "runInteractiveProcess"
-> Ptr FD
-> CInt -- close_fds
-> IO PHANDLE
-
-withFilePathLike :: FilePath -> (Ptr CString -> IO a) -> IO a
-#if __GLASGOW_HASKELL__ && MIN_VERSION_base(4,3,2)
-withFilePathLike = GHC.withCString fileSystemEncoding
-#else
-withFilePathLike = withCString
#endif
#endif /* __GLASGOW_HASKELL__ */
-#endif
-
fd_stdin, fd_stdout, fd_stderr :: FD
fd_stdin = 0
fd_stdout = 1
diff --git a/include/runProcess.h b/include/runProcess.h
index 4dda6e5..efba140 100644
--- a/include/runProcess.h
+++ b/include/runProcess.h
@@ -61,7 +61,7 @@ extern ProcHandle runInteractiveProcess( char *const args[],
extern ProcHandle runInteractiveProcess( wchar_t *cmd,
wchar_t *workingDirectory,
- void *environment,
+ wchar_t *environment,
int fdStdIn, int fdStdOut, int fdStdErr,
int *pfdStdInput,
int *pfdStdOutput,
More information about the Cvs-libraries
mailing list