diff options
author | Joey Hess <joeyh@joeyh.name> | 2014-12-29 17:25:59 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2014-12-29 17:30:20 -0400 |
commit | e79780c0cac64c7b74754e47fc066aa0fc104345 (patch) | |
tree | 1baa2628f02698a883f8d0bfc8d362307cfa1d11 /Utility | |
parent | daa420a9f299c331b24488d133d068ddc451b9aa (diff) |
fixed all remaining build warnings on Windows
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/Daemon.hs | 2 | ||||
-rw-r--r-- | Utility/DirWatcher/Win32Notify.hs | 4 | ||||
-rw-r--r-- | Utility/InodeCache.hs | 6 | ||||
-rw-r--r-- | Utility/UserInfo.hs | 4 |
4 files changed, 10 insertions, 6 deletions
diff --git a/Utility/Daemon.hs b/Utility/Daemon.hs index 0615149e5..d1f539e98 100644 --- a/Utility/Daemon.hs +++ b/Utility/Daemon.hs @@ -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 diff --git a/Utility/DirWatcher/Win32Notify.hs b/Utility/DirWatcher/Win32Notify.hs index ef4f385c5..54f34935a 100644 --- a/Utility/DirWatcher/Win32Notify.hs +++ b/Utility/DirWatcher/Win32Notify.hs @@ -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 _ _) diff --git a/Utility/InodeCache.hs b/Utility/InodeCache.hs index 328b77595..8a182449b 100644 --- a/Utility/InodeCache.hs +++ b/Utility/InodeCache.hs @@ -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. diff --git a/Utility/UserInfo.hs b/Utility/UserInfo.hs index 1a557c9a5..c82f04079 100644 --- a/Utility/UserInfo.hs +++ b/Utility/UserInfo.hs @@ -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 |