summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
Diffstat (limited to 'Remote')
-rw-r--r--Remote/Directory.hs2
-rw-r--r--Remote/Git.hs6
-rw-r--r--Remote/Rsync.hs4
3 files changed, 6 insertions, 6 deletions
diff --git a/Remote/Directory.hs b/Remote/Directory.hs
index 6a687952a..adf2c09dc 100644
--- a/Remote/Directory.hs
+++ b/Remote/Directory.hs
@@ -219,7 +219,7 @@ retrieveEncrypted d chunksize (cipher, enck) k f p = metered (Just p) k $ \meter
retrieveCheap :: FilePath -> ChunkSize -> Key -> FilePath -> Annex Bool
retrieveCheap _ (Just _) _ _ = return False -- no cheap retrieval for chunks
-#ifndef __WINDOWS__
+#ifndef mingw32_HOST_OS
retrieveCheap d _ k f = liftIO $ withStoredFiles Nothing d k go
where
go [file] = catchBoolIO $ createSymbolicLink file f >> return True
diff --git a/Remote/Git.hs b/Remote/Git.hs
index a857d5c14..c9cebfb14 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -267,7 +267,7 @@ keyUrls :: Git.Repo -> Key -> [String]
keyUrls r key = map tourl locs
where
tourl l = Git.repoLocation r ++ "/" ++ l
-#ifndef __WINDOWS__
+#ifndef mingw32_HOST_OS
locs = annexLocations key
#else
locs = map (replace "\\" "/") (annexLocations key)
@@ -361,7 +361,7 @@ copyFromRemote' r key file dest
copyFromRemoteCheap :: Remote -> Key -> FilePath -> Annex Bool
copyFromRemoteCheap r key file
-#ifndef __WINDOWS__
+#ifndef mingw32_HOST_OS
| not $ Git.repoIsUrl (repo r) = guardUsable (repo r) False $ do
loc <- liftIO $ gitAnnexLocation key (repo r) $
fromJust $ remoteGitConfig $ gitconfig r
@@ -418,7 +418,7 @@ rsyncHelper callback params = do
- filesystem. Then cp could be faster. -}
rsyncOrCopyFile :: [CommandParam] -> FilePath -> FilePath -> MeterUpdate -> Annex Bool
rsyncOrCopyFile rsyncparams src dest p =
-#ifdef __WINDOWS__
+#ifdef mingw32_HOST_OS
dorsync
where
#else
diff --git a/Remote/Rsync.hs b/Remote/Rsync.hs
index 228a66d51..a8efd84e7 100644
--- a/Remote/Rsync.hs
+++ b/Remote/Rsync.hs
@@ -11,7 +11,7 @@ module Remote.Rsync (remote) where
import qualified Data.ByteString.Lazy as L
import qualified Data.Map as M
-#ifndef __WINDOWS__
+#ifndef mingw32_HOST_OS
import System.Posix.Process (getProcessID)
#else
import System.Random (getStdRandom, random)
@@ -221,7 +221,7 @@ sendParams = ifM crippledFileSystem
- up trees for rsync. -}
withRsyncScratchDir :: (FilePath -> Annex Bool) -> Annex Bool
withRsyncScratchDir a = do
-#ifndef __WINDOWS__
+#ifndef mingw32_HOST_OS
v <- liftIO getProcessID
#else
v <- liftIO (getStdRandom random :: IO Int)