summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-08-04 13:54:09 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-08-04 14:05:36 -0400
commit8d2f003c63e0c1db0758e06f02b999365f8413a9 (patch)
tree1d8dbda0065630a5b1f153249ea12ce17e4e68e0 /Annex
parent6db0c4414a0afee7118a9193800b627c40968fa1 (diff)
avoid more build warnings on Windows
Diffstat (limited to 'Annex')
-rw-r--r--Annex/Content.hs2
-rw-r--r--Annex/Environment.hs5
-rw-r--r--Annex/Journal.hs3
3 files changed, 7 insertions, 3 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index 0b3e18fab..01ad6f96f 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -120,7 +120,7 @@ inAnnexSafe = inAnnex' (fromMaybe False) (Just False) go
- it. (If the content is not present, no locking is done.) -}
lockContent :: Key -> Annex a -> Annex a
#ifndef mingw32_HOST_OS
-lockContent key a =
+lockContent key a = do
file <- calcRepo $ gitAnnexLocation key
bracketIO (openforlock file >>= lock) unlock (const a)
where
diff --git a/Annex/Environment.hs b/Annex/Environment.hs
index ce9c33ad6..ae5a5646f 100644
--- a/Annex/Environment.hs
+++ b/Annex/Environment.hs
@@ -10,12 +10,15 @@
module Annex.Environment where
import Common.Annex
-import Utility.Env
import Utility.UserInfo
import qualified Git.Config
import Config
import Annex.Exception
+#ifndef mingw32_HOST_OS
+import Utility.Env
+#endif
+
{- Checks that the system's environment allows git to function.
- Git requires a GECOS username, or suitable git configuration, or
- environment variables.
diff --git a/Annex/Journal.hs b/Annex/Journal.hs
index 506cbfcaf..fff20ccc4 100644
--- a/Annex/Journal.hs
+++ b/Annex/Journal.hs
@@ -86,12 +86,13 @@ lockJournal a = do
mode <- annexFileMode
bracketIO (lock lockfile mode) unlock (const a)
where
- lock lockfile mode = do
#ifndef mingw32_HOST_OS
+ lock lockfile mode = do
l <- noUmask mode $ createFile lockfile mode
waitToSetLock l (WriteLock, AbsoluteSeek, 0, 0)
return l
#else
+ lock lockfile _mode = do
writeFile lockfile ""
return lockfile
#endif