fix windows build

This commit is contained in:
Joey Hess 2014-02-11 15:04:07 -04:00
parent 2ed728e7e6
commit 30a474b309
Failed to extract signature

View file

@ -194,8 +194,13 @@ dailyCheck urlrenderer = do
hourlyCheck :: Assistant ()
hourlyCheck = do
#ifndef mingw32_HOST_OS
checkLogSize 0
#else
noop
#endif
#ifndef mingw32_HOST_OS
{- Rotate logs until log file size is < 1 mb. -}
checkLogSize :: Int -> Assistant ()
checkLogSize n = do
@ -209,6 +214,7 @@ checkLogSize n = do
checkLogSize $ n + 1
where
filesize f = fromIntegral . fileSize <$> liftIO (getFileStatus f)
#endif
oneMegabyte :: Int
oneMegabyte = 1000000