clean up build warnings on Windows
This commit is contained in:
parent
8dd84b87f9
commit
07c4be500d
5 changed files with 10 additions and 8 deletions
|
@ -15,7 +15,9 @@ import P2P.Address
|
|||
import P2P.Annex
|
||||
import Utility.Tor
|
||||
import Annex.UUID
|
||||
#ifndef mingw32_HOST_OS
|
||||
import Config.Files
|
||||
#endif
|
||||
import P2P.IO
|
||||
import qualified P2P.Protocol as P2P
|
||||
import Utility.ThreadScheduler
|
||||
|
|
|
@ -12,14 +12,11 @@ module Utility.Shell where
|
|||
import Utility.SafeCommand
|
||||
#ifdef mingw32_HOST_OS
|
||||
import Utility.Path
|
||||
import Utility.FileSystemEncoding
|
||||
import Utility.Exception
|
||||
import Utility.PartialPrelude
|
||||
import Utility.Applicative
|
||||
#endif
|
||||
|
||||
#ifdef mingw32_HOST_OS
|
||||
import System.IO
|
||||
import System.FilePath
|
||||
#endif
|
||||
|
||||
|
|
|
@ -10,9 +10,9 @@
|
|||
module Utility.Su where
|
||||
|
||||
import Common
|
||||
import Utility.Env
|
||||
|
||||
#ifndef mingw32_HOST_OS
|
||||
import Utility.Env
|
||||
import System.Posix.Terminal
|
||||
#endif
|
||||
|
||||
|
|
|
@ -15,11 +15,13 @@ module Utility.UserInfo (
|
|||
) where
|
||||
|
||||
import Utility.Env
|
||||
import Utility.Data
|
||||
import Utility.Exception
|
||||
#ifndef mingw32_HOST_OS
|
||||
import Utility.Data
|
||||
import Control.Applicative
|
||||
#endif
|
||||
|
||||
import System.PosixCompat
|
||||
import Control.Applicative
|
||||
import Prelude
|
||||
|
||||
{- Current user's home directory.
|
||||
|
@ -58,6 +60,7 @@ myVal envvars extract = go envvars
|
|||
#ifndef mingw32_HOST_OS
|
||||
go [] = Right . extract <$> (getUserEntryForID =<< getEffectiveUserID)
|
||||
#else
|
||||
go [] = return $ Left ("environment not set: " ++ show envvars)
|
||||
go [] = return $ either Left (Right . extract) $
|
||||
Left ("environment not set: " ++ show envvars)
|
||||
#endif
|
||||
go (v:vs) = maybe (go vs) (return . Right) =<< getEnv v
|
||||
|
|
|
@ -105,7 +105,7 @@ getSocket h = do
|
|||
addr <- inet_addr "127.0.0.1"
|
||||
sock <- socket AF_INET Stream defaultProtocol
|
||||
preparesocket sock
|
||||
bindSocket sock (SockAddrInet aNY_PORT addr)
|
||||
bind sock (SockAddrInet aNY_PORT addr)
|
||||
use sock
|
||||
where
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue