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 <[email protected]>
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__



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to