VirtualBox

Changeset 102233 in vbox for trunk/src/libs


Ignore:
Timestamp:
Nov 22, 2023 9:50:12 AM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160358
Message:

libs/xpcom: Remove useless init code in nsprpub, bugref:10545

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

Legend:

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

    r102231 r102233  
    5555PR_BEGIN_EXTERN_C
    5656
    57 NSPR_API(void) _MD_EarlyInit(void);
    58 
    59 #define _MD_EARLY_INIT                  _MD_EarlyInit
    60 #define _MD_FINAL_INIT                  _PR_UnixInit
    61 
    6257#if defined(LINUX) || defined(DARWIN) || defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD)
    6358
  • trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/primpl.h

    r102232 r102233  
    114114/************************************************************************/
    115115
    116 extern void _PR_InitClock(void);
    117 
    118116extern PRBool _pr_initialized;
    119117extern void _PR_ImplicitInitialization(void);
     
    122120* External machine-dependent code provided by each OS.                     *                                                                     *
    123121*************************************************************************/
    124 
    125 /* Initialization related */
    126 extern void _PR_MD_EARLY_INIT(void);
    127 #define    _PR_MD_EARLY_INIT _MD_EARLY_INIT
    128 
    129 extern void _PR_MD_INTERVAL_INIT(void);
    130 #define    _PR_MD_INTERVAL_INIT _MD_INTERVAL_INIT
    131 
    132 NSPR_API(void) _PR_MD_FINAL_INIT(void);
    133 #define    _PR_MD_FINAL_INIT _MD_FINAL_INIT
    134122
    135123/* Time intervals */
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/md/unix/unix.c

    r102225 r102233  
    4646#endif
    4747
    48 sigset_t timer_set;
    49 
    50 void _PR_UnixInit(void)
    51 {
    52     struct sigaction sigact;
    53     int rv;
    54 
    55     sigemptyset(&timer_set);
    56 
    57     sigact.sa_handler = SIG_IGN;
    58     sigemptyset(&sigact.sa_mask);
    59     sigact.sa_flags = 0;
    60     rv = sigaction(SIGPIPE, &sigact, 0);
    61     Assert(0 == rv);
    62 }
    63 
    6448PRIntervalTime _PR_UNIX_GetInterval()
    6549{
     
    7963
    8064/************************************************************************/
    81 
    82 void _MD_EarlyInit(void)
    83 {
    84 #if defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD)
    85     /*
    86      * Ignore FPE because coercion of a NaN to an int causes SIGFPE
    87      * to be raised.
    88      */
    89     struct sigaction act;
    90 
    91     act.sa_handler = SIG_IGN;
    92     sigemptyset(&act.sa_mask);
    93     act.sa_flags = SA_RESTART;
    94     sigaction(SIGFPE, &act, 0);
    95 #endif
    96 }
    9765
    9866#if defined(SOLARIS)
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/misc/prinit.c

    r102215 r102233  
    5353PRBool _pr_initialized = PR_FALSE;
    5454
    55 PRInt32 _native_threads_only = 0;
    56 
    5755static void _PR_InitStuff(void)
    5856{
     
    6462#endif
    6563
    66     /* NOTE: These init's cannot depend on _PR_MD_CURRENT_THREAD() */
    67     _PR_MD_EARLY_INIT();
     64#if defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD)
     65    /*
     66     * Ignore FPE because coercion of a NaN to an int causes SIGFPE
     67     * to be raised.
     68     */
     69    struct sigaction act;
     70
     71    act.sa_handler = SIG_IGN;
     72    sigemptyset(&act.sa_mask);
     73    act.sa_flags = SA_RESTART;
     74    sigaction(SIGFPE, &act, 0);
     75#endif
    6876
    6977    _PR_InitLocks();
    70     _PR_InitClock();
    71 
    72     _PR_MD_FINAL_INIT();
    7378}
    7479
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/misc/prinrval.c

    r102000 r102233  
    4444
    4545#include <iprt/assert.h>
    46 
    47 /*
    48  *-----------------------------------------------------------------------
    49  *
    50  * _PR_InitClock --
    51  *
    52  *
    53  *-----------------------------------------------------------------------
    54  */
    55 
    56 void _PR_InitClock(void)
    57 {
    58     _PR_MD_INTERVAL_INIT();
    59 #ifdef DEBUG
    60     {
    61         PRIntervalTime ticksPerSec = PR_TicksPerSecond();
    62 
    63         Assert(ticksPerSec >= PR_INTERVAL_MIN);
    64         Assert(ticksPerSec <= PR_INTERVAL_MAX);
    65     }
    66 #endif /* DEBUG */
    67 }
    6846
    6947/*
Note: See TracChangeset for help on using the changeset viewer.

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