summaryrefslogtreecommitdiff
path: root/www/mozilla/patches/patch-ad
diff options
context:
space:
mode:
Diffstat (limited to 'www/mozilla/patches/patch-ad')
-rw-r--r--www/mozilla/patches/patch-ad128
1 files changed, 111 insertions, 17 deletions
diff --git a/www/mozilla/patches/patch-ad b/www/mozilla/patches/patch-ad
index 1eec0ab271e..e26afb89b96 100644
--- a/www/mozilla/patches/patch-ad
+++ b/www/mozilla/patches/patch-ad
@@ -1,25 +1,119 @@
-$NetBSD: patch-ad,v 1.11 2000/10/23 17:40:07 mycroft Exp $
+$NetBSD: patch-ad,v 1.12 2000/10/26 07:50:00 mycroft Exp $
---- nsprpub/pr/include/md/_netbsd.h.orig Mon Oct 23 17:05:49 2000
-+++ nsprpub/pr/include/md/_netbsd.h Mon Oct 23 15:58:45 2000
-@@ -70,8 +70,10 @@
+--- nsprpub/pr/include/md/_netbsd.h.orig Thu Jul 6 20:46:02 2000
++++ nsprpub/pr/include/md/_netbsd.h Thu Oct 26 07:32:35 2000
+@@ -70,39 +70,86 @@
#define CONTEXT(_th) ((_th)->md.context)
-#if defined(__i386__) || defined(__sparc__) || defined(__m68k__) || defined(__powerpc__)
-+#if defined(__i386__) || defined(__sparc__) || defined(__m68k__)
- #define JB_SP_INDEX 2
-+#elif defined(__powerpc__)
-+#define JB_SP_INDEX 3
- #elif defined(__mips__)
- #define JB_SP_INDEX 4
- #elif defined(__alpha__)
-@@ -101,7 +103,7 @@
- if (sigsetjmp(CONTEXT(_thread), 1)) { \
- _main(); \
- } \
+-#define JB_SP_INDEX 2
+-#elif defined(__mips__)
+-#define JB_SP_INDEX 4
+-#elif defined(__alpha__)
+-#define JB_SP_INDEX 34
+-#elif defined(__arm32__)
+ /*
+- * On the arm32, the jmpbuf regs underwent a name change after NetBSD 1.3.
+- */
+-#ifdef JMPBUF_REG_R13
+-#define JB_SP_INDEX JMPBUF_REG_R13
+-#else
+-#define JB_SP_INDEX _JB_REG_R13
++** Initialize a thread context to run "_main()" when started
++*/
++#ifdef __i386__
++#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
++{ \
++ sigsetjmp(CONTEXT(_thread), 1); \
++ CONTEXT(_thread)[2] = (unsigned char*) ((_sp) - 128); \
++ CONTEXT(_thread)[0] = (int) _main; \
++ *status = PR_TRUE; \
++}
++#define _MD_GET_SP(_thread) CONTEXT(_thread)[2]
++#endif
++#ifdef __sparc__
++#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
++{ \
++ sigsetjmp(CONTEXT(_thread), 1); \
++ CONTEXT(_thread)[2] = (unsigned char*) ((_sp) - 128); \
++ CONTEXT(_thread)[3] = (int) _main; \
++ CONTEXT(_thread)[4] = (int) _main + 4; \
++ *status = PR_TRUE; \
++}
++#define _MD_GET_SP(_thread) CONTEXT(_thread)[2]
++#endif
++#ifdef __powerpc__
++#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
++{ \
++ sigsetjmp(CONTEXT(_thread), 1); \
++ CONTEXT(_thread)[3] = (unsigned char*) ((_sp) - 128); \
++ CONTEXT(_thread)[4] = (int) _main; \
++ *status = PR_TRUE; \
++}
++#define _MD_GET_SP(_thread) CONTEXT(_thread)[3]
++#endif
++#ifdef __m68k__ /* XXX UNTESTED */
++#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
++{ \
++ sigsetjmp(CONTEXT(_thread), 1); \
++ CONTEXT(_thread)[2] = (unsigned char*) ((_sp) - 128); \
++ CONTEXT(_thread)[5] = (int) _main; \
++ *status = PR_TRUE; \
++}
++#define _MD_GET_SP(_thread) CONTEXT(_thread)[2]
++#endif
++#ifdef __mips__ /* XXX UNTESTED */
++#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
++{ \
++ sigsetjmp(CONTEXT(_thread), 1); \
++ CONTEXT(_thread)[32] = (unsigned char*) ((_sp) - 128); \
++ CONTEXT(_thread)[2] = (int) _main; \
++ *status = PR_TRUE; \
++}
++#define _MD_GET_SP(_thread) CONTEXT(_thread)[32]
++#endif
++#ifdef __arm32__ /* XXX UNTESTED */
++#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
++{ \
++ sigsetjmp(CONTEXT(_thread), 1); \
++ CONTEXT(_thread)[23] = (unsigned char*) ((_sp) - 128); \
++ CONTEXT(_thread)[24] = (int) _main; \
++ *status = PR_TRUE; \
++}
++#define _MD_GET_SP(_thread) CONTEXT(_thread)[23]
++#endif
++#ifdef __alpha__ /* XXX UNTESTED */
++#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
++{ \
++ sigsetjmp(CONTEXT(_thread), 1); \
++ CONTEXT(_thread)[34] = (unsigned char*) ((_sp) - 128); \
++ CONTEXT(_thread)[2] = (long) _main; \
++ CONTEXT(_thread)[30] = (long) _main; \
++ *status = PR_TRUE; \
++}
++#define _MD_GET_SP(_thread) CONTEXT(_thread)[34]
+ #endif
+-#else
+-#error "Need to define SP index in jmp_buf here"
++#ifndef _MD_INIT_CONTEXT
++#error "Need to define _MD_INIT_CONTEXT for this platform"
+ #endif
+-#define _MD_GET_SP(_th) (_th)->md.context[JB_SP_INDEX]
+
+ #define PR_NUM_GCREGS _JBLEN
+-
+-/*
+-** Initialize a thread context to run "_main()" when started
+-*/
+-#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
+-{ \
+- *status = PR_TRUE; \
+- if (sigsetjmp(CONTEXT(_thread), 1)) { \
+- _main(); \
+- } \
- _MD_GET_SP(_thread) = (unsigned char*) ((_sp) - 64); \
-+ _MD_GET_SP(_thread) = (unsigned char*) ((_sp) - 128); \
- }
+-}
#define _MD_SWITCH_CONTEXT(_thread) \
+ if (!sigsetjmp(CONTEXT(_thread), 1)) { \