VirtualBox

Ignore:
Timestamp:
Nov 6, 2023 1:38:17 PM (15 months ago)
Author:
vboxsync
Message:

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

Location:
trunk/src/libs/xpcom18a4/nsprpub/pr/include/private
Files:
3 edited

Legend:

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

    r11551 r101869  
    151151*/
    152152
    153 #ifdef WIN32
    154 
    155 #define PR_SOCK_STREAM 1
    156 #define PR_SOCK_DGRAM 2
    157 
    158 #else /* WIN32 */
    159 
    160153#define PR_SOCK_STREAM SOCK_STREAM
    161154#define PR_SOCK_DGRAM SOCK_DGRAM
    162 
    163 #endif /* WIN32 */
    164155
    165156/*
     
    211202    PRTransmitFileFlags flags, PRIntervalTime timeout);
    212203
    213 #ifdef WIN32
    214 /* FUNCTION: PR_NTFast_AcceptRead
    215 ** DESCRIPTION:
    216 **    NT has the notion of an "accept context", which is only needed in
    217 **    order to make certain calls.  By default, a socket connected via
    218 **    AcceptEx can only do a limited number of things without updating
    219 **    the acceptcontext.  The generic version of PR_AcceptRead always
    220 **    updates the accept context.  This version does not.
    221 **/
    222 NSPR_API(PRInt32) PR_NTFast_AcceptRead(PRFileDesc *sd, PRFileDesc **nd,
    223               PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime t);
    224 
    225 typedef void (*_PR_AcceptTimeoutCallback)(void *);
    226 
    227 /* FUNCTION: PR_NTFast_AcceptRead_WithTimeoutCallback
    228 ** DESCRIPTION:
    229 **    The AcceptEx call combines the accept with the read function.  However,
    230 **    our daemon threads need to be able to wakeup and reliably flush their
    231 **    log buffers if the Accept times out.  However, with the current blocking
    232 **    interface to AcceptRead, there is no way for us to timeout the Accept;
    233 **    this is because when we timeout the Read, we can close the newly
    234 **    socket and continue; but when we timeout the accept itself, there is no
    235 **    new socket to timeout.  So instead, this version of the function is
    236 **    provided.  After the initial timeout period elapses on the accept()
    237 **    portion of the function, it will call the callback routine and then
    238 **    continue the accept.   If the timeout occurs on the read, it will
    239 **    close the connection and return error.
    240 */
    241 NSPR_API(PRInt32) PR_NTFast_AcceptRead_WithTimeoutCallback(
    242               PRFileDesc *sd,
    243               PRFileDesc **nd,
    244               PRNetAddr **raddr,
    245               void *buf,
    246               PRInt32 amount,
    247               PRIntervalTime t,
    248               _PR_AcceptTimeoutCallback callback,
    249               void *callback_arg);
    250 
    251 /* FUNCTION: PR_NTFast_Accept
    252 ** DESCRIPTION:
    253 **    NT has the notion of an "accept context", which is only needed in
    254 **    order to make certain calls.  By default, a socket connected via
    255 **    AcceptEx can only do a limited number of things without updating
    256 **    the acceptcontext.  The generic version of PR_Accept always
    257 **    updates the accept context.  This version does not.
    258 **/
    259 NSPR_API(PRFileDesc*)   PR_NTFast_Accept(PRFileDesc *fd, PRNetAddr *addr,
    260                                                 PRIntervalTime timeout);
    261 
    262 /* FUNCTION: PR_NTFast_Update
    263 ** DESCRIPTION:
    264 **    For sockets accepted with PR_NTFast_Accept or PR_NTFastAcceptRead,
    265 **    this function will update the accept context for those sockets,
    266 **    so that the socket can make general purpose socket calls.
    267 **    Without calling this, the only operations supported on the socket
    268 **    Are PR_Read, PR_Write, PR_Transmitfile, and PR_Close.
    269 */
    270 NSPR_API(void) PR_NTFast_UpdateAcceptContext(PRFileDesc *acceptSock,
    271                                         PRFileDesc *listenSock);
    272 
    273 
    274 /* FUNCTION: PR_NT_CancelIo
    275 ** DESCRIPTION:
    276 **    Cancel IO operations on fd.
    277 */
    278 NSPR_API(PRStatus) PR_NT_CancelIo(PRFileDesc *fd);
    279 
    280 
    281 #endif /* WIN32 */
    282 
    283 /*
    284 ** Need external access to this on Mac so we can first set up our faux
    285 ** environment vars
    286 */
    287 #ifdef XP_MAC
    288 NSPR_API(void) PR_Init_Log(void);
    289 #endif
    290 
    291 
    292204PR_END_EXTERN_C
    293205
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/primpl.h

    r101843 r101869  
    5454typedef struct PRSegment PRSegment;
    5555
    56 #ifdef XP_MAC
    57 #include "prosdep.h"
    58 #include "probslet.h"
    59 #else
    6056#include "md/prosdep.h"
    6157#include "obsolete/probslet.h"
    62 #endif  /* XP_MAC */
    6358
    6459#ifdef _PR_HAVE_POSIX_SEMAPHORES
     
    748743#define    _PR_MD_QUERY_FD_INHERITABLE _MD_QUERY_FD_INHERITABLE
    749744
    750 #ifdef XP_BEOS
    751 
    752 extern PRLock *_connectLock;
    753 
    754 typedef struct _ConnectListNode {
    755         PRInt32         osfd;
    756         PRNetAddr       addr;
    757         PRUint32        addrlen;
    758         PRIntervalTime  timeout;
    759 } ConnectListNode;
    760 
    761 extern ConnectListNode connectList[64];
    762 
    763 extern PRUint32 connectCount;
    764 
    765 #endif /* XP_BEOS */
    766 
    767745PR_END_EXTERN_C
    768746
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/prpriv.h

    r1 r101869  
    4343 */
    4444
    45 #ifndef XP_MAC
    4645#include "private/pprio.h"
    4746#include "private/pprthred.h"
    48 #else
    49 #include "pprio.h"
    50 #include "pprthred.h"
    51 #endif
     47
    5248
    5349#endif /* prpriv_h___ */
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