fix build warnings on windows
This commit is contained in:
parent
e11776ae80
commit
e822df2a09
13 changed files with 28 additions and 15 deletions
|
@ -27,8 +27,8 @@ import Annex.CheckIgnore
|
|||
import Annex.TransferrerPool
|
||||
import qualified Database.Keys
|
||||
|
||||
import Control.Concurrent.STM
|
||||
#ifndef mingw32_HOST_OS
|
||||
import Control.Concurrent.STM
|
||||
import System.Posix.Signals
|
||||
#endif
|
||||
|
||||
|
|
|
@ -51,10 +51,10 @@ import Annex.InodeSentinal
|
|||
import Upgrade
|
||||
import Annex.Tmp
|
||||
import Utility.UserInfo
|
||||
import qualified Utility.RawFilePath as R
|
||||
import Utility.ThreadScheduler
|
||||
import Annex.Perms
|
||||
#ifndef mingw32_HOST_OS
|
||||
import Utility.ThreadScheduler
|
||||
import qualified Utility.RawFilePath as R
|
||||
import Utility.FileMode
|
||||
import System.Posix.User
|
||||
import qualified Utility.LockFile.Posix as Posix
|
||||
|
@ -62,8 +62,8 @@ import qualified Utility.LockFile.Posix as Posix
|
|||
|
||||
import qualified Data.Map as M
|
||||
import Control.Monad.IO.Class (MonadIO)
|
||||
import System.PosixCompat.Files (ownerReadMode, isNamedPipe)
|
||||
#ifndef mingw32_HOST_OS
|
||||
import System.PosixCompat.Files (ownerReadMode, isNamedPipe)
|
||||
import Data.Either
|
||||
import qualified System.FilePath.ByteString as P
|
||||
import Control.Concurrent.Async
|
||||
|
|
|
@ -43,7 +43,9 @@ import qualified Data.ByteString as S
|
|||
import qualified Data.ByteString.Char8 as S8
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
import qualified System.FilePath.ByteString as P
|
||||
#ifndef mingw32_HOST_OS
|
||||
import System.PosixCompat.Files (isSymbolicLink)
|
||||
#endif
|
||||
|
||||
type LinkTarget = S.ByteString
|
||||
|
||||
|
|
|
@ -16,11 +16,13 @@ import qualified Remote
|
|||
import qualified Types.Backend
|
||||
import qualified Backend
|
||||
import Annex.Content
|
||||
#ifndef mingw32_HOST_OS
|
||||
import Annex.Version
|
||||
import Annex.Content.Presence
|
||||
#endif
|
||||
import Annex.Content.Presence.LowLevel
|
||||
import Annex.Perms
|
||||
import Annex.Link
|
||||
import Annex.Version
|
||||
import Logs.Location
|
||||
import Logs.Trust
|
||||
import Logs.Activity
|
||||
|
|
|
@ -12,7 +12,9 @@ module Command.RemoteDaemon where
|
|||
import Command
|
||||
import RemoteDaemon.Core
|
||||
import Utility.Daemon
|
||||
#ifndef mingw32_HOST_OS
|
||||
import Annex.Path
|
||||
#endif
|
||||
|
||||
cmd :: Command
|
||||
cmd = noCommit $
|
||||
|
|
|
@ -14,9 +14,11 @@ import Git
|
|||
import Utility.Tmp
|
||||
import Utility.Shell
|
||||
import Utility.FileMode
|
||||
#ifndef mingw32_HOST_OS
|
||||
import qualified Utility.RawFilePath as R
|
||||
|
||||
import System.PosixCompat.Files (fileMode)
|
||||
#endif
|
||||
|
||||
|
||||
data Hook = Hook
|
||||
{ hookName :: FilePath
|
||||
|
|
|
@ -19,7 +19,10 @@ import qualified Data.ByteString.Lazy as L
|
|||
import qualified Data.Map as M
|
||||
import qualified System.FilePath.ByteString as P
|
||||
import Data.Default
|
||||
import System.PosixCompat.Files (isRegularFile, getFdStatus, deviceID)
|
||||
import System.PosixCompat.Files (isRegularFile, deviceID)
|
||||
#ifndef mingw32_HOST_OS
|
||||
import System.PosixCompat.Files (getFdStatus)
|
||||
#endif
|
||||
|
||||
import Annex.Common
|
||||
import Types.Remote
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
module Utility.DirWatcher.Win32Notify (watchDir) where
|
||||
|
||||
import Common hiding (isDirectory)
|
||||
import Common
|
||||
import Utility.DirWatcher.Types
|
||||
import qualified Utility.RawFilePath as R
|
||||
|
||||
|
|
|
@ -17,6 +17,9 @@ import System.IO
|
|||
import Control.Monad
|
||||
import System.PosixCompat.Types
|
||||
import System.PosixCompat.Files (unionFileModes, intersectFileModes, stdFileMode, nullFileMode, setFileCreationMask, groupReadMode, ownerReadMode, ownerWriteMode, ownerExecuteMode, groupWriteMode, groupExecuteMode, otherReadMode, otherWriteMode, otherExecuteMode, fileMode)
|
||||
#ifndef mingw32_HOST_OS
|
||||
import System.PosixCompat.Files (setFileCreationMask)
|
||||
#endif
|
||||
import Control.Monad.IO.Class
|
||||
import Foreign (complement)
|
||||
import Control.Monad.Catch
|
||||
|
|
|
@ -14,13 +14,15 @@ module Utility.FileSize (
|
|||
getFileSize',
|
||||
) where
|
||||
|
||||
import System.PosixCompat.Files (FileStatus, fileSize)
|
||||
import qualified Utility.RawFilePath as R
|
||||
#ifdef mingw32_HOST_OS
|
||||
import Control.Exception (bracket)
|
||||
import System.IO
|
||||
import Utility.FileSystemEncoding
|
||||
#else
|
||||
import System.PosixCompat.Files (fileSize)
|
||||
#endif
|
||||
import System.PosixCompat.Files (FileStatus)
|
||||
import qualified Utility.RawFilePath as R
|
||||
|
||||
type FileSize = Integer
|
||||
|
||||
|
|
|
@ -54,9 +54,7 @@ import System.PosixCompat.Types
|
|||
import System.PosixCompat.Files (isRegularFile, fileID)
|
||||
import Data.Time.Clock.POSIX
|
||||
|
||||
#ifdef mingw32_HOST_OS
|
||||
import Data.Word (Word64)
|
||||
#else
|
||||
#ifndef mingw32_HOST_OS
|
||||
import qualified System.Posix.Files as Posix
|
||||
#endif
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@ import Control.Concurrent
|
|||
|
||||
import Utility.Path.Windows
|
||||
import Utility.FileSystemEncoding
|
||||
import Utility.Split
|
||||
|
||||
type LockFile = RawFilePath
|
||||
|
||||
|
|
|
@ -14,11 +14,11 @@ module Utility.MoveFile (
|
|||
) where
|
||||
|
||||
import Control.Monad
|
||||
import System.PosixCompat.Files (isDirectory)
|
||||
import System.IO.Error
|
||||
import Prelude
|
||||
|
||||
#ifndef mingw32_HOST_OS
|
||||
import System.PosixCompat.Files (isDirectory)
|
||||
import Control.Monad.IfElse
|
||||
import Utility.SafeCommand
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue