diff options
author | Volker Lendecke <vl@samba.org> | 2014-09-17 00:25:38 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2014-09-18 20:36:11 +0200 |
commit | fb9067c789263d5e2fcc26adb46463b974ccdaae (patch) | |
tree | e4ef14e521e4d540c46f22b178d8b065e71fff89 /source3/lib/sendfile.c | |
parent | 6a1c51ee80cb1920248d72dfc79130cb114adad3 (diff) | |
download | samba-fb9067c789263d5e2fcc26adb46463b974ccdaae.tar.gz samba-fb9067c789263d5e2fcc26adb46463b974ccdaae.tar.xz samba-fb9067c789263d5e2fcc26adb46463b974ccdaae.zip |
Remove a few #ifdef EWOULDBLOCk
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'source3/lib/sendfile.c')
-rw-r--r-- | source3/lib/sendfile.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/source3/lib/sendfile.c b/source3/lib/sendfile.c index d5fd5a6ab5..3d457bd6f1 100644 --- a/source3/lib/sendfile.c +++ b/source3/lib/sendfile.c @@ -59,11 +59,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset ssize_t nwritten; do { nwritten = sendfile(tofd, fromfd, &offset, total); -#if defined(EWOULDBLOCK) } while (nwritten == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)); -#else - } while (nwritten == -1 && (errno == EINTR || errno == EAGAIN)); -#endif if (nwritten == -1) { if (errno == ENOSYS || errno == EINVAL) { /* Ok - we're in a world of pain here. We just sent @@ -139,11 +135,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset xferred = 0; nwritten = sendfilev(tofd, vec, sfvcnt, &xferred); -#if defined(EWOULDBLOCK) if (nwritten == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)) { -#else - if (nwritten == -1 && (errno == EINTR || errno == EAGAIN)) { -#endif if (xferred == 0) continue; /* Nothing written yet. */ else @@ -213,11 +205,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset do { nwritten = sendfile(tofd, fromfd, offset, total, &hdtrl[0], 0); -#if defined(EWOULDBLOCK) } while (nwritten == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK)); -#else - } while (nwritten == -1 && (errno == EINTR || errno == EAGAIN)); -#endif if (nwritten == -1) return -1; if (nwritten == 0) @@ -282,11 +270,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, #else ret = sendfile(fromfd, tofd, offset, count, &sf_header, &nwritten, 0); #endif -#if defined(EWOULDBLOCK) if (ret == -1 && errno != EINTR && errno != EAGAIN && errno != EWOULDBLOCK) { -#else - if (ret == -1 && errno != EINTR && errno != EAGAIN) { -#endif /* Send failed, we are toast. */ return -1; } @@ -364,11 +348,7 @@ ssize_t sys_sendfile(int tofd, int fromfd, const DATA_BLOB *header, off_t offset */ do { ret = send_file(&tofd, &hdtrl, 0); -#if defined(EWOULDBLOCK) } while ((ret == 1) || (ret == -1 && (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK))); -#else - } while ((ret == 1) || (ret == -1 && (errno == EINTR || errno == EAGAIN))); -#endif if ( ret == -1 ) return -1; } |