diff options
-rw-r--r-- | Annex/Multicast.hs | 11 | ||||
-rw-r--r-- | doc/thanks/list | 2 | ||||
-rw-r--r-- | git-annex.cabal | 4 |
3 files changed, 15 insertions, 2 deletions
diff --git a/Annex/Multicast.hs b/Annex/Multicast.hs index 16aa1bd33..67d8ad7ad 100644 --- a/Annex/Multicast.hs +++ b/Annex/Multicast.hs @@ -5,6 +5,8 @@ - Licensed under the GNU GPL version 3 or higher. -} +{-# LANGUAGE CPP #-} + module Annex.Multicast where import Config.Files @@ -14,6 +16,9 @@ import Utility.PartialPrelude import System.Process import System.IO import GHC.IO.Handle.FD +#if ! MIN_VERSION_process(1,4,2) +import System.Posix.IO (handleToFd) +#endif multicastReceiveEnv :: String multicastReceiveEnv = "GIT_ANNEX_MULTICAST_RECEIVE" @@ -21,8 +26,14 @@ multicastReceiveEnv = "GIT_ANNEX_MULTICAST_RECEIVE" multicastCallbackEnv :: IO (FilePath, [(String, String)], Handle) multicastCallbackEnv = do gitannex <- readProgramFile +#if MIN_VERSION_process(1,4,2) + -- This will even work on Windows (rfd, wfd) <- createPipeFd rh <- fdToHandle rfd +#else + (rh, wh) <- createPipe + wfd <- handleToFd wh +#endif environ <- addEntry multicastReceiveEnv (show wfd) <$> getEnvironment return (gitannex, environ, rh) diff --git a/doc/thanks/list b/doc/thanks/list index 9151ccff1..f38bfa2a2 100644 --- a/doc/thanks/list +++ b/doc/thanks/list @@ -65,3 +65,5 @@ Chris Lamb, Anton Grensjö, Stan Yamane, John Peloquin, +Thomas Schwinge, +Lars Wallenborn, diff --git a/git-annex.cabal b/git-annex.cabal index 81ac944fb..d5db26290 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -319,7 +319,7 @@ Executable git-annex stm (>= 2.3), mtl (>= 2), uuid (>= 1.2.6), - process (>= 1.4.2.0), + process, data-default, case-insensitive, random, @@ -384,7 +384,7 @@ Executable git-annex if (os(windows)) Build-Depends: Win32, Win32-extras, unix-compat (>= 0.4.1.3), setenv, - process (>= 1.3.0.0) + process (>= 1.4.2.0) else Build-Depends: unix if impl(ghc <= 7.6.3) |