[commit: packages/process] master: Make compatible with GHC 7.2/7.4/7.6 again (ad1a5c8)
git at git.haskell.org
git at git.haskell.org
Fri Sep 27 10:21:23 CEST 2013
Repository : ssh://git@git.haskell.org/process
On branch : master
Link : http://git.haskell.org/packages/process.git/commitdiff/ad1a5c887e0dce1589266e107814b1fbe4612259
>---------------------------------------------------------------
commit ad1a5c887e0dce1589266e107814b1fbe4612259
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date: Fri Sep 27 09:47:54 2013 +0200
Make compatible with GHC 7.2/7.4/7.6 again
Supporting GHC 7.2 again was just a single `#ifdef`. Otoh, supporting
GHC 7.0 would require reverting part of d10b168a65701.
This also updates the build-dependancy version constraints to reflect
the current reality. The code is `-Wall` clean for GHC 7.4 and later.
Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>
>---------------------------------------------------------------
ad1a5c887e0dce1589266e107814b1fbe4612259
System/Process/Internals.hs | 11 +++++++++--
process.cabal | 11 ++++++-----
2 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/System/Process/Internals.hs b/System/Process/Internals.hs
index 266b81c..8771bde 100644
--- a/System/Process/Internals.hs
+++ b/System/Process/Internals.hs
@@ -52,11 +52,14 @@ import System.IO
#endif
#endif
-import System.IO.Unsafe
import Control.Concurrent
import Control.Exception
+import Data.Bits
import Foreign.C
-import Foreign
+import Foreign.Marshal
+import Foreign.Ptr
+import Foreign.Storable
+import System.IO.Unsafe
# ifdef __GLASGOW_HASKELL__
@@ -411,7 +414,11 @@ pfdToHandle pfd mode = do
False {-is_socket-}
False {-non-blocking-}
fD' <- FD.setNonBlockingMode fD True -- see #3316
+#if __GLASGOW_HASKELL__ >= 704
enc <- getLocaleEncoding
+#else
+ let enc = localeEncoding
+#endif
mkHandleFromFD fD' fd_type filepath mode False {-is_socket-} (Just enc)
#ifndef __HUGS__
diff --git a/process.cabal b/process.cabal
index ef9cf3b..2eff7d4 100644
--- a/process.cabal
+++ b/process.cabal
@@ -48,10 +48,11 @@ library
build-depends: Win32 >=2.2.0.0
extra-libraries: kernel32
else
- build-depends: unix
+ build-depends: unix >= 2.5 && < 2.8
- build-depends: base >= 4.5 && < 5,
- directory >= 1.0 && < 1.3,
- filepath >= 1.1 && < 1.4,
- deepseq >= 1.1 && < 1.4
+ ghc-options: -Wall
+ build-depends: base >= 4.4 && < 5,
+ directory >= 1.1 && < 1.3,
+ filepath >= 1.2 && < 1.4,
+ deepseq >= 1.1 && < 1.4
\ No newline at end of file
More information about the ghc-commits
mailing list