on master help sign in
using System.Posix.Types.Fd on Windows.
commitaa9571cafb40ed58c1a74a0fc9cdfb1fb79c3946 authorKazu Yamamoto <kazu@iij.ad.jp> dateThu 3 Mar 2016, 16:36 (11 years ago) parenta010ec9
2 files changed+2−11
warp/Network/Wai/Handler/Warp/FdCache.hs+2−4 warp/Network/Wai/Handler/Warp/Types.hs−7
warp/Network/Wai/Handler/Warp/FdCache.hs+2−4
@@ -12,9 +12,7 @@ module Network.Wai.Handler.Warp.FdCache (
1212#endif
1313 ) where
1414
15−#ifdef WINDOWS
16−type Fd = ()
17−#else
15+#ifndef WINDOWS
1816#if __GLASGOW_HASKELL__ < 709
1917import Control.Applicative ((<$>), (<*>))
2018#endif
@@ -23,8 +21,8 @@ import Network.Wai.Handler.Warp.IORef
2321import Network.Wai.Handler.Warp.MultiMap
2422import Control.Reaper
2523import System.Posix.IO (openFd, OpenFileFlags(..), defaultFileFlags, OpenMode(ReadOnly), closeFd)
26−import System.Posix.Types (Fd)
2724#endif
25+import System.Posix.Types (Fd)
2826
2927----------------------------------------------------------------
3028
warp/Network/Wai/Handler/Warp/Types.hs−7
@@ -15,10 +15,7 @@ import qualified Network.Wai.Handler.Warp.Date as D
1515import qualified Network.Wai.Handler.Warp.FdCache as F
1616import qualified Network.Wai.Handler.Warp.FileInfoCache as I
1717import qualified Network.Wai.Handler.Warp.Timeout as T
18−
19−#ifndef WINDOWS
2018import System.Posix.Types (Fd)
21−#endif
2219
2320----------------------------------------------------------------
2421
@@ -55,10 +52,6 @@ instance Exception InvalidRequest
5552
5653----------------------------------------------------------------
5754
58−#ifdef WINDOWS
59−type Fd = ()
60−#endif
61−
6255-- | Data type to abstract file identifiers.
6356-- On Unix, a file descriptor would be specified to make use of
6457-- the file descriptor cache.