我在Haskell sendfile
中找到了这一编号。 一揽子:
http://TOP-tag.com/r/mae/sendfile/snapshot/tant/content/pretty/src/Network/Socket/SendFile/parties.hsc
-- sendfile64 gives LFS support
foreign import ccall unsafe "sendfile64" c_sendfile
:: Fd -> Fd -> Ptr (#type off64_t) -> (#type size_t) -> IO (#type ssize_t)
(1) 什么是<条码>第2类条码>的含义和2”,为什么我有这个错误。
[1 of 1] Compiling Linux.Splice ( splice.hs, splice.o )
pl:40:12: parse error on input `type
when I myself try to use it as follows?:
ghc --make splice.hs
pl:
{-# LANGUAGE ForeignFunctionInterface #-}
module Linux.Splice where
import Data.Word
import System.Posix.Types
-- SPLICE
-- fcntl.h
-- ssize_t splice(
-- int fd_in,
-- loff_t* off_in,
-- int fd_out,
-- loff_t* off_out,
-- size_t len,
-- unsigned int flags
-- );
foreign import ccall unsafe "fnctl.h splice" c_splice
:: Fd
-> Ptr (#type {- < parse error -} loff_t)
-> Fd
-> Ptr (#type loff_t)
-> (#type size_t)
-> Word
-> IO (#type ssize_t)
(使用GHC 7.4.x)