summaryrefslogtreecommitdiff
path: root/www/firefox/patches/patch-bb
blob: 9b9bac61ce20583eb8d1fcf5aa8dc1775ed5c9cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
$NetBSD: patch-bb,v 1.1.1.1 2004/02/29 17:45:02 xtraeme Exp $

--- nsprpub/pr/include/md/_netbsd.h.orig	2004-02-27 14:55:33.000000000 +0900
+++ nsprpub/pr/include/md/_netbsd.h	2004-02-27 15:29:42.000000000 +0900
@@ -48,12 +48,20 @@
 #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"
 #elif defined(__mips__)
 #define _PR_SI_ARCHITECTURE "mips"
 #elif defined(__arm32__)
 #define _PR_SI_ARCHITECTURE "arm32"
+#elif defined(__arm__)
+#define _PR_SI_ARCHITECTURE "arm"
+#elif defined(__armel__)
+#define _PR_SI_ARCHITECTURE "armel"
+#elif defined(__armeb__)
+#define _PR_SI_ARCHITECTURE "armeb"
 #endif
 
 #if defined(__ELF__)
@@ -86,6 +94,12 @@
 #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
@@ -108,7 +122,17 @@
 }
 #define	_MD_GET_SP(_thread)	CONTEXT(_thread)[2]
 #endif
-#ifdef __sparc__
+#ifdef __sparc_v9__
+#define _MD_INIT_CONTEXT(_thread, _sp, _main, status)                  \
+{                                                                      \
+    sigsetjmp(CONTEXT(_thread), 1);                                    \
+    CONTEXT(_thread)[1] = (unsigned char*) ((_sp) - 176 - 0x7ff);      \
+    CONTEXT(_thread)[2] = (long) _main;                                \
+    CONTEXT(_thread)[3] = (long) _main + 4;                            \
+    *status = PR_TRUE;                                                 \
+}
+#define        _MD_GET_SP(_thread)     (CONTEXT(_thread)[2]+0x7ff)
+#elif defined(__sparc__)
 #define _MD_INIT_CONTEXT(_thread, _sp, _main, status)			\
 {									\
     sigsetjmp(CONTEXT(_thread), 1);					\
@@ -150,7 +174,7 @@
 }
 #define	_MD_GET_SP(_thread)	CONTEXT(_thread)[32]
 #endif
-#ifdef __arm32__
+#if defined(__arm32__) || defined(__arm__) || defined(__armel__) || defined(__armeb__)
 #define _MD_INIT_CONTEXT(_thread, _sp, _main, status)			\
 {									\
     sigsetjmp(CONTEXT(_thread), 1);					\