aboutsummaryrefslogtreecommitdiff
path: root/Utility/LogFile.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-02-11 13:18:59 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-02-11 13:18:59 -0400
commitf779747a0d4d5c9e39a3c82498fe1809d56b4d25 (patch)
treecdcd646c01afed8e65f7ea5fd48fe92f0dd295bf /Utility/LogFile.hs
parentcbb6c57513753ca9e787bfeff1145c5c9d62aedd (diff)
remove unimplemented windows stubs
Diffstat (limited to 'Utility/LogFile.hs')
-rw-r--r--Utility/LogFile.hs12
1 files changed, 2 insertions, 10 deletions
diff --git a/Utility/LogFile.hs b/Utility/LogFile.hs
index 1c29b9ff4..4e76116ba 100644
--- a/Utility/LogFile.hs
+++ b/Utility/LogFile.hs
@@ -13,14 +13,12 @@ import Common
import System.Posix.Types
-openLog :: FilePath -> IO Fd
#ifndef mingw32_HOST_OS
+openLog :: FilePath -> IO Fd
openLog logfile = do
rotateLog logfile
openFd logfile WriteOnly (Just stdFileMode)
defaultFileFlags { append = True }
-#else
-openLog = error "openLog TODO"
#endif
rotateLog :: FilePath -> IO ()
@@ -49,20 +47,14 @@ listLogs logfile = filterM doesFileExist $ reverse $
maxLogs :: Int
maxLogs = 9
-redirLog :: Fd -> IO ()
#ifndef mingw32_HOST_OS
+redirLog :: Fd -> IO ()
redirLog logfd = do
mapM_ (redir logfd) [stdOutput, stdError]
closeFd logfd
-#else
-redirLog _ = error "redirLog TODO"
-#endif
redir :: Fd -> Fd -> IO ()
-#ifndef mingw32_HOST_OS
redir newh h = do
closeFd h
void $ dupTo newh h
-#else
-redir _ _ = error "redir TODO"
#endif