[commit: process] master: Update for recent mutable locale changes (9b3dd1b)
David Terei
davidterei at gmail.com
Fri Nov 18 23:14:33 CET 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/process
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/9b3dd1ba123a85220daf1daea7996a71cd251dca
>---------------------------------------------------------------
commit 9b3dd1ba123a85220daf1daea7996a71cd251dca
Author: David Terei <davidterei at gmail.com>
Date: Fri Nov 18 14:11:59 2011 -0800
Update for recent mutable locale changes
>---------------------------------------------------------------
System/Process/Internals.hs | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/System/Process/Internals.hs b/System/Process/Internals.hs
index c805ad0..2286d31 100644
--- a/System/Process/Internals.hs
+++ b/System/Process/Internals.hs
@@ -417,12 +417,17 @@ pfdToHandle pfd mode = do
False {-is_socket-}
False {-non-blocking-}
fD <- FD.setNonBlockingMode fD True -- see #3316
- mkHandleFromFD fD fd_type filepath mode False{-is_socket-}
- (Just localeEncoding)
+ enc <- getLocaleEncoding
+ mkHandleFromFD fD fd_type filepath mode False {-is_socket-} (Just enc)
#else
fdToHandle' fd (Just Stream)
- False{-Windows: not a socket, Unix: don't set non-blocking-}
- filepath mode True{-binary-}
+ False {-Windows: not a socket, Unix: don't set non-blocking-}
+ filepath mode True {-binary-}
+#endif
+
+#if __GLASGOW_HASKELL__ < 703
+getLocaleEncoding :: IO TextEncoding
+getLocaleEncoding = return localEncoding
#endif
#ifndef __HUGS__
More information about the Cvs-libraries
mailing list