diff options
author | wtc%netscape.com <devnull@localhost> | 2002-04-11 21:46:14 +0000 |
---|---|---|
committer | wtc%netscape.com <devnull@localhost> | 2002-04-11 21:46:14 +0000 |
commit | d1470c8518768ae85dd0370a7b2f30f9ff6f26ae (patch) | |
tree | 23592a1e7c59f2239a75ade158719335be2c1ae4 | |
parent | 08e95a60f71a1c533b999194079930b45ceaab07 (diff) | |
download | nspr-hg-d1470c8518768ae85dd0370a7b2f30f9ff6f26ae.tar.gz |
Merged the fixes for bug 136251 and bug 135119 on the
NSPRPUB_PRE_4_2_CLIENT_BRANCH.
-rw-r--r-- | pr/src/pthreads/ptio.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c index c4a7a53a..22a703d0 100644 --- a/pr/src/pthreads/ptio.c +++ b/pr/src/pthreads/ptio.c @@ -179,8 +179,6 @@ static ssize_t (*pt_aix_sendfile_fptr)() = NULL; #include "primpl.h" -/* On Alpha Linux, these are already defined in sys/socket.h */ -#if !(defined(LINUX) && defined(__alpha)) #include <netinet/tcp.h> /* TCP_NODELAY, TCP_MAXSEG */ #ifdef LINUX /* TCP_CORK is not defined in <netinet/tcp.h> on Red Hat Linux 6.0 */ @@ -188,7 +186,6 @@ static ssize_t (*pt_aix_sendfile_fptr)() = NULL; #define TCP_CORK 3 #endif #endif -#endif #if defined(SOLARIS) #define _PRSockOptVal_t char * @@ -291,11 +288,9 @@ static PRBool IsValidNetAddrLen(const PRNetAddr *addr, PRInt32 addr_len) * most current systems. */ #if defined(HAVE_SOCKLEN_T) \ - || (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2 \ - && !defined(__alpha)) + || (defined(LINUX) && defined(__GLIBC__) && __GLIBC__ >= 2) typedef socklen_t pt_SockLen; #elif (defined(AIX) && !defined(AIX4_1)) \ - || (defined(LINUX) && defined(__alpha)) \ || defined(VMS) typedef PRSize pt_SockLen; #else @@ -1060,9 +1055,8 @@ static PRBool pt_solaris_sendfile_cont(pt_Continuation *op, PRInt16 revents) ssize_t count; count = SOLARIS_SENDFILEV(op->arg1.osfd, vec, op->arg3.amount, &xferred); - PR_ASSERT((count == -1) || (count == xferred)); - PR_ASSERT(xferred <= op->nbytes_to_send); op->syserrno = errno; + PR_ASSERT((count == -1) || (count == xferred)); if (count == -1) { if (op->syserrno != EWOULDBLOCK && op->syserrno != EAGAIN @@ -1072,6 +1066,7 @@ static PRBool pt_solaris_sendfile_cont(pt_Continuation *op, PRInt16 revents) } count = xferred; } + PR_ASSERT(count <= op->nbytes_to_send); op->result.code += count; if (count < op->nbytes_to_send) { |