httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject nspr patch
Date Thu, 30 Apr 1998 08:29:27 GMT
BTW, here's the patch I'm using for NSPR... it just cleans up a few things
in the .h files so that they don't generate warnings when compiling
against it. 

There's also some bug with it trying to do a dlopen(0,foo) when compiled
-static.  When that fails (it will) it aborts the app.  That kinda sucks. 
I'm not using the dynamic loading abstraction yet so I just kludge it to
get past that point... not a permanent solution by any means. 

Dean

--- 19980429/mozilla/nsprpub/pr/src/misc/prtime.c.predg	Sat May  2 00:12:47 1998
+++ 19980429/mozilla/nsprpub/pr/src/misc/prtime.c	Sat May  2 00:12:59 1998
@@ -1609,7 +1609,7 @@
  */
 
 PR_IMPLEMENT(PRUint32)
-PR_FormatTime(char *buf, int buflen, char *fmt, const PRExplodedTime *tm)
+PR_FormatTime(char *buf, int buflen, const char *fmt, const PRExplodedTime *tm)
 {
     struct tm a;
     a.tm_sec = tm->tm_sec;
--- 19980429/mozilla/nsprpub/pr/src/linking/prlink.c.predg	Wed Apr 29 11:58:08 1998
+++ 19980429/mozilla/nsprpub/pr/src/linking/prlink.c	Fri May  1 19:25:13 1998
@@ -153,6 +153,11 @@
 #ifdef HAVE_DLL
 #ifdef USE_DLFCN
     h = dlopen(0, RTLD_LAZY);
+	/* DJG XXX: with this code enabled, you can't link -static on linux
+	 * with glibc.  It really shouldn't be a fatal error anyhow -- it
+	 * shouldn't die until these functions are used in some way.
+	 */
+#if 0
 	if (!h) {
 		char *error;
 		
@@ -164,6 +169,7 @@
 		PR_DELETE(error);
 	    abort();/* XXX */
 	}
+#endif
 #elif defined(USE_HPSHL)
 	h = NULL;
 	/* don't abort with this NULL */
--- 19980429/mozilla/nsprpub/pr/include/prthread.h.predg	Wed Apr 29 11:58:00 1998
+++ 19980429/mozilla/nsprpub/pr/include/prthread.h	Fri May  1 19:17:50 1998
@@ -194,7 +194,7 @@
 **
 ** This can return PR_FAILURE if index is invalid.
 */
-PR_EXTERN(PRStatus) PR_SetThreadPrivate(PRUintn index, void *priv);
+PR_EXTERN(PRStatus) PR_SetThreadPrivate(PRUintn pr_index, void *priv);
 
 /*
 ** Recover the per-thread-private data for the current thread. "index" is
@@ -205,7 +205,7 @@
 **
 ** A thread can only get access to its own thread-specific-data.
 */
-PR_EXTERN(void*) PR_GetThreadPrivate(PRUintn index);
+PR_EXTERN(void*) PR_GetThreadPrivate(PRUintn pr_index);
 
 /*
 ** This routine sets the interrupt request for a target thread. The interrupt
--- 19980429/mozilla/nsprpub/pr/include/prinit.h.predg	Wed Apr 29 11:58:00 1998
+++ 19980429/mozilla/nsprpub/pr/include/prinit.h	Fri May  1 19:22:28 1998
@@ -163,14 +163,14 @@
  * It takes a PRIntn argument, which is the exit status code of the
  * process.
  */
-PR_EXTERN(void) PR_ProcessExit(PRIntn status);
+PR_EXTERN(void) PR_ProcessExit(PRIntn status) PR_GNUC_ATTRIBUTE((noreturn));
 
 /*
 ** Abort the process in a non-graceful manner. This will cause a core file,
 ** call to the debugger or other moral equivalent as well as causing the
 ** entire process to stop.
 */
-PR_EXTERN(void) PR_Abort(void);
+PR_EXTERN(void) PR_Abort(void) PR_GNUC_ATTRIBUTE((noreturn));
 
 /*
  ****************************************************************
--- 19980429/mozilla/nsprpub/pr/include/prtypes.h.predg	Wed Apr 29 11:58:00 1998
+++ 19980429/mozilla/nsprpub/pr/include/prtypes.h	Fri May  1 19:22:13 1998
@@ -376,6 +376,13 @@
 #include "obsolete/protypes.h"
 #endif
 
+#if !defined(__GNUC__) || __GNUC__ < 2 || __GNUC_MINOR__ < 7
+#define PR_GNUC_ATTRIBUTE(__x)
+#else
+#define PR_GNUC_ATTRIBUTE(__x) __attribute__(__x)
+#endif
+
+
 PR_END_EXTERN_C
 
 #endif /* prtypes_h___ */
--- 19980429/mozilla/nsprpub/pr/include/prtime.h.predg	Wed Apr 29 11:58:00 1998
+++ 19980429/mozilla/nsprpub/pr/include/prtime.h	Fri May  1 19:28:01 1998
@@ -261,7 +261,7 @@
 #ifndef NO_NSPR_10_SUPPORT
 
 /* Format a time value into a buffer. Same semantics as strftime() */
-PR_EXTERN(PRUint32) PR_FormatTime(char *buf, int buflen, char *fmt, 
+PR_EXTERN(PRUint32) PR_FormatTime(char *buf, int buflen, const char *fmt, 
                                            const PRExplodedTime *tm);
 
 /* Format a time value into a buffer. Time is always in US English format, regardless



Mime
View raw message