VirtualBox

Ignore:
Timestamp:
Nov 8, 2023 12:01:00 PM (16 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
160059
Message:

libs/xpcom: Convert PR_GetEnv/PR_SetEnv to IPRT RTEnv* API, bugref:10545

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

Legend:

Unmodified
Added
Removed
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/io/prfdcach.c

    r1 r101962  
    254254void _PR_InitFdCache(void)
    255255{
    256     /*
    257     ** The fd caching is enabled by default for DEBUG builds,
    258     ** disabled by default for OPT builds. That default can
    259     ** be overridden at runtime using environment variables
    260     ** or a super-wiz-bang API.
    261     */
    262     const char *low = PR_GetEnv("NSPR_FD_CACHE_SIZE_LOW");
    263     const char *high = PR_GetEnv("NSPR_FD_CACHE_SIZE_HIGH");
    264 
    265256    /*
    266257    ** _low is allowed to be zero, _high is not.
     
    275266#endif  /* defined(DEBUG) */
    276267
    277     if (NULL != low) _pr_fd_cache.limit_low = atoi(low);
    278     if (NULL != high) _pr_fd_cache.limit_high = atoi(high);
    279 
    280268    if (_pr_fd_cache.limit_high < _pr_fd_cache.limit_low)
    281269        _pr_fd_cache.limit_high = _pr_fd_cache.limit_low;
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/io/prlog.c

    r101869 r101962  
    5555#endif
    5656#ifdef VBOX_USE_IPRT_IN_NSPR
     57# include <iprt/env.h>
    5758# include <iprt/string.h>
    5859#endif
     
    146147    _pr_logLock = PR_NewLock();
    147148
    148     ev = PR_GetEnv("NSPR_LOG_MODULES");
     149    ev = RTEnvGet("NSPR_LOG_MODULES");
    149150    if (ev && ev[0]) {
    150151        char module[64];  /* Security-Critical: If you change this
     
    193194        PR_SetLogBuffering(isSync ? bufSize : 0);
    194195
    195         ev = PR_GetEnv("NSPR_LOG_FILE");
     196        ev = RTEnvGet("NSPR_LOG_FILE");
    196197        if (ev && ev[0]) {
    197198            if (!PR_SetLogFile(ev)) {
     
    255256    char *ev;
    256257
    257     ev = PR_GetEnv("NSPR_LOG_MODULES");
     258    ev = RTEnvGet("NSPR_LOG_MODULES");
    258259    if (ev && ev[0]) {
    259260        char module[64];  /* Security-Critical: If you change this
  • trunk/src/libs/xpcom18a4/nsprpub/pr/src/misc/prinit.c

    r101961 r101962  
    295295    PRIntn fileType;
    296296
    297     envVar = PR_GetEnv("NSPR_INHERIT_FDS");
     297    envVar = RTEnvGet("NSPR_INHERIT_FDS");
    298298    if (NULL == envVar || '\0' == envVar[0]) {
    299299        PR_SetError(PR_UNKNOWN_ERROR, 0);
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