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