fix build warnings on windows

This commit is contained in:
Joey Hess 2023-03-21 18:22:41 -04:00
parent e11776ae80
commit e822df2a09
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
13 changed files with 28 additions and 15 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 $

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -21,7 +21,6 @@ import Control.Concurrent
import Utility.Path.Windows
import Utility.FileSystemEncoding
import Utility.Split
type LockFile = RawFilePath

View file

@ -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