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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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