avoid more build warnings on Windows

This commit is contained in:
Joey Hess 2013-08-04 13:54:09 -04:00
parent fc96861084
commit a3224ce35b
12 changed files with 29 additions and 20 deletions

View file

@ -10,13 +10,14 @@
module Utility.Daemon where
import Common
#ifndef mingw32_HOST_OS
import Utility.LogFile
#endif
#ifndef mingw32_HOST_OS
import System.Posix
#else
import System.PosixCompat
import System.Posix.Types
#endif
{- Run an action as a daemon, with all output sent to a file descriptor.

View file

@ -9,16 +9,18 @@
module Utility.Gpg where
import System.Posix.Types
import Control.Applicative
import Control.Concurrent
import Control.Exception (bracket)
import System.Path
import Common
import Utility.Env
import qualified Build.SysConfig as SysConfig
#ifdef mingw32_HOST_OS
#ifndef mingw32_HOST_OS
import System.Posix.Types
import Control.Exception (bracket)
import System.Path
import Utility.Env
#else
import Utility.Tmp
#endif

View file

@ -58,8 +58,8 @@ redirLog logfd = do
redirLog _ = error "redirLog TODO"
#endif
#ifndef mingw32_HOST_OS
redir :: Fd -> Fd -> IO ()
#ifndef mingw32_HOST_OS
redir newh h = do
closeFd h
void $ dupTo newh h

View file

@ -17,9 +17,8 @@ import Data.List
import Control.Applicative
#ifndef mingw32_HOST_OS
import System.Posix.Process (getAnyProcessStatus)
#endif
import Utility.Exception
#endif
{- A version of hgetContents that is not lazy. Ensures file is
- all read before it gets closed. -}

View file

@ -42,9 +42,9 @@ import System.Log.Logger
import Control.Concurrent
import qualified Control.Exception as E
import Control.Monad
import Data.Maybe
#ifndef mingw32_HOST_OS
import System.Posix.IO
import Data.Maybe
#endif
import Utility.Misc