diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-11-14 14:14:10 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-11-14 14:14:10 -0400 |
commit | bb5178557d8563608be7e9e04a4916fd2048d176 (patch) | |
tree | 0013232fca756f278dd44fefc45a18a1a9d35289 /Utility | |
parent | b9d5a5fd5e9631840857878935c3727217f12b9a (diff) |
clean up build warnings on Windows
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/Shell.hs | 3 | ||||
-rw-r--r-- | Utility/Su.hs | 2 | ||||
-rw-r--r-- | Utility/UserInfo.hs | 9 | ||||
-rw-r--r-- | Utility/WebApp.hs | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/Utility/Shell.hs b/Utility/Shell.hs index b8a9491dc..c64ca75b9 100644 --- a/Utility/Shell.hs +++ b/Utility/Shell.hs @@ -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 diff --git a/Utility/Su.hs b/Utility/Su.hs index f1afd5414..84ea4c5da 100644 --- a/Utility/Su.hs +++ b/Utility/Su.hs @@ -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 diff --git a/Utility/UserInfo.hs b/Utility/UserInfo.hs index dd66c331e..d504fa5c3 100644 --- a/Utility/UserInfo.hs +++ b/Utility/UserInfo.hs @@ -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 diff --git a/Utility/WebApp.hs b/Utility/WebApp.hs index a00a5caf2..6fc154329 100644 --- a/Utility/WebApp.hs +++ b/Utility/WebApp.hs @@ -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 |