fixed all remaining build warnings on Windows

This commit is contained in:
Joey Hess 2014-12-29 17:25:59 -04:00
parent 67828b1c86
commit c9a3e80d32
13 changed files with 23 additions and 20 deletions

View file

@ -21,8 +21,6 @@ import Utility.LockFile
#ifndef mingw32_HOST_OS
import System.Posix
import Control.Concurrent.Async
#else
import System.Exit
#endif
#ifndef mingw32_HOST_OS

View file

@ -17,10 +17,10 @@ watchDir :: FilePath -> (FilePath -> Bool) -> Bool -> WatchHooks -> IO WatchMana
watchDir dir ignored scanevents hooks = do
scan dir
wm <- initWatchManager
void $ watchDirectory wm dir True [Create, Delete, Modify, Move] handle
void $ watchDirectory wm dir True [Create, Delete, Modify, Move] dispatch
return wm
where
handle evt
dispatch evt
| ignoredPath ignored (filePath evt) = noop
| otherwise = case evt of
(Deleted _ _)

View file

@ -7,6 +7,7 @@
-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Utility.InodeCache (
InodeCache,
@ -182,7 +183,10 @@ checkSentinalFile s = do
SentinalStatus (not unchanged) tsdelta
where
#ifdef mingw32_HOST_OS
unchanged = oldinode == newinode && oldsize == newsize
-- Since mtime can appear to change when the time zone is
-- changed in windows, we cannot look at the mtime for the
-- sentinal file.
unchanged = oldinode == newinode && oldsize == newsize && (newmtime == newmtime)
tsdelta = TSDelta $ do
-- Run when generating an InodeCache,
-- to get the current delta.

View file

@ -13,8 +13,10 @@ module Utility.UserInfo (
myUserGecos,
) where
import Control.Applicative
import System.PosixCompat
#ifndef mingw32_HOST_OS
import Control.Applicative
#endif
import Utility.Env