Created
June 1, 2010 22:24
-
-
Save aycanirican/421613 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c_sendfile :: Fd -> Fd -> COff -> CSize -> IO CSsize | |
#if defined(LINUX) | |
c_sendfile ofd ifd o c = do | |
alloca $ \off -> do | |
poke off o | |
r <- c_sendfile_linux ofd ifd off c | |
return r | |
#endif | |
#if defined(DARWIN) | |
c_sendfile ofd ifd o c = do | |
alloca $ \sbytes -> | |
do poke sbytes c | |
c_sendfile_darwin ifd ofd o sbytes 0 0 | |
#endif | |
#if defined(FREEBSD) | |
c_sendfile ofd ifd o c = do | |
alloca $ \sbytes -> | |
do poke sbytes c | |
c_sendfile_freebsd ifd ofd o c 0 sbytes 0 | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment