VirtualBox

Ignore:
Timestamp:
Nov 6, 2023 2:30:55 PM (15 months ago)
Author:
vboxsync
Message:

libs/xpcom: Remove unused code from nsprpub, bugref:10545

Location:
trunk/src/libs/xpcom18a4/nsprpub/pr
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/prio.h

    r101870 r101872  
    7373#define PR_Listen VBoxNsprPR_Listen
    7474#define PR_Accept VBoxNsprPR_Accept
    75 #define PR_AcceptRead VBoxNsprPR_AcceptRead
    7675#define PR_OpenDir VBoxNsprPR_OpenDir
    7776#define PR_ReadDir VBoxNsprPR_ReadDir
     
    9897#define PR_GetOpenFileInfo64 VBoxNsprPR_GetOpenFileInfo64
    9998#define PR_Available VBoxNsprPR_Available
    100 #define PR_Available64 VBoxNsprPR_Available64
    10199#define PR_Sync VBoxNsprPR_Sync
    102100#define PR_MkDir VBoxNsprPR_MkDir
     
    109107#define PR_Recv VBoxNsprPR_Recv
    110108#define PR_Send VBoxNsprPR_Send
    111 #define PR_RecvFrom VBoxNsprPR_RecvFrom
    112 #define PR_SendTo VBoxNsprPR_SendTo
    113109#define PR_TransmitFile VBoxNsprPR_TransmitFile
    114110#define PR_GetSockName VBoxNsprPR_GetSockName
     
    387383typedef PRInt32 (PR_CALLBACK *PRWriteFN)(PRFileDesc *fd, const void *buf, PRInt32 amount);
    388384typedef PRInt32 (PR_CALLBACK *PRAvailableFN)(PRFileDesc *fd);
    389 typedef PRInt64 (PR_CALLBACK *PRAvailable64FN)(PRFileDesc *fd);
    390385typedef PRStatus (PR_CALLBACK *PRFsyncFN)(PRFileDesc *fd);
    391386typedef PROffset32 (PR_CALLBACK *PRSeekFN)(PRFileDesc *fd, PROffset32 offset, PRSeekWhence how);
     
    409404    PRFileDesc *fd, const void *buf, PRInt32 amount,
    410405    PRIntn flags, PRIntervalTime timeout);
    411 typedef PRInt32 (PR_CALLBACK *PRRecvfromFN)(
    412     PRFileDesc *fd, void *buf, PRInt32 amount,
    413     PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout);
    414 typedef PRInt32 (PR_CALLBACK *PRSendtoFN)(
    415     PRFileDesc *fd, const void *buf, PRInt32 amount,
    416     PRIntn flags, const PRNetAddr *addr, PRIntervalTime timeout);
    417406typedef PRInt16 (PR_CALLBACK *PRPollFN)(
    418407    PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags);
    419 typedef PRInt32 (PR_CALLBACK *PRAcceptreadFN)(
    420     PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr,
    421     void *buf, PRInt32 amount, PRIntervalTime t);
    422408typedef PRStatus (PR_CALLBACK *PRGetsocknameFN)(PRFileDesc *fd, PRNetAddr *addr);
    423409typedef PRStatus (PR_CALLBACK *PRGetpeernameFN)(PRFileDesc *fd, PRNetAddr *addr);
     
    436422    PRWriteFN write;                /* write specified bytes from buffer        */
    437423    PRAvailableFN available;        /* determine number of bytes available      */
    438     PRAvailable64FN available64;    /*          ditto, 64 bit                   */
    439424    PRFsyncFN fsync;                /* flush all buffers to permanent store     */
    440425    PRSeekFN seek;                  /* position the file to the desired place   */
     
    450435    PRRecvFN recv;                  /* Solicit up the the specified bytes       */
    451436    PRSendFN send;                  /* Send all the bytes specified             */
    452     PRRecvfromFN recvfrom;          /* Solicit (net) bytes and report source    */
    453     PRSendtoFN sendto;              /* Send bytes to (net) address specified    */
    454437    PRPollFN poll;                  /* Test the fd to see if it is ready        */
    455     PRAcceptreadFN acceptread;      /* Accept and read on a new (net) fd        */
    456438    PRGetsocknameFN getsockname;    /* Get (net) address associated with fd     */
    457439    PRGetpeernameFN getpeername;    /* Get peer's (net) address                 */
     
    10201002
    10211003NSPR_API(PRInt32) PR_Available(PRFileDesc *fd);
    1022 NSPR_API(PRInt64) PR_Available64(PRFileDesc *fd);
    10231004
    10241005/*
     
    14531434
    14541435/*
    1455  *************************************************************************
    1456  * FUNCTION: PR_RecvFrom
    1457  * DESCRIPTION:
    1458  *     Receive up to a specified number of bytes from socket which may
    1459  *     or may not be connected.
    1460  *     The operation will block until one or more bytes are
    1461  *     transferred, a time out has occurred, or there is an error.
    1462  *     No more than 'amount' bytes will be transferred.
    1463  * INPUTS:
    1464  *     PRFileDesc *fd
    1465  *       points to a PRFileDesc object representing a socket.
    1466  *     void *buf
    1467  *       pointer to a buffer to hold the data received.
    1468  *     PRInt32 amount
    1469  *       the size of 'buf' (in bytes)
    1470  *     PRIntn flags
    1471  *        (OBSOLETE - must always be zero)
    1472  *     PRNetAddr *addr
    1473  *       Specifies the address of the sending peer. It may be NULL.
    1474  *     PRIntervalTime timeout
    1475  *       Time limit for completion of the receive operation.
    1476  * OUTPUTS:
    1477  *     None
    1478  * RETURN: PRInt32
    1479  *         a positive number indicates the number of bytes actually received.
    1480  *         0 means the network connection is closed.
    1481  *         -1 indicates a failure. The reason for the failure is obtained
    1482  *         by calling PR_GetError().
    1483  **************************************************************************
    1484  */
    1485 
    1486 NSPR_API(PRInt32) PR_RecvFrom(
    1487     PRFileDesc *fd, void *buf, PRInt32 amount, PRIntn flags,
    1488     PRNetAddr *addr, PRIntervalTime timeout);
    1489 
    1490 /*
    1491  *************************************************************************
    1492  * FUNCTION: PR_SendTo
    1493  * DESCRIPTION:
    1494  *    Send a specified number of bytes from an unconnected socket.
    1495  *    The operation will block until all bytes are
    1496  *    sent, a time out has occurred, or there is an error.
    1497  * INPUTS:
    1498  *     PRFileDesc *fd
    1499  *       points to a PRFileDesc object representing an unconnected socket.
    1500  *     void *buf
    1501  *       pointer to a buffer from where the data is sent.
    1502  *     PRInt32 amount
    1503  *       the size of 'buf' (in bytes)
    1504  *     PRIntn flags
    1505  *        (OBSOLETE - must always be zero)
    1506  *     PRNetAddr *addr
    1507  *       Specifies the address of the peer.
    1508 .*     PRIntervalTime timeout
    1509  *       Time limit for completion of the send operation.
    1510  * OUTPUTS:
    1511  *     None
    1512  * RETURN: PRInt32
    1513  *     A positive number indicates the number of bytes successfully sent.
    1514  *     -1 indicates a failure. The reason for the failure is obtained
    1515  *     by calling PR_GetError().
    1516  **************************************************************************
    1517  */
    1518 
    1519 NSPR_API(PRInt32) PR_SendTo(
    1520     PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
    1521     const PRNetAddr *addr, PRIntervalTime timeout);
    1522 
    1523 /*
    1524 *************************************************************************
    1525 ** FUNCTION: PR_AcceptRead
    1526 ** DESCRIPTION:
    1527 **    AcceptRead accepts a new connection, returns the newly created
    1528 **    socket's descriptor and also returns the connecting peer's address.
    1529 **    AcceptRead, as its name suggests, also receives the first block of data
    1530 **    sent by the peer.
    1531 **
    1532 ** INPUTS:
    1533 **    PRFileDesc *listenSock
    1534 **        A socket descriptor that has been called with the PR_Listen()
    1535 **        function, also known as the rendezvous socket.
    1536 **    void *buf
    1537 **        A pointer to a buffer to receive data sent by the client.  This
    1538 **        buffer must be large enough to receive <amount> bytes of data
    1539 **        and two PRNetAddr structures, plus an extra 32 bytes. See:
    1540 **        PR_ACCEPT_READ_BUF_OVERHEAD.
    1541 **    PRInt32 amount
    1542 **        The number of bytes of client data to receive.  Does not include
    1543 **        the size of the PRNetAddr structures.  If 0, no data will be read
    1544 **        from the client.
    1545 **    PRIntervalTime timeout
    1546 **        The timeout interval only applies to the read portion of the
    1547 **        operation.  PR_AcceptRead will block indefinitely until the
    1548 **        connection is accepted; the read will timeout after the timeout
    1549 **        interval elapses.
    1550 ** OUTPUTS:
    1551 **    PRFileDesc **acceptedSock
    1552 **        The file descriptor for the newly connected socket.  This parameter
    1553 **        will only be valid if the function return does not indicate failure.
    1554 **    PRNetAddr  **peerAddr,
    1555 **        The address of the remote socket.  This parameter will only be
    1556 **        valid if the function return does not indicate failure.  The
    1557 **        returned address is not guaranteed to be properly aligned.
    1558 **
    1559 ** RETURNS:
    1560 **     The number of bytes read from the client or -1 on failure.  The reason
    1561 **     for the failure is obtained by calling PR_GetError().
    1562 **************************************************************************
    1563 **/       
    1564 /* define buffer overhead constant. Add this value to the user's
    1565 ** data length when allocating a buffer to accept data.
    1566 **    Example:
    1567 **    #define USER_DATA_SIZE 10
    1568 **    char buf[USER_DATA_SIZE + PR_ACCEPT_READ_BUF_OVERHEAD];
    1569 **    bytesRead = PR_AcceptRead( s, fd, &a, &p, USER_DATA_SIZE, ...);
    1570 */
    1571 #define PR_ACCEPT_READ_BUF_OVERHEAD (32+(2*sizeof(PRNetAddr)))
    1572 
    1573 NSPR_API(PRInt32) PR_AcceptRead(
    1574     PRFileDesc *listenSock, PRFileDesc **acceptedSock,
    1575     PRNetAddr **peerAddr, void *buf, PRInt32 amount, PRIntervalTime timeout);
    1576 
    1577 /*
    15781436*************************************************************************
    15791437** FUNCTION: PR_GetSockName
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/pprio.h

    r101870 r101872  
    6464#define PR_DestroySocketPollFd VBoxNsprPR_DestroySocketPollFd
    6565#define PR_Socket VBoxNsprPR_Socket
    66 #define PR_LockFile VBoxNsprPR_LockFile
    67 #define PR_TLockFile VBoxNsprPR_TLockFile
    68 #define PR_UnlockFile VBoxNsprPR_UnlockFile
    69 #define PR_EmulateAcceptRead VBoxNsprPR_EmulateAcceptRead
    70 #define PR_EmulateSendFile VBoxNsprPR_EmulateSendFile
    71 #define PR_NTFast_AcceptRead VBoxNsprPR_NTFast_AcceptRead
    72 #define PR_NTFast_AcceptRead_WithTimeoutCallback VBoxNsprPR_NTFast_AcceptRead_WithTimeoutCallback
    73 #define PR_NTFast_Accept VBoxNsprPR_NTFast_Accept
    74 #define PR_NTFast_UpdateAcceptContext VBoxNsprPR_NTFast_UpdateAcceptContext
    75 #define PR_NT_CancelIo VBoxNsprPR_NT_CancelIo
    76 #define PR_Init_Log VBoxNsprPR_Init_Log
    7766#endif /* VBOX_WITH_XPCOM_NAMESPACE_CLEANUP */
    7867
     
    159148NSPR_API(PRFileDesc*)   PR_Socket(PRInt32 domain, PRInt32 type, PRInt32 proto);
    160149
    161 /*
    162 ** Emulate acceptread by accept and recv.
    163 */
    164 NSPR_API(PRInt32) PR_EmulateAcceptRead(PRFileDesc *sd, PRFileDesc **nd,
    165     PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout);
    166 
    167150PR_END_EXTERN_C
    168151
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/io/priometh.c

    r101870 r101872  
    4949    (PRWriteFN)_PR_InvalidInt,
    5050    (PRAvailableFN)_PR_InvalidInt,
    51     (PRAvailable64FN)_PR_InvalidInt64,
    5251    (PRFsyncFN)_PR_InvalidStatus,
    5352    (PRSeekFN)_PR_InvalidInt,
     
    6362    (PRRecvFN)_PR_InvalidInt,       
    6463    (PRSendFN)_PR_InvalidInt,       
    65     (PRRecvfromFN)_PR_InvalidInt,   
    66     (PRSendtoFN)_PR_InvalidInt,       
    6764    (PRPollFN)_PR_InvalidInt16,
    68     (PRAcceptreadFN)_PR_InvalidInt,   
    6965    (PRGetsocknameFN)_PR_InvalidStatus,   
    7066    (PRGetpeernameFN)_PR_InvalidStatus,   
     
    160156}
    161157
    162 PR_IMPLEMENT(PRInt64) PR_Available64(PRFileDesc *fd)
    163 {
    164         return((fd->methods->available64)(fd));
    165 }
    166 
    167158PR_IMPLEMENT(PRStatus) PR_GetOpenFileInfo(PRFileDesc *fd, PRFileInfo *info)
    168159{
     
    236227}
    237228
    238 PR_IMPLEMENT(PRInt32) PR_RecvFrom(PRFileDesc *fd, void *buf, PRInt32 amount,
    239 PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout)
    240 {
    241         return((fd->methods->recvfrom)(fd,buf,amount,flags,addr,timeout));
    242 }
    243 
    244 PR_IMPLEMENT(PRInt32) PR_SendTo(
    245     PRFileDesc *fd, const void *buf, PRInt32 amount,
    246     PRIntn flags, const PRNetAddr *addr, PRIntervalTime timeout)
    247 {
    248         return((fd->methods->sendto)(fd,buf,amount,flags,addr,timeout));
    249 }
    250 
    251 PR_IMPLEMENT(PRInt32) PR_AcceptRead(
    252     PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr,
    253     void *buf, PRInt32 amount, PRIntervalTime timeout)
    254 {
    255         return((sd->methods->acceptread)(sd, nd, raddr, buf, amount,timeout));
    256 }
    257 
    258229PR_IMPLEMENT(PRStatus) PR_GetSockName(PRFileDesc *fd, PRNetAddr *addr)
    259230{
     
    278249}
    279250
    280 PR_IMPLEMENT(PRInt32) PR_EmulateAcceptRead(
    281     PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr,
    282     void *buf, PRInt32 amount, PRIntervalTime timeout)
    283 {
    284     PRInt32 rv = -1;
    285     PRNetAddr remote;
    286     PRFileDesc *accepted = NULL;
    287 
    288     /*
    289     ** The timeout does not apply to the accept portion of the
    290     ** operation - it waits indefinitely.
    291     */
    292     accepted = PR_Accept(sd, &remote, PR_INTERVAL_NO_TIMEOUT);
    293     if (NULL == accepted) return rv;
    294 
    295     rv = PR_Recv(accepted, buf, amount, 0, timeout);
    296     if (rv >= 0)
    297     {
    298         /* copy the new info out where caller can see it */
    299 #define AMASK ((PRPtrdiff)7)  /* mask for alignment of PRNetAddr */
    300         PRPtrdiff aligned = (PRPtrdiff)buf + amount + AMASK;
    301         *raddr = (PRNetAddr*)(aligned & ~AMASK);
    302         memcpy(*raddr, &remote, PR_NETADDR_SIZE(&remote));
    303         *nd = accepted;
    304         return rv;
    305     }
    306 
    307     PR_Close(accepted);
    308     return rv;
    309 }
    310 
    311251/* priometh.c */
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/io/prlayer.c

    r101870 r101872  
    127127}
    128128
    129 static PRInt64 PR_CALLBACK pl_DefAvailable64 (PRFileDesc *fd)
    130 {
    131     PR_ASSERT(fd != NULL);
    132     PR_ASSERT(fd->lower != NULL);
    133 
    134     return (fd->lower->methods->available64)(fd->lower);
    135 }
    136 
    137129static PRStatus PR_CALLBACK pl_DefFsync (PRFileDesc *fd)
    138130{
     
    291283}
    292284
    293 static PRInt32 PR_CALLBACK pl_DefRecvfrom (
    294     PRFileDesc *fd, void *buf, PRInt32 amount,
    295     PRIntn flags, PRNetAddr *addr, PRIntervalTime timeout)
    296 {
    297     PR_ASSERT(fd != NULL);
    298     PR_ASSERT(fd->lower != NULL);
    299 
    300     return (fd->lower->methods->recvfrom)(
    301         fd->lower, buf, amount, flags, addr, timeout);
    302 }
    303 
    304 static PRInt32 PR_CALLBACK pl_DefSendto (
    305     PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
    306     const PRNetAddr *addr, PRIntervalTime timeout)
    307 {
    308     PR_ASSERT(fd != NULL);
    309     PR_ASSERT(fd->lower != NULL);
    310 
    311     return (fd->lower->methods->sendto)(
    312         fd->lower, buf, amount, flags, addr, timeout);
    313 }
    314 
    315285static PRInt16 PR_CALLBACK pl_DefPoll (
    316286    PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags)
     
    320290
    321291    return (fd->lower->methods->poll)(fd->lower, in_flags, out_flags);
    322 }
    323 
    324 static PRInt32 PR_CALLBACK pl_DefAcceptread (
    325     PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr, void *buf,
    326     PRInt32 amount, PRIntervalTime t)
    327 {
    328     PRInt32 nbytes;
    329     PRStatus rv;
    330     PRFileDesc *newstack;
    331     PRFileDesc *layer = sd;
    332         PRBool newstyle_stack = PR_FALSE;
    333 
    334     PR_ASSERT(sd != NULL);
    335     PR_ASSERT(sd->lower != NULL);
    336 
    337         /* test for new style stack */
    338         while (NULL != layer->higher)
    339                 layer = layer->higher;
    340         newstyle_stack = (PR_IO_LAYER_HEAD == layer->identity) ? PR_TRUE : PR_FALSE;
    341     newstack = PR_NEW(PRFileDesc);
    342     if (NULL == newstack)
    343     {
    344         PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
    345         return -1;
    346     }
    347     *newstack = *sd;  /* make a copy of the accepting layer */
    348 
    349     nbytes = sd->lower->methods->acceptread(
    350         sd->lower, nd, raddr, buf, amount, t);
    351     if (-1 == nbytes)
    352     {
    353         PR_DELETE(newstack);
    354         return nbytes;
    355     }
    356     if (newstyle_stack) {
    357                 newstack->lower = *nd;
    358                 (*nd)->higher = newstack;
    359                 *nd = newstack;
    360                 return nbytes;
    361         } else {
    362                 /* this PR_PushIOLayer call cannot fail */
    363                 rv = PR_PushIOLayer(*nd, PR_TOP_IO_LAYER, newstack);
    364                 PR_ASSERT(PR_SUCCESS == rv);
    365                 return nbytes;
    366         }
    367292}
    368293
     
    408333    pl_DefWrite,
    409334    pl_DefAvailable,
    410     pl_DefAvailable64,
    411335    pl_DefFsync,
    412336    pl_DefSeek,
     
    422346    pl_DefRecv,
    423347    pl_DefSend,
    424     pl_DefRecvfrom,
    425     pl_DefSendto,
    426348    pl_DefPoll,
    427     pl_DefAcceptread,
    428349    pl_DefGetsockname,
    429350    pl_DefGetpeername,
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/io/prpolevt.c

    r101870 r101872  
    8989    (PRWriteFN)_PR_InvalidInt,
    9090    (PRAvailableFN)_PR_InvalidInt,
    91     (PRAvailable64FN)_PR_InvalidInt64,
    9291    (PRFsyncFN)_PR_InvalidStatus,
    9392    (PRSeekFN)_PR_InvalidInt,
     
    103102    (PRRecvFN)_PR_InvalidInt,       
    104103    (PRSendFN)_PR_InvalidInt,       
    105     (PRRecvfromFN)_PR_InvalidInt,   
    106     (PRSendtoFN)_PR_InvalidInt,       
    107104    _pr_PolEvtPoll,
    108     (PRAcceptreadFN)_PR_InvalidInt,   
    109105    (PRGetsocknameFN)_PR_InvalidStatus,   
    110106    (PRGetpeernameFN)_PR_InvalidStatus,   
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/pthreads/ptio.c

    r101870 r101872  
    614614}  /* pt_writev_cont */
    615615
    616 static PRBool pt_sendto_cont(pt_Continuation *op, PRInt16 revents)
    617 {
    618     PRIntn bytes = sendto(
    619         op->arg1.osfd, op->arg2.buffer, op->arg3.amount, op->arg4.flags,
    620         (struct sockaddr*)op->arg5.addr, PR_NETADDR_SIZE(op->arg5.addr));
    621     op->syserrno = errno;
    622     if (bytes >= 0)  /* this is progress */
    623     {
    624         char *bp = (char*)op->arg2.buffer;
    625         bp += bytes;  /* adjust the buffer pointer */
    626         op->arg2.buffer = bp;
    627         op->result.code += bytes;  /* accumulate the number sent */
    628         op->arg3.amount -= bytes;  /* and reduce the required count */
    629         return (0 == op->arg3.amount) ? PR_TRUE : PR_FALSE;
    630     }
    631     else if ((EWOULDBLOCK != op->syserrno) && (EAGAIN != op->syserrno))
    632     {
    633         op->result.code = -1;
    634         return PR_TRUE;
    635     }
    636     else return PR_FALSE;
    637 }  /* pt_sendto_cont */
    638 
    639 static PRBool pt_recvfrom_cont(pt_Continuation *op, PRInt16 revents)
    640 {
    641     pt_SockLen addr_len = sizeof(PRNetAddr);
    642     op->result.code = recvfrom(
    643         op->arg1.osfd, op->arg2.buffer, op->arg3.amount,
    644         op->arg4.flags, (struct sockaddr*)op->arg5.addr, &addr_len);
    645     op->syserrno = errno;
    646     return ((-1 == op->result.code) &&
    647             (EWOULDBLOCK == op->syserrno || EAGAIN == op->syserrno)) ?
    648         PR_FALSE : PR_TRUE;
    649 }  /* pt_recvfrom_cont */
    650 
    651616void _PR_InitIO(void)
    652617{
     
    998963}  /* pt_Available_f */
    999964
    1000 static PRInt64 pt_Available64_f(PRFileDesc *fd)
    1001 {
    1002     PRInt64 result, cur, end;
    1003     PRInt64 minus_one;
    1004 
    1005     LL_I2L(minus_one, -1);
    1006     cur = _PR_MD_LSEEK64(fd, LL_ZERO, PR_SEEK_CUR);
    1007 
    1008     if (LL_GE_ZERO(cur))
    1009         end = _PR_MD_LSEEK64(fd, LL_ZERO, PR_SEEK_END);
    1010 
    1011     if (!LL_GE_ZERO(cur) || !LL_GE_ZERO(end)) return minus_one;
    1012 
    1013     LL_SUB(result, end, cur);
    1014     (void)_PR_MD_LSEEK64(fd, cur, PR_SEEK_SET);
    1015 
    1016     return result;
    1017 }  /* pt_Available64_f */
    1018 
    1019965static PRInt32 pt_Available_s(PRFileDesc *fd)
    1020966{
     
    1028974    return bytes;
    1029975}  /* pt_Available_s */
    1030 
    1031 static PRInt64 pt_Available64_s(PRFileDesc *fd)
    1032 {
    1033     PRInt64 rv;
    1034     LL_I2L(rv, pt_Available_s(fd));
    1035     return rv;
    1036 }  /* pt_Available64_s */
    1037976
    1038977static PRStatus pt_FileInfo(PRFileDesc *fd, PRFileInfo *info)
     
    14731412}  /* pt_SocketWrite */
    14741413
    1475 static PRInt32 pt_AcceptRead(
    1476     PRFileDesc *sd, PRFileDesc **nd, PRNetAddr **raddr,
    1477     void *buf, PRInt32 amount, PRIntervalTime timeout)
    1478 {
    1479     PRInt32 rv = -1;
    1480 
    1481     if (pt_TestAbort()) return rv;
    1482     /* The socket must be in blocking mode. */
    1483     if (sd->secret->nonblocking)
    1484     {
    1485         PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
    1486         return rv;
    1487     }
    1488 
    1489     rv = PR_EmulateAcceptRead(sd, nd, raddr, buf, amount, timeout);
    1490     return rv;
    1491 }  /* pt_AcceptRead */
    1492 
    14931414static PRStatus pt_GetSockName(PRFileDesc *fd, PRNetAddr *addr)
    14941415{
     
    17901711    pt_Write,
    17911712    pt_Available_f,
    1792     pt_Available64_f,
    17931713    pt_Fsync,
    17941714    pt_Seek,
     
    18041724    (PRRecvFN)_PR_InvalidInt,
    18051725    (PRSendFN)_PR_InvalidInt,
    1806     (PRRecvfromFN)_PR_InvalidInt,
    1807     (PRSendtoFN)_PR_InvalidInt,
    18081726    pt_Poll,
    1809     (PRAcceptreadFN)_PR_InvalidInt,
    18101727    (PRGetsocknameFN)_PR_InvalidStatus,
    18111728    (PRGetpeernameFN)_PR_InvalidStatus,
     
    18271744    pt_Write,
    18281745    pt_Available_s,
    1829     pt_Available64_s,
    18301746    pt_Synch,
    18311747    (PRSeekFN)_PR_InvalidInt,
     
    18411757    (PRRecvFN)_PR_InvalidInt,
    18421758    (PRSendFN)_PR_InvalidInt,
    1843     (PRRecvfromFN)_PR_InvalidInt,
    1844     (PRSendtoFN)_PR_InvalidInt,
    18451759    pt_Poll,
    1846     (PRAcceptreadFN)_PR_InvalidInt,
    18471760    (PRGetsocknameFN)_PR_InvalidStatus,
    18481761    (PRGetpeernameFN)_PR_InvalidStatus,
     
    18641777    pt_SocketWrite,
    18651778    pt_Available_s,
    1866     pt_Available64_s,
    18671779    pt_Synch,
    18681780    (PRSeekFN)_PR_InvalidInt,
     
    18781790    pt_Recv,
    18791791    pt_Send,
    1880     (PRRecvfromFN)_PR_InvalidInt,
    1881     (PRSendtoFN)_PR_InvalidInt,
    18821792    pt_Poll,
    1883     pt_AcceptRead,
    18841793    pt_GetSockName,
    18851794    pt_GetPeerName,
     
    19011810    (PRWriteFN)_PR_InvalidInt,
    19021811    (PRAvailableFN)_PR_InvalidInt,
    1903     (PRAvailable64FN)_PR_InvalidInt64,
    19041812    (PRFsyncFN)_PR_InvalidStatus,
    19051813    (PRSeekFN)_PR_InvalidInt,
     
    19151823    (PRRecvFN)_PR_InvalidInt,
    19161824    (PRSendFN)_PR_InvalidInt,
    1917     (PRRecvfromFN)_PR_InvalidInt,
    1918     (PRSendtoFN)_PR_InvalidInt,
    19191825        pt_Poll,
    1920     (PRAcceptreadFN)_PR_InvalidInt,
    19211826    (PRGetsocknameFN)_PR_InvalidStatus,
    19221827    (PRGetpeernameFN)_PR_InvalidStatus,
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette