Bugzilla bug #22549: fixed a problem in the previous checkin that used
authorwtc%netscape.com
Thu, 30 Dec 1999 21:58:10 +0000
changeset 1024 bfe34519359987d3b75528bd2d5e468c2b117c20
parent 1023 15138ab5884d26c1984a183b5fabc27c1eefc017
child 1025 9b6fa6e166fddd3449f5c4a16bfb46f2d21b225f
push idunknown
push userunknown
push dateunknown
bugs22549
Bugzilla bug #22549: fixed a problem in the previous checkin that used functions before they were declared. Thanks to Colin Blakes for the fix.
pr/src/pthreads/ptio.c
--- a/pr/src/pthreads/ptio.c
+++ b/pr/src/pthreads/ptio.c
@@ -1448,21 +1448,16 @@ static PRInt32 pt_Read(PRFileDesc *fd, v
         bytes = pt_Continue(&op);
         syserrno = op.syserrno;
     }
     if (bytes < 0)
         pt_MapError(_PR_MD_MAP_READ_ERROR, syserrno);
     return bytes;
 }  /* pt_Read */
 
-static PRInt32 pt_SocketRead(PRFileDesc *fd, void *buf, PRInt32 amount)
-{
-    return pt_Recv(fd, buf, amount, 0, PR_INTERVAL_NO_TIMEOUT);
-}  /* pt_SocketRead */
-
 static PRInt32 pt_Write(PRFileDesc *fd, const void *buf, PRInt32 amount)
 {
     PRInt32 syserrno, bytes = -1;
     PRBool fNeedContinue = PR_FALSE;
 
     if (pt_TestAbort()) return bytes;
 
     bytes = write(fd->secret->md.osfd, buf, amount);
@@ -1495,21 +1490,16 @@ static PRInt32 pt_Write(PRFileDesc *fd, 
         bytes = pt_Continue(&op);
         syserrno = op.syserrno;
     }
     if (bytes == -1)
         pt_MapError(_PR_MD_MAP_WRITE_ERROR, syserrno);
     return bytes;
 }  /* pt_Write */
 
-static PRInt32 pt_SocketWrite(PRFileDesc *fd, const void *buf, PRInt32 amount)
-{
-    return pt_Send(fd, buf, amount, 0, PR_INTERVAL_NO_TIMEOUT);
-}  /* pt_SocketWrite */
-
 static PRInt32 pt_Writev(
     PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_len, PRIntervalTime timeout)
 {
     PRIntn iov_index;
     PRBool fNeedContinue = PR_FALSE;
     PRInt32 syserrno, bytes, rv = -1;
     struct iovec osiov_local[PR_MAX_IOVECTOR_SIZE], *osiov;
     int osiov_len;
@@ -1941,16 +1931,21 @@ static PRInt32 pt_Recv(
             syserrno = op.syserrno;
         }
     }
     if (bytes < 0)
         pt_MapError(_PR_MD_MAP_RECV_ERROR, syserrno);
     return bytes;
 }  /* pt_Recv */
 
+static PRInt32 pt_SocketRead(PRFileDesc *fd, void *buf, PRInt32 amount)
+{
+    return pt_Recv(fd, buf, amount, 0, PR_INTERVAL_NO_TIMEOUT);
+}  /* pt_SocketRead */
+
 static PRInt32 pt_Send(
     PRFileDesc *fd, const void *buf, PRInt32 amount,
     PRIntn flags, PRIntervalTime timeout)
 {
     PRInt32 syserrno, bytes = -1;
     PRBool fNeedContinue = PR_FALSE;
 
     /*
@@ -2021,16 +2016,21 @@ static PRInt32 pt_Send(
         bytes = pt_Continue(&op);
         syserrno = op.syserrno;
     }
     if (bytes == -1)
         pt_MapError(_PR_MD_MAP_SEND_ERROR, syserrno);
     return bytes;
 }  /* pt_Send */
 
+static PRInt32 pt_SocketWrite(PRFileDesc *fd, const void *buf, PRInt32 amount)
+{
+    return pt_Send(fd, buf, amount, 0, PR_INTERVAL_NO_TIMEOUT);
+}  /* pt_SocketWrite */
+
 static PRInt32 pt_SendTo(
     PRFileDesc *fd, const void *buf,
     PRInt32 amount, PRIntn flags, const PRNetAddr *addr,
     PRIntervalTime timeout)
 {
     PRInt32 syserrno, bytes = -1;
     PRBool fNeedContinue = PR_FALSE;
     pt_SockLen addr_len;