diff options
author | Joey Hess <joey@kitenet.net> | 2012-11-11 18:05:01 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-11-11 18:05:01 -0400 |
commit | 3a6456a7b786e1cb41605a1ad46004e4de6d27b7 (patch) | |
tree | 4bebe117c5ae5f97698b5abbdda24b191afa28e3 | |
parent | ba1615a18964ddd97006b1f0eb4e90842d0b3568 (diff) |
use cabal macro to detect if old version of network is being used
-rw-r--r-- | Utility/Url.hs | 5 | ||||
-rw-r--r-- | doc/bugs/network___62____61___2.4.0.1_is_not_in_Haskell_Platform_2012.4.0.0.mdwn | 3 | ||||
-rw-r--r-- | git-annex.cabal | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/Utility/Url.hs b/Utility/Url.hs index 4e152159a..e47cb9dee 100644 --- a/Utility/Url.hs +++ b/Utility/Url.hs @@ -119,6 +119,11 @@ request url headers requesttype = go 5 url Nothing -> return rsp Just newURI -> go n newURI_abs where +#if defined VERSION_network +#if ! MIN_VERSION_network(2,4,0) +#define WITH_OLD_URI +#endif +#endif #ifdef WITH_OLD_URI newURI_abs = fromMaybe newURI (newURI `relativeTo` u) #else diff --git a/doc/bugs/network___62____61___2.4.0.1_is_not_in_Haskell_Platform_2012.4.0.0.mdwn b/doc/bugs/network___62____61___2.4.0.1_is_not_in_Haskell_Platform_2012.4.0.0.mdwn index 98a893236..1b90f593f 100644 --- a/doc/bugs/network___62____61___2.4.0.1_is_not_in_Haskell_Platform_2012.4.0.0.mdwn +++ b/doc/bugs/network___62____61___2.4.0.1_is_not_in_Haskell_Platform_2012.4.0.0.mdwn @@ -7,3 +7,6 @@ Do you think it's possible to support *both* versions of the network library, ma That would increase the portability of git-annex quite a bit. Thank you for your consideration. + +> Ok, I think I've figured out how to use the CPP macros defined by cabal +> to deal with this. [[done]], will be in next release. --[[Joey]] diff --git a/git-annex.cabal b/git-annex.cabal index d2ecc55ce..d22be21d0 100644 --- a/git-annex.cabal +++ b/git-annex.cabal @@ -52,7 +52,7 @@ Flag DNS Executable git-annex Main-Is: git-annex.hs Build-Depends: MissingH, hslogger, directory, filepath, - unix, containers, utf8-string, network (>= 2.4.0.1), mtl, + unix, containers, utf8-string, network (>= 2.0), mtl, bytestring, old-locale, time, pcre-light, extensible-exceptions, dataenc, SHA, process, json, HTTP, base (>= 4.5 && < 4.7), monad-control, transformers-base, lifted-base, |