Part deux of the fix for #8491. Had to add the ability to externally re-init NSPR's log feature as we were reading the environemnt vars on the Mac after the initial init. Reviewed saari. SeaMonkey_M8_BASE
authorsdagley%netscape.com
Fri, 09 Jul 1999 04:03:51 +0000
changeset 691 7a47bb0160ca9f0829c81714f384b7e93c85ca72
parent 690 191dcb7494cec927ce27165f14a25d25ddf60f94
child 692 a268c61a1d00143e2f2d4ff807b67641cd4d091a
child 704 3d1a2d7e494442b75b7d84b26b987edee4e982c0
push idunknown
push userunknown
push dateunknown
Part deux of the fix for #8491. Had to add the ability to externally re-init NSPR's log feature as we were reading the environemnt vars on the Mac after the initial init. Reviewed saari.
pr/include/prlog.h
pr/src/io/prlog.c
--- a/pr/include/prlog.h
+++ b/pr/include/prlog.h
@@ -165,16 +165,22 @@ PR_EXTERN(void) PR_SetLogBuffering(PRInt
 */
 PR_EXTERN(void) PR_LogPrint(const char *fmt, ...);
 
 /*
 ** Flush the log to its file.
 */
 PR_EXTERN(void) PR_LogFlush(void);
 
+/* Need external access to this on Mac so we can first set up our faux environment vars */
+#ifdef XP_MAC
+PR_EXTERN(void) PR_Init_Log(void);
+#endif
+
+
 /*
 ** Windoze 16 can't support a large static string space for all of the
 ** various debugging strings so logging is not enabled for it.
 */
 #if (defined(DEBUG) || defined(FORCE_PR_LOG)) && !defined(WIN16)
 #define PR_LOGGING 1
 
 #define PR_LOG_TEST(_module,_level) \
--- a/pr/src/io/prlog.c
+++ b/pr/src/io/prlog.c
@@ -476,8 +476,17 @@ PR_IMPLEMENT(void) PR_Assert(const char 
 #ifdef WIN32
     DebugBreak();
 #endif
 #ifndef XP_MAC
     abort();
 #endif
 #endif /* PR_LOGGING */
 }
+
+#ifdef XP_MAC
+PR_IMPLEMENT(void) PR_Init_Log(void)
+{
+#ifdef PR_LOGGING
+	_PR_InitLog();
+#endif
+}
+#endif