Bug 470528: We really don't want to use getproto reentrant functions.
authorwtc%google.com
Sat, 20 Dec 2008 06:15:23 +0000
changeset 4024 678f3e80a3a9d279d6c751504a359aa6abfd9715
parent 4023 5c30d636e388d02a69dddde56e6d9fd9fc9bb420
child 4025 6501a881b3f8032a0acfd37fdb4fdf851ff1502c
push idunknown
push userunknown
push dateunknown
bugs470528
Bug 470528: We really don't want to use getproto reentrant functions. Also, add missing extern declarations. Based on patch-ab, rev. 1.4, by bjs in http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/devel/nspr/patches/patch-ab. r=wtc.
pr/include/md/_netbsd.h
--- a/pr/include/md/_netbsd.h
+++ b/pr/include/md/_netbsd.h
@@ -42,16 +42,18 @@
 #include <sys/param.h>  /* for __NetBSD_Version__ */
 
 #define PR_LINKER_ARCH	"netbsd"
 #define _PR_SI_SYSNAME  "NetBSD"
 #if defined(__i386__)
 #define _PR_SI_ARCHITECTURE "x86"
 #elif defined(__alpha__)
 #define _PR_SI_ARCHITECTURE "alpha"
+#elif defined(__amd64__)
+#define _PR_SI_ARCHITECTURE "amd64"
 #elif defined(__m68k__)
 #define _PR_SI_ARCHITECTURE "m68k"
 #elif defined(__powerpc__)
 #define _PR_SI_ARCHITECTURE "powerpc"
 #elif defined(__sparc_v9__)
 #define _PR_SI_ARCHITECTURE "sparc64"
 #elif defined(__sparc__)
 #define _PR_SI_ARCHITECTURE "sparc"
@@ -87,22 +89,16 @@
 #if __NetBSD_Version__ >= 105000000
 #define _PR_INET6
 #define _PR_HAVE_INET_NTOP
 #define _PR_HAVE_GETHOSTBYNAME2
 #define _PR_HAVE_GETADDRINFO
 #define _PR_INET6_PROBE
 #endif
 
-#if __NetBSD_Version__ >= 106370000
-/* NetBSD 1.6ZK */
-#define _PR_HAVE_GETPROTO_R
-#define _PR_HAVE_GETPROTO_R_INT
-#endif
-
 #define USE_SETJMP
 
 #ifndef _PR_PTHREADS
 #include <setjmp.h>
 
 #define PR_CONTEXT_TYPE	sigjmp_buf
 
 #define CONTEXT(_th) ((_th)->md.context)
@@ -238,16 +234,20 @@ struct _MDCPU {
 #define _MD_INIT_THREAD                 _MD_InitializeThread
 #define _MD_EXIT_THREAD(thread)
 #define _MD_SUSPEND_THREAD(thread)      _MD_suspend_thread
 #define _MD_RESUME_THREAD(thread)       _MD_resume_thread
 #define _MD_CLEAN_THREAD(_thread)
 
 #endif /* ! _PR_PTHREADS */
 
+extern void _MD_EarlyInit(void);
+extern PRIntervalTime _PR_UNIX_GetInterval(void);
+extern PRIntervalTime _PR_UNIX_TicksPerSecond(void);
+
 #define _MD_EARLY_INIT                  _MD_EarlyInit
 #define _MD_FINAL_INIT			_PR_UnixInit
 #define _MD_GET_INTERVAL                  _PR_UNIX_GetInterval
 #define _MD_INTERVAL_PER_SEC              _PR_UNIX_TicksPerSecond
 
 /*
  * We wrapped the select() call.  _MD_SELECT refers to the built-in,
  * unwrapped version.