summaryrefslogtreecommitdiff
path: root/Utility
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-08-04 13:54:09 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-08-04 14:05:36 -0400
commit8d2f003c63e0c1db0758e06f02b999365f8413a9 (patch)
tree1d8dbda0065630a5b1f153249ea12ce17e4e68e0 /Utility
parent6db0c4414a0afee7118a9193800b627c40968fa1 (diff)
avoid more build warnings on Windows
Diffstat (limited to 'Utility')
-rw-r--r--Utility/Daemon.hs3
-rw-r--r--Utility/Gpg.hs12
-rw-r--r--Utility/LogFile.hs2
-rw-r--r--Utility/Misc.hs3
-rw-r--r--Utility/Process.hs2
5 files changed, 12 insertions, 10 deletions
diff --git a/Utility/Daemon.hs b/Utility/Daemon.hs
index 124005795..2f942769a 100644
--- a/Utility/Daemon.hs
+++ b/Utility/Daemon.hs
@@ -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.
diff --git a/Utility/Gpg.hs b/Utility/Gpg.hs
index b06ea2fd1..81180148e 100644
--- a/Utility/Gpg.hs
+++ b/Utility/Gpg.hs
@@ -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
diff --git a/Utility/LogFile.hs b/Utility/LogFile.hs
index 25f2e10fe..090ac60d0 100644
--- a/Utility/LogFile.hs
+++ b/Utility/LogFile.hs
@@ -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
diff --git a/Utility/Misc.hs b/Utility/Misc.hs
index 39d0e3de0..804a9e487 100644
--- a/Utility/Misc.hs
+++ b/Utility/Misc.hs
@@ -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. -}
diff --git a/Utility/Process.hs b/Utility/Process.hs
index 590124289..8ea632120 100644
--- a/Utility/Process.hs
+++ b/Utility/Process.hs
@@ -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