diff options
author | Andrew Bartlett <abartlet@samba.org> | 2012-04-05 14:53:08 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2012-04-06 01:47:43 +0200 |
commit | 6aa12fcb30c8f7246fd0215b1d808191c0d87668 (patch) | |
tree | 92eb805ea2ed03b1e42f6ce55ca26a65a92761fb /source3/lib/sendfile.c | |
parent | 48166468fe3ca515dae3431bbe674809489f743c (diff) | |
download | samba-6aa12fcb30c8f7246fd0215b1d808191c0d87668.tar.gz samba-6aa12fcb30c8f7246fd0215b1d808191c0d87668.tar.bz2 samba-6aa12fcb30c8f7246fd0215b1d808191c0d87668.zip |
build: Remove SMB_OFF_T, replace with off_t
Now that we always require a 64 bit off_t, we no longer need SMB_OFF_T.
Andrew Bartlett
Autobuild-User: Andrew Bartlett <abartlet@samba.org>
Autobuild-Date: Fri Apr 6 01:47:43 CEST 2012 on sn-devel-104
Diffstat (limited to 'source3/lib/sendfile.c')
-rw-r--r-- | source3/lib/sendfile.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source3/lib/sendfile.c b/source3/lib/sendfile.c index 50b522ed19..a9607fa825 100644 --- a/source3/lib/sendfile.c +++ b/source3/lib/sendfile.c @@ -33,7 +33,7 @@ #define MSG_MORE 0x8000 #endif -ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count) +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset, size_t count) { size_t total=0; ssize_t ret; @@ -103,7 +103,7 @@ extern int32 sendfile (int out_fd, int in_fd, int32 *offset, uint32 count); #define MSG_MORE 0x8000 #endif -ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count) +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset, size_t count) { size_t total=0; ssize_t ret; @@ -118,7 +118,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of * and uses a normal read. JRA. */ - if ((sizeof(SMB_OFF_T) >= 8) && (offset + count > (SMB_OFF_T)0x7FFFFFFF)) { + if ((sizeof(off_t) >= 8) && (offset + count > (off_t)0x7FFFFFFF)) { errno = ENOSYS; return -1; } @@ -184,7 +184,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of #include <sys/sendfile.h> -ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count) +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset, size_t count) { int sfvcnt; size_t total, xferred; @@ -270,7 +270,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of #include <sys/socket.h> #include <sys/uio.h> -ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count) +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset, size_t count) { size_t total=0; struct iovec hdtrl[2]; @@ -341,7 +341,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of #include <sys/socket.h> #include <sys/uio.h> -ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count) +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset, size_t count) { size_t total=0; struct sf_hdtr hdr; @@ -364,7 +364,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of total = count; while (total + hdtrl.iov_len) { - SMB_OFF_T nwritten; + off_t nwritten; int ret; /* @@ -418,7 +418,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of /* Contributed by William Jojo <jojowil@hvcc.edu> */ #include <sys/socket.h> -ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count) +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset, size_t count) { struct sf_parms hdtrl; @@ -472,7 +472,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T of #else /* No sendfile implementation. Return error. */ -ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, SMB_OFF_T offset, size_t count) +ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset, size_t count) { /* No sendfile syscall. */ errno = ENOSYS; |