]> gitweb.factorcode.org Git - factor.git/commitdiff
unix.ffi: adding sendfile.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 25 Oct 2012 02:53:39 +0000 (19:53 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 25 Oct 2012 02:53:39 +0000 (19:53 -0700)
basis/unix/ffi/linux/linux.factor
basis/unix/ffi/macosx/macosx.factor

index 94e42e224d683955167bfd5f3c82c19c54cb7e91..a28935feeff909f02357374d4cdba437945114f7 100644 (file)
@@ -275,3 +275,5 @@ CONSTANT: SIGIO           29
 ALIAS:    SIGPOLL         SIGIO
 CONSTANT: SIGPWR          30
 CONSTANT: SIGSYS          31
+
+FUNCTION: ssize_t sendfile ( int out_fd, int in_fd, off_t* offset, size_t count ) ;
index 10d67d997ba7b1780f85a23837480ddebbea0176..6e994fbe82ea7ef8bb49a9d8260a1c15685c552e 100644 (file)
@@ -264,3 +264,11 @@ CONSTANT: SIGWINCH  28
 CONSTANT: SIGINFO   29
 CONSTANT: SIGUSR1   30
 CONSTANT: SIGUSR2   31
+
+STRUCT: sf_hdtr
+    { headers iovec* }
+    { hdr_cnt int }
+    { trailers iovec* }
+    { trl_cnt int } ;
+
+FUNCTION: int sendfile ( int fd, int s, off_t offset, off_t* len, sf_hdtr* hdtr, int flags ) ;