[commit] r4910 - in freeswitch/trunk/libs: js/nsprpub/pr/src/io js/nsprpub/pr/src/misc js/nsprpub/pr/src/threads win32/js
Author: mikej Date: Tue Apr 10 17:10:42 2007 New Revision: 4910 Modified: freeswitch/trunk/libs/js/nsprpub/pr/src/io/prfdcach.c freeswitch/trunk/libs/js/nsprpub/pr/src/io/prlog.c freeswitch/trunk/libs/js/nsprpub/pr/src/misc/prinit.c freeswitch/trunk/libs/js/nsprpub/pr/src/threads/prcthr.c freeswitch/trunk/libs/win32/js/js.vcproj Log: starting to slim down the nspr build in prep to merge with the libjs build. Modified: freeswitch/trunk/libs/js/nsprpub/pr/src/io/prfdcach.c ============================================================================== --- freeswitch/trunk/libs/js/nsprpub/pr/src/io/prfdcach.c (original) +++ freeswitch/trunk/libs/js/nsprpub/pr/src/io/prfdcach.c Tue Apr 10 17:10:42 2007 @@ -259,8 +259,8 @@ ** be overridden at runtime using environment variables ** or a super-wiz-bang API. */ - const char *low = PR_GetEnv("NSPR_FD_CACHE_SIZE_LOW"); - const char *high = PR_GetEnv("NSPR_FD_CACHE_SIZE_HIGH"); + //const char *low = PR_GetEnv("NSPR_FD_CACHE_SIZE_LOW"); + //const char *high = PR_GetEnv("NSPR_FD_CACHE_SIZE_HIGH"); /* ** _low is allowed to be zero, _high is not. @@ -274,8 +274,8 @@ _pr_fd_cache.limit_high = 0; #endif /* defined(DEBUG) */ - if (NULL != low) _pr_fd_cache.limit_low = atoi(low); - if (NULL != high) _pr_fd_cache.limit_high = atoi(high); + //if (NULL != low) _pr_fd_cache.limit_low = atoi(low); + //if (NULL != high) _pr_fd_cache.limit_high = atoi(high); if (_pr_fd_cache.limit_high < _pr_fd_cache.limit_low) _pr_fd_cache.limit_high = _pr_fd_cache.limit_low; Modified: freeswitch/trunk/libs/js/nsprpub/pr/src/io/prlog.c ============================================================================== --- freeswitch/trunk/libs/js/nsprpub/pr/src/io/prlog.c (original) +++ freeswitch/trunk/libs/js/nsprpub/pr/src/io/prlog.c Tue Apr 10 17:10:42 2007 @@ -204,11 +204,11 @@ void _PR_InitLog(void) { - char *ev; + char *ev = NULL; _pr_logLock = PR_NewLock(); - ev = PR_GetEnv("NSPR_LOG_MODULES"); +// ev = PR_GetEnv("NSPR_LOG_MODULES"); if (ev && ev[0]) { char module[64]; /* Security-Critical: If you change this * size, you must also change the sscanf @@ -255,7 +255,7 @@ } PR_SetLogBuffering(isSync ? bufSize : 0); - ev = PR_GetEnv("NSPR_LOG_FILE"); + //ev = PR_GetEnv("NSPR_LOG_FILE"); if (ev && ev[0]) { if (!PR_SetLogFile(ev)) { #ifdef XP_PC @@ -316,9 +316,9 @@ static void _PR_SetLogModuleLevel( PRLogModuleInfo *lm ) { - char *ev; + char *ev = NULL; - ev = PR_GetEnv("NSPR_LOG_MODULES"); + //ev = PR_GetEnv("NSPR_LOG_MODULES"); if (ev && ev[0]) { char module[64]; /* Security-Critical: If you change this * size, you must also change the sscanf Modified: freeswitch/trunk/libs/js/nsprpub/pr/src/misc/prinit.c ============================================================================== --- freeswitch/trunk/libs/js/nsprpub/pr/src/misc/prinit.c (original) +++ freeswitch/trunk/libs/js/nsprpub/pr/src/misc/prinit.c Tue Apr 10 17:10:42 2007 @@ -202,7 +202,7 @@ _PR_InitSegs(); _PR_InitStacks(); _PR_InitTPD(); - _PR_InitEnv(); + //_PR_InitEnv(); _PR_InitLayerCache(); _PR_InitClock(); @@ -234,20 +234,20 @@ _PR_InitMem(); #endif - _PR_InitCMon(); + //_PR_InitCMon(); _PR_InitIO(); - _PR_InitNet(); + //_PR_InitNet(); _PR_InitLog(); - _PR_InitLinker(); + //_PR_InitLinker(); _PR_InitCallOnce(); - _PR_InitDtoa(); + //_PR_InitDtoa(); _PR_InitMW(); - _PR_InitRWLocks(); + //_PR_InitRWLocks(); - nspr_InitializePRErrorTable(); + //nspr_InitializePRErrorTable(); #if !defined(_PR_INET6) || defined(_PR_INET6_PROBE) - _pr_init_ipv6(); + //_pr_init_ipv6(); #endif _PR_MD_FINAL_INIT(); @@ -420,9 +420,9 @@ #endif _PR_CleanupMW(); - _PR_CleanupDtoa(); + //_PR_CleanupDtoa(); _PR_CleanupCallOnce(); - _PR_ShutdownLinker(); + //_PR_ShutdownLinker(); /* Release the primordial thread's private data, etc. */ _PR_CleanupThread(me); @@ -452,7 +452,7 @@ * Ideally, for each _PR_InitXXX(), there should be a corresponding * _PR_XXXCleanup() that we can call here. */ - _PR_CleanupNet(); + //_PR_CleanupNet(); _PR_CleanupIO(); #ifdef WINNT _PR_CleanupCPUs(); @@ -461,7 +461,7 @@ PR_DestroyLock(_pr_sleeplock); _pr_sleeplock = NULL; _PR_CleanupLayerCache(); - _PR_CleanupEnv(); + //_PR_CleanupEnv(); _PR_CleanupStacks(); _PR_CleanupBeforeExit(); _pr_initialized = PR_FALSE; @@ -543,25 +543,6 @@ } } -/* - * OBSOLETE - */ -PR_IMPLEMENT(void) -PR_SetStdioRedirect( - PRProcessAttr *attr, - PRSpecialFD stdioFd, - PRFileDesc *redirectFd) -{ -#if defined(DEBUG) - static PRBool warn = PR_TRUE; - if (warn) { - warn = _PR_Obsolete("PR_SetStdioRedirect()", - "PR_ProcessAttrSetStdioRedirect()"); - } -#endif - PR_ProcessAttrSetStdioRedirect(attr, stdioFd, redirectFd); -} - PR_IMPLEMENT(PRStatus) PR_ProcessAttrSetCurrentDirectory( PRProcessAttr *attr, @@ -659,75 +640,6 @@ return PR_SUCCESS; } -PR_IMPLEMENT(PRFileDesc *) PR_GetInheritedFD( - const char *name) -{ - PRFileDesc *fd; - const char *envVar; - const char *ptr; - int len = strlen(name); - PROsfd osfd; - int nColons; - PRIntn fileType; - - envVar = PR_GetEnv("NSPR_INHERIT_FDS"); - if (NULL == envVar || '\0' == envVar[0]) { - PR_SetError(PR_UNKNOWN_ERROR, 0); - return NULL; - } - - ptr = envVar; - while (1) { - if ((ptr[len] == ':') && (strncmp(ptr, name, len) == 0)) { - ptr += len + 1; - PR_sscanf(ptr, "%d:0x%" PR_SCNxOSFD, &fileType, &osfd); - switch ((PRDescType)fileType) { - case PR_DESC_FILE: - fd = PR_ImportFile(osfd); - break; - case PR_DESC_PIPE: - fd = PR_ImportPipe(osfd); - break; - case PR_DESC_SOCKET_TCP: - fd = PR_ImportTCPSocket(osfd); - break; - case PR_DESC_SOCKET_UDP: - fd = PR_ImportUDPSocket(osfd); - break; - default: - PR_ASSERT(0); - PR_SetError(PR_UNKNOWN_ERROR, 0); - fd = NULL; - break; - } - if (fd) { - /* - * An inherited FD is inheritable by default. - * The child process needs to call PR_SetFDInheritable - * to make it non-inheritable if so desired. - */ - fd->secret->inheritable = _PR_TRI_TRUE; - } - return fd; - } - /* Skip three colons */ - nColons = 0; - while (*ptr) { - if (*ptr == ':') { - if (++nColons == 3) { - break; - } - } - ptr++; - } - if (*ptr == '\0') { - PR_SetError(PR_UNKNOWN_ERROR, 0); - return NULL; - } - ptr++; - } -} - PR_IMPLEMENT(PRProcess*) PR_CreateProcess( const char *path, char *const *argv, @@ -851,20 +763,6 @@ return once->status; } -PRBool _PR_Obsolete(const char *obsolete, const char *preferred) -{ -#if defined(DEBUG) -#ifndef XP_MAC - PR_fprintf( - PR_STDERR, "'%s' is obsolete. Use '%s' instead.\n", - obsolete, (NULL == preferred) ? "something else" : preferred); -#else -#pragma unused (obsolete, preferred) -#endif -#endif - return PR_FALSE; -} /* _PR_Obsolete */ - /* prinit.c */ Modified: freeswitch/trunk/libs/js/nsprpub/pr/src/threads/prcthr.c ============================================================================== --- freeswitch/trunk/libs/js/nsprpub/pr/src/threads/prcthr.c (original) +++ freeswitch/trunk/libs/js/nsprpub/pr/src/threads/prcthr.c Tue Apr 10 17:10:42 2007 @@ -73,14 +73,6 @@ thread->environment = NULL; } -PR_IMPLEMENT(PRStatus) PR_Yield() -{ - static PRBool warning = PR_TRUE; - if (warning) warning = _PR_Obsolete( - "PR_Yield()", "PR_Sleep(PR_INTERVAL_NO_WAIT)"); - return (PR_Sleep(PR_INTERVAL_NO_WAIT)); -} - /* ** Make the current thread sleep until "timeout" ticks amount of time ** has expired. If "timeout" is PR_INTERVAL_NO_WAIT then the call is Modified: freeswitch/trunk/libs/win32/js/js.vcproj ============================================================================== --- freeswitch/trunk/libs/win32/js/js.vcproj (original) +++ freeswitch/trunk/libs/win32/js/js.vcproj Tue Apr 10 17:10:42 2007 @@ -693,84 +693,107 @@ Name="NSPR Source" > <File - RelativePath="..\..\js\nsprpub\pr\src\md\windows\ntgc.c" - > - </File> - <File RelativePath="..\..\js\nsprpub\pr\src\md\windows\ntinrval.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\md\windows\ntio.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\md\windows\ntmisc.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\md\windows\ntsec.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\md\windows\ntsem.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\md\windows\ntthread.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\pralarm.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\misc\pratom.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\threads\prcmon.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prcountr.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\threads\prcthr.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\io\prdir.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prdtoa.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\threads\prdump.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prenv.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prerr.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\misc\prerror.c" > </File> <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prerrortable.c" - > - </File> - <File RelativePath="..\..\js\nsprpub\pr\src\io\prfdcach.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\io\prfile.c" @@ -779,78 +802,101 @@ <File RelativePath="..\..\js\nsprpub\pr\src\misc\prinit.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\misc\prinrval.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\io\prio.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\io\priometh.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\pripc.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\pripcsem.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\io\pripv6.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\io\prlayer.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\linking\prlink.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\io\prlog.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prlog2.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prlong.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\malloc\prmalloc.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\io\prmapopt.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\malloc\prmem.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\io\prmmap.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\threads\prmon.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\io\prmwait.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prnetdb.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\misc\prolock.c" @@ -859,82 +905,79 @@ <File RelativePath="..\..\js\nsprpub\pr\src\md\prosdep.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\io\prpolevt.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\io\prprf.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prrng.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\threads\prrwlock.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\io\prscanf.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\memory\prseg.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\threads\prsem.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\memory\prshm.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\memory\prshma.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\io\prsocket.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\io\prstdio.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prsystem.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prthinfo.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\misc\prtime.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\threads\prtpd.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prtpool.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\misc\prtrace.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\threads\combined\prucpu.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\threads\combined\prucv.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\threads\combined\prulock.c" @@ -943,26 +986,35 @@ <File RelativePath="..\..\js\nsprpub\pr\src\threads\combined\prustack.c" > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\threads\combined\pruthr.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\md\windows\w32ipcsem.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\md\windows\w32poll.c" > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\md\windows\w32rng.c" - > - </File> - <File - RelativePath="..\..\js\nsprpub\pr\src\md\windows\w32shm.c" - > + <FileConfiguration + Name="Debug|Win32" + > + <Tool + Name="VCCLCompilerTool" + /> + </FileConfiguration> </File> <File RelativePath="..\..\js\nsprpub\pr\src\md\windows\win32_errors.c"
participants (1)
-
Freeswitch SVN