packages feed

sendfile 0.7.3 → 0.7.4

raw patch · 3 files changed

+4/−3 lines, 3 filesdep ~base

Dependency ranges changed: base

Files

sendfile.cabal view
@@ -1,5 +1,5 @@ name:          sendfile-version:       0.7.3+version:       0.7.4 stability:     provisional synopsis:      A portable sendfile library description:   A library which exposes zero-copy sendfile functionality in a portable way. If a platform does not support sendfile, a fallback implementation in haskell is provided.
src/Network/Socket/SendFile/Darwin.hsc view
@@ -10,6 +10,7 @@ import Foreign.Storable (peek, poke) import Network.Socket.SendFile.Iter (Iter(..), runIter) import System.Posix.Types (Fd)+#include <stdio.h>  _sendFile :: Fd -> Fd -> Int64 -> Int64 -> IO () _sendFile out_fd in_fd off count = 
src/Network/Socket/SendFile/Linux.hsc view
@@ -2,7 +2,7 @@ -- | Linux system-dependent code for 'sendfile'. module Network.Socket.SendFile.Linux (_sendFile, sendFileIter, sendfile) where -import Data.Int (Int32, Int64)+import Data.Int (Int32, Int64)    -- Int64 is imported on 64-bit systems import Data.Word (Word32, Word64) -- Word64 is imported on 64-bit systems import Foreign.C.Error (eAGAIN, getErrno, throwErrno) import Foreign.Marshal (alloca)@@ -66,7 +66,7 @@                 else throwErrno "Network.Socket.SendFile.Linux.sendfileI"       else return (False, fromIntegral sbytes) -safeMinus :: (Ord a, Num a) => a -> a -> a+safeMinus :: (Ord a, Num a, Show a) => a -> a -> a safeMinus x y     | y > x = error $ "y > x " ++ show (y,x)     | otherwise = x - y