public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo commit in src/patchsets/mozilla-firefox/2.0.0.11: 000_flex-configure-LANG.patch 001_firefox-arm.patch 002_firefox-libdeps.patch 003_firefox-bus-error.patch 004_mozilla-hppa.patch 005_mozilla-firefox-1.5-ia64.patch 006_mips-asm.patch 007_mozilla-firefox-1.5-asneeded.patch 008_firefox-pkgconfig-1.patch 010_visibility-gcc-4.2.patch 032_firefox-2.0_ppc64-1.patch 033_firefox-2.0_ppc_powerpc.patch 050_respect-host-variable.patch 055_firefox-2.0_gfbsd-pthreads.patch 060_embed-typeaheadfind-1.patch 063_firefox-rpath-3.patch 064_firefox-nsplugins-v2.patch 401_firefox-1.5-theme-change.patch 402_firefox-2.0-pango-cursor.patch 803_fbsd-3.patch
@ 2007-12-03 21:52 Raul Porcel (armin76)
  0 siblings, 0 replies; only message in thread
From: Raul Porcel (armin76) @ 2007-12-03 21:52 UTC (permalink / raw
  To: gentoo-commits

armin76     07/12/03 21:52:01

  Added:                000_flex-configure-LANG.patch 001_firefox-arm.patch
                        002_firefox-libdeps.patch
                        003_firefox-bus-error.patch 004_mozilla-hppa.patch
                        005_mozilla-firefox-1.5-ia64.patch
                        006_mips-asm.patch
                        007_mozilla-firefox-1.5-asneeded.patch
                        008_firefox-pkgconfig-1.patch
                        010_visibility-gcc-4.2.patch
                        032_firefox-2.0_ppc64-1.patch
                        033_firefox-2.0_ppc_powerpc.patch
                        050_respect-host-variable.patch
                        055_firefox-2.0_gfbsd-pthreads.patch
                        060_embed-typeaheadfind-1.patch
                        063_firefox-rpath-3.patch
                        064_firefox-nsplugins-v2.patch
                        401_firefox-1.5-theme-change.patch
                        402_firefox-2.0-pango-cursor.patch 803_fbsd-3.patch
  Log:
  Add patches for 2.0.0.11

Revision  Changes    Path
1.1                  src/patchsets/mozilla-firefox/2.0.0.11/000_flex-configure-LANG.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/000_flex-configure-LANG.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/000_flex-configure-LANG.patch?rev=1.1&content-type=text/plain

Index: 000_flex-configure-LANG.patch
===================================================================
The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in 
option parsing, it may break.

http://bugs.gentoo.org/103483

--- configure
+++ configure
@@ -54,6 +54,16 @@
 infodir='${prefix}/info'
 mandir='${prefix}/man'
 
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
 # Initialize some other variables.
 subdirs=
 MFLAGS= MAKEFLAGS=
@@ -452,16 +463,6 @@
   esac
 done
 
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
 # confdefs.h avoids OS command line length limits that DEFS can exceed.
 rm -rf conftest* confdefs.h
 # AIX cpp loses on an empty file, so make sure it contains at least a newline.



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/001_firefox-arm.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/001_firefox-arm.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/001_firefox-arm.patch?rev=1.1&content-type=text/plain

Index: 001_firefox-arm.patch
===================================================================
# Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=336183

--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp	2006-05-17 02:02:51.000000000 -0400
+++ mozilla-16052006/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp	2006-05-17 01:17:16.000000000 -0400
@@ -39,18 +39,31 @@
 /* Implement shared vtbl methods. */
 
 #include "xptcprivate.h"
 
 #if !defined(LINUX) || !defined(__arm__)
 #error "This code is for Linux ARM only. Please check if it works for you, too.\nDepends strongly on gcc behaviour."
 #endif
 
+#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
+/* This tells gcc3.4+ not to optimize away symbols.
+ * @see http://gcc.gnu.org/gcc-3.4/changes.html
+ */
+#define DONT_DROP_OR_WARN __attribute__((used))
+#else
+/* This tells older gccs not to warn about unused vairables.
+ * @see http://docs.freebsd.org/info/gcc/gcc.info.Variable_Attributes.html
+ */
+#define DONT_DROP_OR_WARN __attribute__((unused))
+#endif
+
 /* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol.  */
-static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch");
+static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch") 
+DONT_DROP_OR_WARN;
 
 static nsresult
 PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
 {
 #define PARAM_BUFFER_COUNT     16
 
     nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
     nsXPTCMiniVariant* dispatchParams = NULL;



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/002_firefox-libdeps.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/002_firefox-libdeps.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/002_firefox-libdeps.patch?rev=1.1&content-type=text/plain

Index: 002_firefox-libdeps.patch
===================================================================
# Linking issue with pango
#
#  https://bugzilla.mozilla.org/show_bug.cgi?id=344821

--- mozilla/layout/build/Makefile.in.orig	2006-07-16 00:24:51.000000000 +1000
+++ mozilla/layout/build/Makefile.in	2006-07-16 00:35:51.000000000 +1000
@@ -213,6 +213,12 @@
 		$(NULL)
 endif
 
+ifdef MOZ_ENABLE_CANVAS
+ifdef MOZ_ENABLE_XFT
+EXTRA_DSO_LDOPTS += $(MOZ_XFT_LIBS)
+endif
+endif
+
 ifdef NS_TRACE_MALLOC
 EXTRA_DSO_LIBS	+= tracemalloc
 endif



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/003_firefox-bus-error.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/003_firefox-bus-error.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/003_firefox-bus-error.patch?rev=1.1&content-type=text/plain

Index: 003_firefox-bus-error.patch
===================================================================
diff -aur a/gfx/src/gtk/nsFontMetricsPango.cpp b/gfx/src/gtk/nsFontMetricsPango.cpp
--- a/gfx/src/gtk/nsFontMetricsPango.cpp	2006-02-23 13:01:42.000000000 -0800
+++ b/gfx/src/gtk/nsFontMetricsPango.cpp	2006-05-20 20:27:50.000000000 -0700
@@ -535,8 +535,13 @@
 
     PangoLayout *layout = pango_layout_new(mPangoContext);
 
-    gchar *text = g_utf16_to_utf8(aString, aLength,
+    // Just copy the aString to ensure the alignment,
+    // it is not used anywhere else.
+    PRUnichar* dummy = new PRUnichar[aLength];
+    memcpy(dummy, aString, aLength*sizeof(PRUnichar));
+    gchar *text = g_utf16_to_utf8(dummy, aLength,
                                   NULL, NULL, NULL);
+    delete [] dummy;
 
     if (!text) {
 #ifdef DEBUG
diff -aur a/intl/lwbrk/src/nsJISx4501LineBreaker.cpp b/intl/lwbrk/src/nsJISx4501LineBreaker.cpp
--- a/intl/lwbrk/src/nsJISx4501LineBreaker.cpp	2004-04-18 07:21:07.000000000 -0700
+++ b/intl/lwbrk/src/nsJISx4501LineBreaker.cpp	2006-05-20 20:27:51.000000000 -0700
@@ -487,13 +487,13 @@
   PRUint32 cur;
   for (cur = aPos; cur < aLen; ++cur)
   {
-    if (IS_SPACE(aText[cur]))
+    if (IS_SPACE(GetUnichar(&aText[cur])))
     {
       *oNext = cur;
       *oNeedMoreText = PR_FALSE;
       return NS_OK;
     }
-    if (IS_CJK_CHAR(aText[cur]))
+    if (IS_CJK_CHAR(GetUnichar(&aText[cur])))
       goto ROUTE_CJK_NEXT;
   }
   *oNext = aLen;
@@ -503,13 +503,13 @@
 ROUTE_CJK_NEXT:
   PRInt8 c1, c2;
   cur = aPos;
-  if(NEED_CONTEXTUAL_ANALYSIS(aText[cur]))
+  if(NEED_CONTEXTUAL_ANALYSIS(GetUnichar(&aText[cur])))
   {
-    c1 = this->ContextualAnalysis((cur>0)?aText[cur-1]:0,
-                                  aText[cur],
-                                  (cur<(aLen-1)) ?aText[cur+1]:0);
+    c1 = this->ContextualAnalysis((cur>0)?GetUnichar(&aText[cur-1]):0,
+                                  GetUnichar(&aText[cur]),
+                                  (cur<(aLen-1)) ?GetUnichar(&aText[cur+1]):0);
   } else  {
-    c1 = this->GetClass(aText[cur]);
+    c1 = this->GetClass(GetUnichar(&aText[cur]));
   }
   
   if(CLASS_THAI == c1) 
@@ -521,13 +521,13 @@
 
   for(cur++; cur <aLen; cur++)
   {
-     if(NEED_CONTEXTUAL_ANALYSIS(aText[cur]))
+     if(NEED_CONTEXTUAL_ANALYSIS(GetUnichar(&aText[cur])))
      {
-       c2= this->ContextualAnalysis((cur>0)?aText[cur-1]:0,
-                                  aText[cur],
-                                  (cur<(aLen-1)) ?aText[cur+1]:0);
+       c2= this->ContextualAnalysis((cur>0)?GetUnichar(&aText[cur-1]):0,
+                                  GetUnichar(&aText[cur]),
+                                  (cur<(aLen-1)) ?GetUnichar(&aText[cur+1]):0);
      } else {
-       c2 = this->GetClass(aText[cur]);
+       c2 = this->GetClass(GetUnichar(&aText[cur]));
      }
 
      if(GetPair(c1, c2)) {
diff -aur a/intl/unicharutil/util/nsUnicharUtils.cpp b/intl/unicharutil/util/nsUnicharUtils.cpp
--- a/intl/unicharutil/util/nsUnicharUtils.cpp	2005-04-21 15:30:21.000000000 -0700
+++ b/intl/unicharutil/util/nsUnicharUtils.cpp	2006-05-20 20:27:50.000000000 -0700
@@ -340,3 +340,28 @@
     return result;
 }
 
+PRUnichar
+GetUnichar(const void *ptr)
+{
+    PRUnichar result;
+#if defined(__sparc__) || defined(__alpha__)
+    *((char *) &result) = *((char *) ptr);
+    *((char *) &result + 1) = *((char *) ptr + 1);
+#else
+    result = *((PRUnichar *) ptr);
+#endif
+    return result;
+}
+
+void
+SetUnichar(void *ptr, PRUnichar aChar)
+{
+#if defined(__sparc__) || defined(__alpha__)
+    *((char *) ptr) = *((char *) &aChar);
+    *((char *) ptr + 1) = *((char *) &aChar + 1);
+#else
+    *((PRUnichar *) ptr) = aChar;
+#endif
+}
+
+
diff -aur a/intl/unicharutil/util/nsUnicharUtils.h b/intl/unicharutil/util/nsUnicharUtils.h
--- a/intl/unicharutil/util/nsUnicharUtils.h	2005-02-24 07:50:57.000000000 -0800
+++ b/intl/unicharutil/util/nsUnicharUtils.h	2006-05-20 20:27:50.000000000 -0700
@@ -81,6 +81,8 @@
 
 PRUnichar ToUpperCase(PRUnichar);
 PRUnichar ToLowerCase(PRUnichar);
+PRUnichar GetUnichar(const void *);
+void SetUnichar(void *, PRUnichar);
 
 inline PRBool IsUpperCase(PRUnichar c) {
     return ToLowerCase(c) != c;
diff -aur a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
--- a/layout/generic/nsTextFrame.cpp	2006-02-13 18:05:07.000000000 -0800
+++ b/layout/generic/nsTextFrame.cpp	2006-05-20 20:27:50.000000000 -0700
@@ -5101,8 +5101,8 @@
   
   while (aNumChars-- > 0) {
     // XXX: If you crash here then you may see the issue described
-    // in http://bugzilla.mozilla.org/show_bug.cgi?id=36146#c44
-    *cp2-- = PRUnichar(*cp1--);
+    // in http://bugzilla.mozilla.org/show_bug.cgi?id=161826
+    SetUnichar(cp2--, PRUnichar(*cp1--));
   }
 }
  
@@ -6199,9 +6199,9 @@
 {
   PRUnichar* end = aBuffer + aWordLen;
   for (; aBuffer < end; aBuffer++) {
-    PRUnichar ch = *aBuffer;
+    PRUnichar ch = GetUnichar(aBuffer);
     if (ch == ' ') {
-      *aBuffer = CH_NBSP;
+      SetUnichar(aBuffer, CH_NBSP);
     }
   }
 }



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/004_mozilla-hppa.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/004_mozilla-hppa.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/004_mozilla-hppa.patch?rev=1.1&content-type=text/plain

Index: 004_mozilla-hppa.patch
===================================================================
# Original patch just cleaned up, Author on original patch was Randolph Chung  (tausq@debian.org)
# Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=287150

Index: xpcom/reflect/xptcall/src/md/unix/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v
retrieving revision 1.92
diff -u -B -u -8 -p -r1.92 Makefile.in
--- xpcom/reflect/xptcall/src/md/unix/Makefile.in	14 Dec 2006 19:13:43 -0000	1.92
+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in	3 Jan 2007 18:20:44 -0000
@@ -185,16 +185,29 @@ CPPSRCS		:= xptcinvoke_ipf32.cpp xptcstu
 ASFILES		:= xptcstubs_asm_ipf32.s xptcinvoke_asm_ipf32.s
 endif
 
 # #18875  Building the CPP's (CXX) optimized causes a crash
 CXXFLAGS 	:=  $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(CXXFLAGS))
 endif
 endif
 
+#
+# Linux/HPPA/gcc
+#
+ifeq ($(OS_ARCH),Linux)
+ifneq (,$(filter hppa2.0 hppa1.1,$(OS_TEST)))
+#ifeq ($(CC),gcc)  # Do not check for gcc since there is only this compiler on linux for hppa
+CPPSRCS		:= xptcinvoke_pa32.cpp xptcstubs_pa32.cpp
+ASFILES		:= xptcstubs_asm_parisc_linux.s xptcinvoke_asm_parisc_linux.s
+#endif
+endif
+endif
+
+
 ######################################################################
 # M68k
 ######################################################################
 #
 # NetBSD/m68k
 #
 ifeq ($(OS_ARCH),NetBSD)
 ifneq (,$(filter amiga atari hp300 mac68k mvme68k next68k sun3 sun3x x68k,$(OS_TEST)))
Index: xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
===================================================================
RCS file: xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
diff -N xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s	3 Jan 2007 18:20:44 -0000
@@ -0,0 +1,102 @@
+
+	.LEVEL 1.1
+	.text
+	.align 4
+
+framesz:
+	.equ 128
+
+.globl XPTC_InvokeByIndex
+	.type XPTC_InvokeByIndex, @function
+
+
+XPTC_InvokeByIndex:
+  	.PROC
+	.CALLINFO FRAME=72, CALLER,SAVE_RP, SAVE_SP, ENTRY_GR=3
+	.ENTRY
+
+ ; frame marker takes 48 bytes,
+ ; register spill area takes 8 bytes,
+ ; local stack area takes 72 bytes result in 128 bytes total
+
+        STW          %rp,-20(%sp)
+        STW,MA       %r3,128(%sp)
+
+        LDO     -framesz(%r30),%r28
+        STW     %r28,-4(%r30)       ; save previous sp
+        STW     %r19,-32(%r30)
+
+        STW     %r26,-36-framesz(%r30)  ; save argument registers in
+        STW     %r25,-40-framesz(%r30)  ; in PREVIOUS frame
+        STW     %r24,-44-framesz(%r30)  ;
+        STW     %r23,-48-framesz(%r30)  ;
+
+	.CALL   ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26;out=28
+        BL    invoke_count_bytes,%r31
+        COPY    %r31,%r2
+
+        CMPIB,>=        0,%r28, .+76
+        COPY    %r30,%r3            ; copy stack ptr to saved stack ptr
+        ADD     %r30,%r28,%r30      ; extend stack frame
+        LDW     -4(%r3),%r28        ; move frame
+        STW     %r28,-4(%r30)
+        LDW     -8(%r3),%r28
+        STW     %r28,-8(%r30)
+        LDW     -12(%r3),%r28
+        STW     %r28,-12(%r30)
+        LDW     -16(%r3),%r28
+        STW     %r28,-16(%r30)
+        LDW     -20(%r3),%r28
+        STW     %r28,-20(%r30)
+        LDW     -24(%r3),%r28
+        STW     %r28,-24(%r30)
+        LDW     -28(%r3),%r28
+        STW     %r28,-28(%r30)
+        LDW     -32(%r3),%r28
+        STW     %r28,-32(%r30)
+
+        LDO     -40(%r30),%r26         ; load copy address
+        LDW     -44-framesz(%r3),%r25  ; load rest of 2 arguments
+        LDW     -48-framesz(%r3),%r24  ;
+
+        LDW     -32(%r30),%r19 ; shared lib call destroys r19; reload
+        .CALL   ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26
+        BL    invoke_copy_to_stack,%r31
+        COPY    %r31,%r2
+
+        LDO     -48(%r30),%r20
+        EXTRW,U,= %r28,31,1,%r22
+        FLDD    0(%r20),%fr7  ; load double arg 1
+        EXTRW,U,= %r28,30,1,%r22
+        FLDW    8(%r20),%fr5L ; load float arg 1
+        EXTRW,U,= %r28,29,1,%r22
+        FLDW    4(%r20),%fr6L ; load float arg 2
+        EXTRW,U,= %r28,28,1,%r22
+        FLDW    0(%r20),%fr7L ; load float arg 3
+
+        LDW     -36-framesz(%r3),%r26  ; load ptr to 'that'
+        LDW     -40(%r30),%r25  ; load the rest of dispatch argument registers
+        LDW     -44(%r30),%r24
+        LDW     -48(%r30),%r23
+
+        LDW     -36-framesz(%r3),%r20  ; load vtable addr
+        LDW     -40-framesz(%r3),%r28  ; load index
+        LDW     0(%r20),%r20    ; follow vtable
+        SH2ADDL %r28,%r20,%r28  ; add 4*index to vtable entry
+        LDW     0(%r28),%r22    ; load vtable entry
+
+        .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=22-26;out=28;
+        BL    $$dyncall,%r31
+        COPY    %r31,%r2
+
+        LDW     -32(%r30),%r19
+        COPY    %r3,%r30              ; restore saved stack ptr
+
+        LDW          -148(%sp),%rp
+        LDWM       -128(%sp),%r3
+	BV,N             (%rp)
+	NOP
+   .EXIT
+  .PROCEND  ;in=23,24,25,26;
+  .SIZE XPTC_InvokeByIndex, .-XPTC_InvokeByIndex
+
Index: xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
===================================================================
RCS file: xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
diff -N xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s	3 Jan 2007 18:20:44 -0000
@@ -0,0 +1,66 @@
+        .LEVEL  1.1
+	.TEXT
+	.ALIGN 4
+
+curframesz:
+	.EQU 128
+
+
+; SharedStub has stack size of 128 bytes
+
+lastframesz:
+	.EQU 64
+
+; the StubN C++ function has a small stack size of 64 bytes
+
+
+.globl SharedStub
+	.type SharedStub, @function
+
+SharedStub:
+        .PROC
+        .CALLINFO CALLER,FRAME=80,SAVE_RP
+
+  .ENTRY
+        STW     %rp,-20(%sp)
+        LDO     128(%sp),%sp
+
+        STW     %r19,-32(%r30)
+        STW     %r26,-36-curframesz(%r30) ; save arg0 in previous frame
+
+        LDO     -80(%r30),%r28
+        FSTD,MA %fr5,8(%r28)   ; save darg0
+        FSTD,MA %fr7,8(%r28)   ; save darg1
+        FSTW,MA %fr4L,4(%r28)  ; save farg0
+        FSTW,MA %fr5L,4(%r28)  ; save farg1
+        FSTW,MA %fr6L,4(%r28)  ; save farg2
+        FSTW,MA %fr7L,4(%r28)  ; save farg3
+
+        ; Former value of register 26 is already properly saved by StubN,
+        ; but register 25-23 are not because of the arguments mismatch
+        STW     %r25,-40-curframesz-lastframesz(%r30) ; save r25
+        STW     %r24,-44-curframesz-lastframesz(%r30) ; save r24
+        STW     %r23,-48-curframesz-lastframesz(%r30) ; save r23
+        COPY    %r26,%r25                             ; method index is arg1
+        LDW     -36-curframesz-lastframesz(%r30),%r26 ; self is arg0
+        LDO     -40-curframesz-lastframesz(%r30),%r24 ; normal args is arg2
+        LDO     -80(%r30),%r23                        ; floating args is arg3
+
+        .CALL   ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=23-26;out=28;
+        BL     PrepareAndDispatch, %r31
+        COPY    %r31,%r2
+
+        LDW     -32(%r30),%r19
+
+        LDW     -148(%sp),%rp
+        LDO     -128(%sp),%sp
+
+
+	BV,N     (%rp)
+	NOP
+	NOP
+
+	.EXIT
+        .PROCEND        ;in=26;out=28;
+
+	.SIZE SharedStub, .-SharedStub



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/005_mozilla-firefox-1.5-ia64.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/005_mozilla-firefox-1.5-ia64.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/005_mozilla-firefox-1.5-ia64.patch?rev=1.1&content-type=text/plain

Index: 005_mozilla-firefox-1.5-ia64.patch
===================================================================
# Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=289394

--- mozilla.orig/extensions/transformiix/source/base/Double.cpp
+++ mozilla/extensions/transformiix/source/base/Double.cpp
@@ -75,14 +75,7 @@
 #define CPU_IS_ARM
 #endif
 
-#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
-/**
- * This version of the macros is safe for the alias optimizations
- * that gcc does, but uses gcc-specific extensions.
- */
-
 typedef union txdpun {
-    PRFloat64 d;
     struct {
 #if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
         PRUint32 lo, hi;
@@ -90,8 +83,14 @@
         PRUint32 hi, lo;
 #endif
     } s;
+    PRFloat64 d;
 } txdpun;
 
+#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
+/**
+ * This version of the macros is safe for the alias optimizations
+ * that gcc does, but uses gcc-specific extensions.
+ */
 #define TX_DOUBLE_HI32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.hi; }))
 #define TX_DOUBLE_LO32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.lo; }))
 
@@ -117,20 +116,20 @@
 
 //-- Initialize Double related constants
 #ifdef IS_BIG_ENDIAN
-const PRUint32 nanMask[2] =    {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK,
-                                0xffffffff};
-const PRUint32 infMask[2] =    {TX_DOUBLE_HI32_EXPMASK, 0};
-const PRUint32 negInfMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0};
+const txdpun nanMask =    {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK,
+                           0xffffffff};
+const txdpun infMask =    {TX_DOUBLE_HI32_EXPMASK, 0};
+const txdpun negInfMask = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0};
 #else
-const PRUint32 nanMask[2] =    {0xffffffff,
-                                TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK};
-const PRUint32 infMask[2] =    {0, TX_DOUBLE_HI32_EXPMASK};
-const PRUint32 negInfMask[2] = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT};
+const txdpun nanMask = {0xffffffff,
+                        TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK};
+const txdpun infMask =    {0, TX_DOUBLE_HI32_EXPMASK};
+const txdpun negInfMask = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT};
 #endif
 
-const double Double::NaN = *((double*)nanMask);
-const double Double::POSITIVE_INFINITY = *((double*)infMask);
-const double Double::NEGATIVE_INFINITY = *((double*)negInfMask);
+const double Double::NaN = nanMask.d;
+const double Double::POSITIVE_INFINITY = infMask.d;
+const double Double::NEGATIVE_INFINITY = negInfMask.d;
 
 /*
  * Determines whether the given double represents positive or negative
--- mozilla.orig/js/src/fdlibm/fdlibm.h



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/006_mips-asm.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/006_mips-asm.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/006_mips-asm.patch?rev=1.1&content-type=text/plain

Index: 006_mips-asm.patch
===================================================================
Upstream Bug: http://bugzilla.mozilla.org/show_bug.cgi?id=258429

This patch is required to fix build issues with Mozilla on MIPS architectures.
The out-of-the-box code is coded to build on a PlayStation 2 game console, which
is a highly specialised MIPS machine based around the Toshiba TX5900.  This CPU
is very non-standard, causing problems with generic MIPS machines like Silicon
Graphics workstations.

The following patch fixes the assembly language routines for generic MIPS
machines.  In the case where it is being compiled for a PlayStation 2, the older
PS2-specific implementation is used instead.

Patch $Revision: 1.1 $
Index: mozilla/configure.in
===================================================================
RCS file: /cvsroot/mozilla/configure.in,v
retrieving revision 1.1819
diff -p -u -r1.1819 configure.in
--- mozilla/configure.in	24 May 2007 17:45:55 -0000	1.1819
+++ mozilla/configure.in	30 May 2007 09:08:10 -0000
@@ -1706,6 +1706,12 @@ case "$target" in
         MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS=1
     ;;
     mips*)
+        if test -z "$CROSS_COMPILE" ; then
+            if grep -c -E '^system type\W*:.*EE PS2' /proc/cpuinfo >/dev/null; then
+                OS_TEST="mipsEE"
+            fi
+        fi
+
         CFLAGS="$CFLAGS -Wa,-xgot"
         CXXFLAGS="$CXXFLAGS -Wa,-xgot"
     ;;
Index: mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
===================================================================
RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v
retrieving revision 1.92
diff -p -u -r1.92 Makefile.in
--- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in	14 Dec 2006 19:13:43 -0000	1.92
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in	30 May 2007 09:08:10 -0000
@@ -229,16 +229,28 @@ endif
 endif
 endif
 
+#
+# Linux/MIPS
+# 
 ifeq ($(OS_ARCH),Linux)
-ifneq (,$(findstring mips, $(OS_TEST)))
-CPPSRCS		:= xptcinvoke_mips.cpp xptcstubs_mips.cpp
-ASFILES		:= xptcinvoke_asm_mips.s xptcstubs_asm_mips.s
-#xptcstubs_mips.cpp
-# xptcstubs_asm_mips.s
+
+# PlayStation2 Linux
+ifneq (,$(findstring mipsEE, $(OS_TEST)))
+CPPSRCS		:= xptcinvoke_ps2mips.cpp xptcstubs_ps2mips.cpp
+ASFILES		:= xptcinvoke_asm_ps2mips.s xptcstubs_asm_ps2mips.s
 ifdef GNU_CC
 ASFLAGS		+= $(INCLUDES) -x assembler-with-cpp -D__GNUC__
 endif
+else 
+
+endif
+# Generic 32-bit Linux
+ifneq (,$(findstring mips, $(OS_TEST)))
+CPPSRCS		:= xptcinvoke_mips.cpp xptcstubs_mips.cpp
+ASFILES		:= xptcinvoke_asm_mips.s xptcstubs_asm_mips.s
+AS		:= $(CC) $(CFLAGS) $(INCLUDES) -c -x assembler-with-cpp
 endif
+
 endif
 
 ######################################################################
@@ -386,14 +398,24 @@ LOCAL_INCLUDES += \
 	$(NULL)
 
 ifeq ($(OS_ARCH),Linux)
+
+# PlayStation 2 Linux
+ifneq (,$(findstring mipsEE, $(OS_TEST)))
+xptcstubs_asm_ps2mips.o: xptcstubs_asm_ps2mips.s.m4 $(PUBLIC)/xptcstubsdef.inc
+	m4 $(INCLUDES) $< > ./xptcstubs_asm_ps2mips.s && \
+	$(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) ./xptcstubs_asm_ps2mips.s
+	$(RM) -f ./xptcstubs_asm_ps2mips.s
+else
+
+# Generic Linux
 ifneq (,$(findstring mips, $(OS_TEST)))
-xptcstubs_asm_mips.o: xptcstubs_asm_mips.s.m4 $(PUBLIC)/xptcstubsdef.inc
-	m4 $(INCLUDES) $< > ./xptcstubs_asm_mips.s && \
-	$(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) ./xptcstubs_asm_mips.s
-	$(RM) -f ./xptcstubs_asm_mips.s
+xptcstubs_asm_mips.o: xptcstubs_asm_mips.s $(PUBLIC)/xptcstubsdef.inc
+	$(AS) -o $@ $<
 endif
 endif
 
+endif
+
 ifeq ($(OS_ARCH),Darwin)
 xptcstubs_asm_ppc_darwin.o: xptcstubs_asm_ppc_darwin.s.m4 $(PUBLIC)/xptcstubsdef.inc Makefile
 	gm4 $(INCLUDES) $< > ./xptcstubs_asm_ppc_darwin.s && \
Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s
===================================================================
RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s,v
retrieving revision 1.3
diff -p -u -r1.3 xptcinvoke_asm_mips.s
--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s.orig	2007-07-09 09:02:07 +1000
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s	2007-07-09 09:04:37 +1000
@@ -21,6 +21,7 @@
  * Contributor(s):
  *   Brendan Eich     <brendan@mozilla.org>
  *   Stuart Parmenter <pavlov@netscape.com>
+ *   Thiemo Seufer    <seufer@csv.ica.uni-stuttgart.de>
  */
 
 /* This code is for MIPS using the O32 ABI. */
@@ -28,139 +29,123 @@
 #include <sys/regdef.h>
 #include <sys/asm.h>
 
-.text
-.globl  invoke_count_words
-.globl	invoke_copy_to_stack 
-
-# We need a variable number of words allocated from the stack for copies of
-# the params, and this space must come between the high frame (where ra, gp,
-# and s0 are saved) and the low frame (where a0-a3 are saved by the callee
-# functions we invoke). 
-
-LOCALSZ=4		# s0, s1, ra, gp
-NARGSAVE=4		# a0, a1, a2, a3
-HIFRAMESZ=(LOCALSZ*SZREG)
-LOFRAMESZ=(NARGSAVE*SZREG)
-FRAMESZ=(HIFRAMESZ+LOFRAMESZ+ALSZ)&ALMASK
-
-# XXX these 2*SZREG, etc. are very magic -- we *know* that ALSZ&ALMASK cause
-# FRAMESZ to be 0 mod 8, in this case to be 16 and not 12.
-RAOFF=FRAMESZ - (2*SZREG)
-GPOFF=FRAMESZ - (3*SZREG)
-S0OFF=FRAMESZ - (4*SZREG)
-S1OFF=FRAMESZ - (5*SZREG)
-
-# These are not magic -- they are just our argsave slots in the caller frame.
-A0OFF=FRAMESZ
-A1OFF=FRAMESZ + (1*SZREG)
-A2OFF=FRAMESZ + (2*SZREG)
-A3OFF=FRAMESZ + (3*SZREG)
-
-	#	
-	# _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
-	#                      a0       a1          a2         a3
-
-NESTED(_XPTC_InvokeByIndex, FRAMESZ, ra)
-
-	.set	noreorder
-	.cpload	t9
-	.set	reorder
-
+# NARGSAVE is the argument space in the callers frame, including extra
+# 'shadowed' space for the argument registers. The minimum of 4
+# argument slots is sometimes predefined in the header files.
+#ifndef NARGSAVE
+#define NARGSAVE 4
+#endif
+
+#define LOCALSZ 3	/* gp, fp, ra */
+#define FRAMESZ ((((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK)
+
+#define RAOFF (FRAMESZ - (1*SZREG))
+#define FPOFF (FRAMESZ - (2*SZREG))
+#define GPOFF (FRAMESZ - (3*SZREG))
+
+#define A0OFF (FRAMESZ + (0*SZREG))
+#define A1OFF (FRAMESZ + (1*SZREG))
+#define A2OFF (FRAMESZ + (2*SZREG))
+#define A3OFF (FRAMESZ + (3*SZREG))
+
+	.text
+
+#	
+# _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
+#                      a0       a1          a2         a3
+
+	.globl	_XPTC_InvokeByIndex
+	.align	2
+	.type	_XPTC_InvokeByIndex,@function
+	.ent	_XPTC_InvokeByIndex,0
+	.frame	fp, FRAMESZ, ra
+_XPTC_InvokeByIndex:
+	SETUP_GP
 	subu	sp, FRAMESZ
 
-	# specify the save register mask -- XXX do we want the a0-a3 here, given
-	# our "split" frame where the args are saved below a dynamicly allocated
-	# region under the high frame?
-	#
-	# 10010000000000010000000011110000
-	.mask 0x900100F0, -((NARGSAVE+LOCALSZ)*SZREG)
-
-	# thou shalt not use .cprestore if yer frame has variable size...
-	# .cprestore GPOFF
-
-	REG_S	ra, RAOFF(sp)
-
-	# this happens automatically with .cprestore, but we cannot use that op...
-	REG_S	gp, GPOFF(sp)
-	REG_S	s0, S0OFF(sp)
-	REG_S	s1, S1OFF(sp)
-
-	REG_S	a0, A0OFF(sp)
-	REG_S	a1, A1OFF(sp)
-	REG_S	a2, A2OFF(sp)
-	REG_S	a3, A3OFF(sp)
+	# specify the save register mask for gp, fp, ra, a3 - a0
+	.mask 0xD00000F0, RAOFF-FRAMESZ
 
-	# invoke_count_words(paramCount, params)
-	move	a0, a2
-	move	a1, a3
+	sw	ra, RAOFF(sp)
+	sw	fp, FPOFF(sp)
 
-	jal	invoke_count_words
-	lw	gp, GPOFF(sp)
+	# we can't use .cprestore in a variable stack frame
+	sw	gp, GPOFF(sp)
 
-	# save the old sp so we can pop the param area and any "low frame"
-	# needed as an argsave area below the param block for callees that
-	# we invoke.
-	move	s0, sp
-
-	REG_L	a1, A2OFF(sp)	# a1 = paramCount
-	REG_L	a2, A3OFF(sp)	# a2 = params
-
-	# we define a word as 4 bytes, period end of story!
-	sll	v0, 2		# 4 bytes * result of invoke_copy_words
-	subu	v0, LOFRAMESZ	# but we take back the argsave area built into
-				# our stack frame -- SWEET!
-	subu	sp, sp, v0	# make room
-	move	a0, sp		# a0 = param stack address
-	move	s1, a0		# save it for later -- it should be safe here
-
-	# the old sp is still saved in s0, but we now need another argsave
-	# area ("low frame") for the invoke_copy_to_stack call.
-	subu	sp, sp, LOFRAMESZ
+	sw	a0, A0OFF(sp)
+	sw	a1, A1OFF(sp)
+	sw	a2, A2OFF(sp)
+	sw	a3, A3OFF(sp)
+
+	# save bottom of fixed frame
+	move	fp, sp
+
+	# extern "C" uint32
+	# invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s);
+	la	t9, invoke_count_words
+	move	a0, a2
+	move	a1, a3
+	jalr	t9
+	lw  	gp, GPOFF(fp)
 
-	# copy the param into the stack areas
+	# allocate variable stack, with a size of:
+	# wordsize (of 4 bytes) * result (already aligned to dword)
+	# but a minimum of 16 byte
+	sll	v0, 2
+	slt	t0, v0, 16
+	beqz	t0, 1f
+	li	v0, 16
+1:	subu	sp, v0
+
+	# let a0 point to the bottom of the variable stack, allocate
+	# another fixed stack for:
+	# extern "C" void
 	# invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
-	#                      nsXPTCVariant* s)
-	jal     invoke_copy_to_stack
-	lw  	gp, GPOFF(s0)
-
-	move	sp, s0		# get orig sp back, popping params and argsave
-
-	REG_L	a0, A0OFF(sp)	# a0 = set "that" to be "this"
-	REG_L	a1, A1OFF(sp)	# a1 = methodIndex
-
-	# t1 = methodIndex * 4
-	# (use shift instead of mult)
-	sll	t1, a1, 2
-
-	# calculate the function we need to jump to,
-	# which must then be saved in t9
+	#		       nsXPTCVariant* s);
+	la	t9, invoke_copy_to_stack
+	move	a0, sp
+	lw	a1, A2OFF(fp)
+	lw	a2, A3OFF(fp)
+	subu	sp, 16
+	jalr	t9
+	lw  	gp, GPOFF(fp)
+
+	# back to the variable stack frame
+	addu	sp, 16
+
+	# calculate the function we need to jump to, which must then be
+	# stored in t9
+	lw	a0, A0OFF(fp)	# a0 = set "that" to be "this"
+	lw	t0, A1OFF(fp)	# a1 = methodIndex
 	lw	t9, 0(a0)
-	addu	t9, t9, t1
-	lw	t9, 8(t9)
-
-	# a1..a3 and f13..f14 should now be set to what
-	# invoke_copy_to_stack told us. skip a0 and f12
-	# because that is the "this" pointer
-
-	REG_L	a1, 1*SZREG(s1)
-	REG_L	a2, 2*SZREG(s1)
-	REG_L	a3, 3*SZREG(s1)
-
-	l.d	$f13, 8(s1)
-	l.d	$f14, 16(s1)
-
-	# Create the stack pointer for the function, which must have 4 words
-	# of space for callee-saved args.  invoke_count_words allocated space
-        # for a0 starting at s1, so we just move s1 into sp.
-	move	sp, s1
+	# t0 = methodIndex << PTRLOG
+	sll	t0, t0, PTRLOG
+	addu	t9, t0
+#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
+	lw	t9, (t9)
+#else /* not G++ V3 ABI */
+	lw	t9, 2*PTRSIZE(t9)
+#endif /* G++ V3 ABI */
+
+	# Set a1-a3 to what invoke_copy_to_stack told us. a0 is already
+	# the "this" pointer. We don't have to care about floating
+	# point arguments, the non-FP "this" pointer as first argument
+	# means they'll never be used.
+	lw	a1, 1*SZREG(sp)
+	lw	a2, 2*SZREG(sp)
+	lw	a3, 3*SZREG(sp)
+
+	jalr	t9
+	# Micro-optimization: There's no gp usage below this point, so
+	# we don't reload.
+	# lw	gp, GPOFF(fp)
 
-	jalr	ra, t9
-	lw	gp, GPOFF(s0)
+	# leave variable stack frame
+	move	sp, fp
 
-	move	sp, s0
+	lw	ra, RAOFF(sp)
+	lw	fp, FPOFF(sp)
 
-	REG_L	ra, RAOFF(sp)
-	REG_L	s0, S0OFF(sp)
-	addu	sp, FRAMESZ
+	addiu	sp, FRAMESZ
 	j	ra
-.end _XPTC_InvokeByIndex
+END(_XPTC_InvokeByIndex)
Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s
===================================================================
RCS file: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s
diff -N mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s	30 May 2007 09:08:10 -0000
@@ -0,0 +1,166 @@
+/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corp, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2001
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Brendan Eich     <brendan@mozilla.org>
+ *   Stuart Parmenter <pavlov@netscape.com>
+ */
+
+/* This code is for MIPS using the O32 ABI. */
+
+#include <sys/regdef.h>
+#include <sys/asm.h>
+
+.text
+.globl  invoke_count_words
+.globl	invoke_copy_to_stack 
+
+# We need a variable number of words allocated from the stack for copies of
+# the params, and this space must come between the high frame (where ra, gp,
+# and s0 are saved) and the low frame (where a0-a3 are saved by the callee
+# functions we invoke). 
+
+LOCALSZ=4		# s0, s1, ra, gp
+NARGSAVE=4		# a0, a1, a2, a3
+HIFRAMESZ=(LOCALSZ*SZREG)
+LOFRAMESZ=(NARGSAVE*SZREG)
+FRAMESZ=(HIFRAMESZ+LOFRAMESZ+ALSZ)&ALMASK
+
+# XXX these 2*SZREG, etc. are very magic -- we *know* that ALSZ&ALMASK cause
+# FRAMESZ to be 0 mod 8, in this case to be 16 and not 12.
+RAOFF=FRAMESZ - (2*SZREG)
+GPOFF=FRAMESZ - (3*SZREG)
+S0OFF=FRAMESZ - (4*SZREG)
+S1OFF=FRAMESZ - (5*SZREG)
+
+# These are not magic -- they are just our argsave slots in the caller frame.
+A0OFF=FRAMESZ
+A1OFF=FRAMESZ + (1*SZREG)
+A2OFF=FRAMESZ + (2*SZREG)
+A3OFF=FRAMESZ + (3*SZREG)
+
+	#	
+	# _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
+	#                      a0       a1          a2         a3
+
+NESTED(_XPTC_InvokeByIndex, FRAMESZ, ra)
+
+	.set	noreorder
+	.cpload	t9
+	.set	reorder
+
+	subu	sp, FRAMESZ
+
+	# specify the save register mask -- XXX do we want the a0-a3 here, given
+	# our "split" frame where the args are saved below a dynamicly allocated
+	# region under the high frame?
+	#
+	# 10010000000000010000000011110000
+	.mask 0x900100F0, -((NARGSAVE+LOCALSZ)*SZREG)
+
+	# thou shalt not use .cprestore if yer frame has variable size...
+	# .cprestore GPOFF
+
+	REG_S	ra, RAOFF(sp)
+
+	# this happens automatically with .cprestore, but we cannot use that op...
+	REG_S	gp, GPOFF(sp)
+	REG_S	s0, S0OFF(sp)
+	REG_S	s1, S1OFF(sp)
+
+	REG_S	a0, A0OFF(sp)
+	REG_S	a1, A1OFF(sp)
+	REG_S	a2, A2OFF(sp)
+	REG_S	a3, A3OFF(sp)
+
+	# invoke_count_words(paramCount, params)
+	move	a0, a2
+	move	a1, a3
+
+	jal	invoke_count_words
+	lw	gp, GPOFF(sp)
+
+	# save the old sp so we can pop the param area and any "low frame"
+	# needed as an argsave area below the param block for callees that
+	# we invoke.
+	move	s0, sp
+
+	REG_L	a1, A2OFF(sp)	# a1 = paramCount
+	REG_L	a2, A3OFF(sp)	# a2 = params
+
+	# we define a word as 4 bytes, period end of story!
+	sll	v0, 2		# 4 bytes * result of invoke_copy_words
+	subu	v0, LOFRAMESZ	# but we take back the argsave area built into
+				# our stack frame -- SWEET!
+	subu	sp, sp, v0	# make room
+	move	a0, sp		# a0 = param stack address
+	move	s1, a0		# save it for later -- it should be safe here
+
+	# the old sp is still saved in s0, but we now need another argsave
+	# area ("low frame") for the invoke_copy_to_stack call.
+	subu	sp, sp, LOFRAMESZ
+
+	# copy the param into the stack areas
+	# invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
+	#                      nsXPTCVariant* s)
+	jal     invoke_copy_to_stack
+	lw  	gp, GPOFF(s0)
+
+	move	sp, s0		# get orig sp back, popping params and argsave
+
+	REG_L	a0, A0OFF(sp)	# a0 = set "that" to be "this"
+	REG_L	a1, A1OFF(sp)	# a1 = methodIndex
+
+	# t1 = methodIndex * 4
+	# (use shift instead of mult)
+	sll	t1, a1, 2
+
+	# calculate the function we need to jump to,
+	# which must then be saved in t9
+	lw	t9, 0(a0)
+	addu	t9, t9, t1
+	lw	t9, 8(t9)
+
+	# a1..a3 and f13..f14 should now be set to what
+	# invoke_copy_to_stack told us. skip a0 and f12
+	# because that is the "this" pointer
+
+	REG_L	a1, 1*SZREG(s1)
+	REG_L	a2, 2*SZREG(s1)
+	REG_L	a3, 3*SZREG(s1)
+
+	l.d	$f13, 8(s1)
+	l.d	$f14, 16(s1)
+
+	# Create the stack pointer for the function, which must have 4 words
+	# of space for callee-saved args.  invoke_count_words allocated space
+        # for a0 starting at s1, so we just move s1 into sp.
+	move	sp, s1
+
+	jalr	ra, t9
+	lw	gp, GPOFF(s0)
+
+	move	sp, s0
+
+	REG_L	ra, RAOFF(sp)
+	REG_L	s0, S0OFF(sp)
+	addu	sp, FRAMESZ
+	j	ra
+.end _XPTC_InvokeByIndex
Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp
===================================================================
RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp,v
retrieving revision 1.2
diff -p -u -r1.2 xptcinvoke_mips.cpp
--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp	18 Apr 2004 14:18:18 -0000	1.2
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp	30 May 2007 09:08:10 -0000
@@ -1,6 +1,4 @@
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
- * Version: MPL 1.1
- *
  * ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  *
@@ -24,6 +22,7 @@
  * Contributor(s):
  *   Stuart Parmenter <pavlov@netscape.com>
  *   Brendan Eich     <brendan@mozilla.org>
+ *   Thiemo Seufer    <seufer@csv.ica.uni-stuttgart.de>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either of the GNU General Public License Version 2 or later (the "GPL"),
@@ -52,10 +51,8 @@ invoke_count_words(PRUint32 paramCount, 
     // Count a word for a0 even though it's never stored or loaded
     // We do this only for alignment of register pairs.
     PRUint32 result = 1;
-    for (PRUint32 i = 0; i < paramCount; i++, s++)
+    for (PRUint32 i = 0; i < paramCount; i++, result++, s++)
     {
-        result++;
-
         if (s->IsPtrData())
             continue;
 
@@ -68,6 +65,9 @@ invoke_count_words(PRUint32 paramCount, 
 		result++;
 	    result++;
 	    break;
+
+        default:
+            break;
         }
     }
     return (result + 1) & ~(PRUint32)1;
@@ -88,8 +88,6 @@ invoke_copy_to_stack(PRUint32* d, PRUint
             continue;
         }
 
-        *((void**)d) = s->val.p;
-
         switch(s->type)
         {
         case nsXPTType::T_I64    :
@@ -104,6 +102,9 @@ invoke_copy_to_stack(PRUint32* d, PRUint
             if ((PRWord)d & 4) d++;
             *((double*)   d) = s->val.d;      d++;
             break;
+        default:
+            *((void**)d) = s->val.p;
+            break;
         }
     }
 }
@@ -118,5 +119,4 @@ XPTC_InvokeByIndex(nsISupports* that, PR
                    PRUint32 paramCount, nsXPTCVariant* params)
 {
     return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
-}    
-
+}
Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp
===================================================================
RCS file: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp
diff -N mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp	30 May 2007 09:08:10 -0000
@@ -0,0 +1,122 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * Version: MPL 1.1
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corp, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2001
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Stuart Parmenter <pavlov@netscape.com>
+ *   Brendan Eich     <brendan@mozilla.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+/* This code is for MIPS using the O32 ABI. */
+
+/* Platform specific code to invoke XPCOM methods on native objects */
+
+#include "xptcprivate.h"
+
+
+extern "C" uint32
+invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
+{
+    // Count a word for a0 even though it's never stored or loaded
+    // We do this only for alignment of register pairs.
+    PRUint32 result = 1;
+    for (PRUint32 i = 0; i < paramCount; i++, s++)
+    {
+        result++;
+
+        if (s->IsPtrData())
+            continue;
+
+        switch(s->type)
+        {
+        case nsXPTType::T_I64    :
+        case nsXPTType::T_U64    :
+        case nsXPTType::T_DOUBLE :
+	    if (result & 1)
+		result++;
+	    result++;
+	    break;
+        }
+    }
+    return (result + 1) & ~(PRUint32)1;
+}
+
+extern "C" void
+invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
+                     nsXPTCVariant* s)
+{
+    // Skip the unused a0 slot, which we keep only for register pair alignment.
+    d++;
+
+    for (PRUint32 i = 0; i < paramCount; i++, d++, s++)
+    {
+        if (s->IsPtrData())
+        {
+            *((void**)d) = s->ptr;
+            continue;
+        }
+
+        *((void**)d) = s->val.p;
+
+        switch(s->type)
+        {
+        case nsXPTType::T_I64    :
+            if ((PRWord)d & 4) d++;
+            *((PRInt64*) d)  = s->val.i64;    d++;
+            break;
+        case nsXPTType::T_U64    :
+            if ((PRWord)d & 4) d++;
+            *((PRUint64*) d) = s->val.u64;    d++;
+            break;
+        case nsXPTType::T_DOUBLE :
+            if ((PRWord)d & 4) d++;
+            *((double*)   d) = s->val.d;      d++;
+            break;
+        }
+    }
+}
+
+extern "C" nsresult _XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
+                                        PRUint32 paramCount,
+                                        nsXPTCVariant* params);
+
+extern "C"
+XPTC_PUBLIC_API(nsresult)
+XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
+                   PRUint32 paramCount, nsXPTCVariant* params)
+{
+    return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
+}    
+
Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp
===================================================================
RCS file: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp
diff -N mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp	30 May 2007 09:08:10 -0000
@@ -0,0 +1,131 @@
+/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * Version: MPL 1.1
+ *
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corp, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2001
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Stuart Parmenter <pavlov@netscape.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "xptcprivate.h"
+
+/*
+ * This is for MIPS O32 ABI
+ * Args contains a0-3 and then the stack.
+ * Because a0 is 'this', we want to skip it
+ */
+extern "C" nsresult
+PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args)
+{
+    args++; // always skip over a0
+
+#define PARAM_BUFFER_COUNT		16
+
+    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
+    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsIInterfaceInfo* iface_info = NULL;
+    const nsXPTMethodInfo* info;
+    PRUint8 paramCount;
+    PRUint8 i;
+    nsresult result = NS_ERROR_FAILURE;
+
+    NS_ASSERTION(self,"no self");
+
+    self->GetInterfaceInfo(&iface_info);
+    NS_ASSERTION(iface_info,"no interface info");
+
+    iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
+    NS_ASSERTION(info,"no interface info");
+
+    paramCount = info->GetParamCount();
+
+    // setup variant array pointer
+    if(paramCount > PARAM_BUFFER_COUNT)
+        dispatchParams = new nsXPTCMiniVariant[paramCount];
+    else
+        dispatchParams = paramBuffer;
+    NS_ASSERTION(dispatchParams,"no place for params");
+
+    PRUint32* ap = args;
+    for(i = 0; i < paramCount; i++, ap++)
+    {
+        const nsXPTParamInfo& param = info->GetParam(i);
+        const nsXPTType& type = param.GetType();
+        nsXPTCMiniVariant* dp = &dispatchParams[i];
+
+        if(param.IsOut() || !type.IsArithmetic())
+        {
+            dp->val.p = (void*) *ap;
+            continue;
+        }
+
+        dp->val.p = (void*) *ap;
+
+        switch(type)
+        {
+        case nsXPTType::T_I64   :
+            if ((PRWord)ap & 4) ap++;
+            dp->val.i64 = *((PRInt64*) ap); ap++;
+            break;
+        case nsXPTType::T_U64   :
+            if ((PRWord)ap & 4) ap++;
+            dp->val.u64 = *((PRInt64*) ap); ap++;
+            break;
+        case nsXPTType::T_DOUBLE:
+            if ((PRWord)ap & 4) ap++;
+            dp->val.d   = *((double*) ap);  ap++;
+            break;
+        }
+    }
+
+    result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
+
+    NS_RELEASE(iface_info);
+
+    if(dispatchParams != paramBuffer)
+        delete [] dispatchParams;
+
+    return result;
+}
+
+#define STUB_ENTRY(n) // done in the .s file
+
+#define SENTINEL_ENTRY(n) \
+nsresult nsXPTCStubBase::Sentinel##n() \
+{ \
+    NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
+    return NS_ERROR_NOT_IMPLEMENTED; \
+}
+
+#include "xptcstubsdef.inc"
diff -urN mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s
--- mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s	1970-01-01 10:00:00 +1000
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s	2007-01-17 15:33:47 +1000
@@ -0,0 +1,142 @@
+/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
+ * Version: MPL 1.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corp, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2001
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Stuart Parmenter <pavlov@netscape.com>
+ *   Chris Waterson   <waterson@netscape.com>
+ *   Thiemo Seufer    <seufer@csv.ica.uni-stuttgart.de>
+ */
+
+/* This code is for MIPS using the O32 ABI. */
+
+#include <sys/regdef.h>
+#include <sys/asm.h>
+
+# NARGSAVE is the argument space in the callers frame, including extra
+# 'shadowed' space for the argument registers. The minimum of 4
+# argument slots is sometimes predefined in the header files.
+#ifndef NARGSAVE
+#define NARGSAVE 4
+#endif
+
+#define LOCALSZ 2	/* gp, ra */
+#define FRAMESZ ((((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK)
+
+#define RAOFF (FRAMESZ - (1*SZREG))
+#define GPOFF (FRAMESZ - (2*SZREG))
+
+#define A0OFF (FRAMESZ + (0*SZREG))
+#define A1OFF (FRAMESZ + (1*SZREG))
+#define A2OFF (FRAMESZ + (2*SZREG))
+#define A3OFF (FRAMESZ + (3*SZREG))
+
+	.text
+
+#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
+#define STUB_ENTRY(x)						\
+	.if x < 10;						\
+	.globl	_ZN14nsXPTCStubBase5Stub ##x ##Ev;		\
+	.type	_ZN14nsXPTCStubBase5Stub ##x ##Ev,@function;	\
+	.aent	_ZN14nsXPTCStubBase5Stub ##x ##Ev,0;		\
+_ZN14nsXPTCStubBase5Stub ##x ##Ev:;				\
+	SETUP_GP;						\
+	li	t0,x;						\
+	b	sharedstub;					\
+	.elseif x < 100;					\
+	.globl	_ZN14nsXPTCStubBase6Stub ##x ##Ev;		\
+	.type	_ZN14nsXPTCStubBase6Stub ##x ##Ev,@function;	\
+	.aent	_ZN14nsXPTCStubBase6Stub ##x ##Ev,0;		\
+_ZN14nsXPTCStubBase6Stub ##x ##Ev:;				\
+	SETUP_GP;						\
+	li	t0,x;						\
+	b	sharedstub;					\
+	.elseif x < 1000;					\
+	.globl	_ZN14nsXPTCStubBase7Stub ##x ##Ev;		\
+	.type	_ZN14nsXPTCStubBase7Stub ##x ##Ev,@function;	\
+	.aent	_ZN14nsXPTCStubBase7Stub ##x ##Ev,0;		\
+_ZN14nsXPTCStubBase7Stub ##x ##Ev:;				\
+	SETUP_GP;						\
+	li	t0,x;						\
+	b	sharedstub;					\
+	.else;							\
+	.err;							\
+	.endif
+#else /* not G++ V3 ABI */
+#define STUB_ENTRY(x)						\
+	.globl	Stub ##x ##__14nsXPTCStubBase;			\
+	.type	Stub ##x ##__14nsXPTCStubBase,@function;	\
+	.aent	Stub ##x ##__14nsXPTCStubBase,0;		\
+Stub ##x ##__14nsXPTCStubBase:;					\
+	SETUP_GP;						\
+	li	t0,x;						\
+	b	sharedstub
+#endif /* G++ V3 ABI */
+
+# SENTINEL_ENTRY is handled in the cpp file.
+#define SENTINEL_ENTRY(x)
+
+#
+# open a dummy frame for the function entries
+#
+	.align	2
+	.type	dummy,@function
+	.ent	dummy, 0
+	.frame	sp, FRAMESZ, ra 
+dummy:
+	SETUP_GP
+
+#include "xptcstubsdef.inc"
+
+sharedstub:
+	subu	sp, FRAMESZ
+
+	# specify the save register mask for gp, ra, a0-a3
+	.mask 0x900000F0, RAOFF-FRAMESZ
+
+	sw	ra, RAOFF(sp)
+	SAVE_GP(GPOFF)
+
+	# Micro-optimization: a0 is already loaded, and its slot gets
+	# ignored by PrepareAndDispatch, so no need to save it here.
+	# sw	a0, A0OFF(sp)
+	sw	a1, A1OFF(sp)
+	sw	a2, A2OFF(sp)
+	sw	a3, A3OFF(sp)
+
+	la	t9, PrepareAndDispatch
+
+	# t0 is methodIndex
+	move	a1, t0
+	# have a2 point to the begin of the argument space on stack
+	addiu	a2, sp, FRAMESZ
+
+	# PrepareAndDispatch(that, methodIndex, args)
+	jalr	t9
+
+	# Micro-optimization: Using jalr explicitly has the side-effect
+	# of not triggering .cprestore. This is ok because we have no
+	# gp reference below this point. It also allows better
+	# instruction sscheduling.
+	# lw	gp, GPOFF(fp)
+ 
+ 	lw	ra, RAOFF(sp)
+	addiu	sp, FRAMESZ
+	j	ra
+	END(dummy)



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/007_mozilla-firefox-1.5-asneeded.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/007_mozilla-firefox-1.5-asneeded.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/007_mozilla-firefox-1.5-asneeded.patch?rev=1.1&content-type=text/plain

Index: 007_mozilla-firefox-1.5-asneeded.patch
===================================================================
# Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=311236

--- mozilla/embedding/browser/gtk/tests/Makefile.in.orig	2005-02-04 00:01:41.000000000 +0100
+++ mozilla/embedding/browser/gtk/tests/Makefile.in	2006-04-28 05:21:10.000000000 +0200
@@ -75,6 +75,8 @@
 endif
 endif
 
+OS_LDFLAGS += -Wl,-rpath-link,'$(DEPTH)/dist/bin'
+
 ifdef MOZ_ENABLE_GTK
 LIBS		+= \
 		-lgtkembedmoz \



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/008_firefox-pkgconfig-1.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/008_firefox-pkgconfig-1.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/008_firefox-pkgconfig-1.patch?rev=1.1&content-type=text/plain

Index: 008_firefox-pkgconfig-1.patch
===================================================================
# Fixup pkgconfig files for broken out NSPR and NSS.  Patch from Fedora.
# Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=221823

--- mozilla/config/autoconf.mk.in.orig	2006-06-14 22:16:08.000000000 +0200
+++ mozilla/config/autoconf.mk.in	2006-07-20 11:00:13.000000000 +0200
@@ -57,13 +57,13 @@
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
 bindir		= @bindir@
-includedir	= @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+includedir	= $(mozappdir)/include
 libdir		= @libdir@
 datadir		= @datadir@
 mandir		= @mandir@
-idldir		= @datadir@/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+idldir		= $(mozappdir)/idl
 
-mozappdir	= $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
+mozappdir	= $(libdir)/mozilla-$(MOZ_APP_NAME)
 mredir		= $(libdir)/mre/mre-$(MOZ_APP_VERSION)
 mrelibdir	= $(mredir)/lib
 
--- mozilla/build/unix/Makefile.in.orig	2005-07-07 20:24:39.000000000 +0200
+++ mozilla/build/unix/Makefile.in	2006-07-20 11:00:13.000000000 +0200
@@ -61,6 +61,19 @@
 NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version)
 endif
 
+# Hack to make sure that mozilla-nss.pc has the proper nss dependencies
+ifdef MOZ_NATIVE_NSS
+FULL_NSS_CFLAGS=$(shell $(NSS_CONFIG) --cflags)
+FULL_NSS_LIBS=$(shell $(NSS_CONFIG) --libs)
+NSS_NAME=nss
+NSS_VERSION=$(shell $(NSS_CONFIG) --version)
+else
+FULL_NSS_CFLAGS=-I$(includedir)/nss
+FULL_NSS_LIBS=-L$(mozappdir)/nss -lnss3 -lsmime3 -lssl3 -lsoftokn3
+NSS_NAME=$(MOZ_APP_NAME)-nss
+NSS_VERSION=$(MOZ_APP_VERSION)
+endif
+
 ifdef MOZ_ENABLE_GTK
 SUPERWIN_LIBS=-lgtksuperwin
 endif
@@ -83,7 +96,8 @@
 	-e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
 	-e "s|%DEFS%|$(_DEFS)|" \
 	-e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
-	-e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@
+	-e 's|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|' \
+	-e 's|\(echo -L.*\)\($$\)|\1 -Wl,-R$(mozappdir)\2|' > $@
 
 $(MOZ_APP_NAME)-%.pc : mozilla-%.pc.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
 	cat $< | sed \
@@ -99,7 +113,12 @@
 	-e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
 	-e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
 	-e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
-	-e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" > $@
+	-e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \
+	-e "s|%FULL_NSS_LIBS%|$(FULL_NSS_LIBS)|" \
+	-e "s|%FULL_NSS_CFLAGS%|$(FULL_NSS_CFLAGS)|" \
+	-e "s|%NSS_NAME%|$(NSS_NAME)|" \
+	-e "s|%NSS_VERSION%|$(NSS_VERSION)|" \
+	-e "s|\(^Libs: -L.*\)|\1 -Wl,-R\$$\{libdir}|" > $@
 
 libs:: $(MOZ_APP_NAME)-config
 	chmod 755 $<
--- mozilla/build/unix/mozilla-js.pc.in.orig	2006-07-20 10:58:48.000000000 +0200
+++ mozilla/build/unix/mozilla-js.pc.in	2006-07-20 11:00:13.000000000 +0200
@@ -6,6 +6,6 @@
 Name: JavaScript
 Description: The Mozilla JavaScript Library
 Version: %MOZILLA_VERSION%
-Requires: %NSPR_NAME% >= %NSPR_VERSION%
+Requires: %MOZ_APP_NAME%-%NSPR_NAME% >= %NSPR_VERSION%
 Libs: -L${libdir} -lmozjs
 Cflags: -I${includedir}/js -DXP_UNIX
--- mozilla/build/unix/mozilla-nspr.pc.in.orig	2006-07-20 10:59:11.000000000 +0200
+++ mozilla/build/unix/mozilla-nspr.pc.in	2006-07-20 11:00:13.000000000 +0200
@@ -1,12 +1,5 @@
-prefix=%prefix%
-exec_prefix=%exec_prefix%
-libdir=%libdir%
-includedir=%includedir%
-
 Name: NSPR
 Description: The Netscape Portable Runtime
 Version: %NSPR_VERSION%
-Libs: %FULL_NSPR_LIBS%
-Cflags: %FULL_NSPR_CFLAGS%
-
+Requires: %NSPR_NAME% >= %NSPR_VERSION%
 
--- mozilla/build/unix/mozilla-xpcom.pc.in.orig	2006-07-20 10:59:32.000000000 +0200
+++ mozilla/build/unix/mozilla-xpcom.pc.in	2006-07-20 11:00:13.000000000 +0200
@@ -7,6 +7,6 @@
 Name: XPCOM
 Description: The Mozilla Cross Platform Component Library
 Version: %MOZILLA_VERSION%
-Requires: %NSPR_NAME% >= %NSPR_VERSION%
+Requires: %MOZ_APP_NAME%-%NSPR_NAME% >= %NSPR_VERSION%
 Libs: -L${libdir} -lxpcom
 Cflags: -I${includedir} -I${includedir}/xpcom -I${includedir}/string
--- mozilla/build/unix/mozilla-nss.pc.in.orig	2006-07-20 10:59:41.000000000 +0200
+++ mozilla/build/unix/mozilla-nss.pc.in	2006-07-20 11:00:13.000000000 +0200
@@ -1,11 +1,4 @@
-prefix=%prefix%
-exec_prefix=%exec_prefix%
-libdir=%libdir%
-includedir=%includedir%
-
 Name: NSS
 Description: Mozilla Network Security Services
-Version: %MOZILLA_VERSION%
-Requires: %NSPR_NAME% >= %NSPR_VERSION%
-Libs: -L${libdir} -lnss3 -lsmime3 -lssl3 -lsoftokn3
-Cflags: -I${includedir}/nss
+Version: %NSS_VERSION%
+Requires: %NSS_NAME% >= %NSS_VERSION%



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/010_visibility-gcc-4.2.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/010_visibility-gcc-4.2.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/010_visibility-gcc-4.2.patch?rev=1.1&content-type=text/plain

Index: 010_visibility-gcc-4.2.patch
===================================================================
--- configure.in.orig	2007-10-12 20:39:27.000000000 +0200
+++ configure.in	2007-10-12 20:40:49.000000000 +0200
@@ -2657,8 +2657,7 @@
                        ])
         if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \
                 "$ac_cv_have_visibility_class_bug" = "no"; then
-          VISIBILITY_FLAGS='-I$(DIST)/include/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
-          WRAP_SYSTEM_INCLUDES=1
+          VISIBILITY_FLAGS='-fvisibility=hidden'
         else
           VISIBILITY_FLAGS='-fvisibility=hidden'
         fi # have visibility pragma bug



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/032_firefox-2.0_ppc64-1.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/032_firefox-2.0_ppc64-1.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/032_firefox-2.0_ppc64-1.patch?rev=1.1&content-type=text/plain

Index: 032_firefox-2.0_ppc64-1.patch
===================================================================
# Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=361415

unchanged:
--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in	2006-11-21 17:09:28.000000000 +0000
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in	2006-11-20 10:13:38.000000000 +0000
@@ -267,6 +267,11 @@
 ASFILES		:= xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
 AS		:= $(CC) -c -x assembler-with-cpp
 endif
+ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc64)
+CPPSRCS		:= xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
+ASFILES		:= xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
+AS		:= $(CC) -c -x assembler-with-cpp
+endif
 
 #
 # NetBSD/PPC
diff -u mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s
--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s	2006-11-21 14:01:45.000000000 +0000
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s	2006-11-22 10:43:26.000000000 +0000
@@ -0,0 +1,154 @@
+// -*- Mode: Asm -*-
+//
+// The contents of this file are subject to the Netscape Public
+// License Version 1.1 (the "License"); you may not use this file
+// except in compliance with the License. You may obtain a copy of
+// the License at http://www.mozilla.org/NPL/
+//
+// Software distributed under the License is distributed on an "AS
+// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+// implied. See the License for the specific language governing
+// rights and limitations under the License.
+//
+// The Original Code is mozilla.org code.
+//
+// The Initial Developer of the Original Code is Netscape
+// Communications Corporation.  Portions created by Netscape are
+// Copyright (C) 1999 Netscape Communications Corporation. All
+// Rights Reserved.
+//
+// Contributor(s):
+//   dwmw2@infradead.org (David Woodhouse)
+//   Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
+//   beard@netscape.com (Patrick Beard)
+//   waterson@netscape.com (Chris Waterson)
+//
+
+.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4
+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
+.set r30,30; .set r31,31
+.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
+.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
+.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
+.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
+.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
+.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
+.set f30,30; .set f31,31
+
+
+//
+// XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
+//                    PRUint32 paramCount, nsXPTCVariant* params)
+//
+
+	.section ".toc","aw"
+	.section ".text"
+	.align 2
+	.globl XPTC_InvokeByIndex
+	.section ".opd","aw"
+	.align 3
+XPTC_InvokeByIndex:
+	.quad   .XPTC_InvokeByIndex,.TOC.@tocbase
+	.previous
+	.type  XPTC_InvokeByIndex,@function
+.XPTC_InvokeByIndex:
+	mflr	0
+	std	0,16(r1)
+	
+	std	r29,-24(r1)
+	std	r30,-16(r1)
+	std	r31,-8(r1)
+
+	mr	r29,r3			// Save 'that' in r29
+	mr	r30,r4			// Save 'methodIndex' in r30
+	mr	r31,r1			// Save old frame
+
+	// Allocate stack frame with space for params. Since at least the
+	// first 7 parameters (not including 'that') will be in registers,
+	// we don't actually need stack space for those. We must ensure
+	// that the stack remains 16-byte aligned.
+	//
+	//  | ..128-byte stack frame.. |     | 7 GP | 13 FP | 3 NV |
+	//  |               |(params)........| regs | regs  | regs |
+	// (r1)...........(+112)....(+128)
+	//                               (-23*8).(-16*8).(-3*8)..(r31)
+
+	// +stack frame, -unused stack params, +regs storage, +1 for alignment
+	addi	r7,r5,((112/8)-7+7+13+3+1)
+	rldicr	r7,r7,3,59		// multiply by 8 and mask with ~15
+	neg	r7,r7
+	stdux	r1,r1,r7
+
+	
+	// Call invoke_copy_to_stack(PRUint64* gpregs, double* fpregs,
+	//			     PRUint32 paramCount, nsXPTCVariant* s, 
+	//			     PRUint64* d))
+	
+	// r5, r6 are passed through intact (paramCount, params)
+	// r7 (d) has to be r1+112 -- where parameters are passed on the stack.
+	// r3, r4 are above that, easier to address from r31 than from r1
+
+	subi	r3,r31,(23*8)		// r3 --> GPRS
+	subi	r4,r31,(16*8)		// r4 --> FPRS
+	addi	r7,r1,112		// r7 --> params
+	bl	invoke_copy_to_stack
+	nop
+
+	// Set up to invoke function
+	
+	ld	r9,0(r29)		// vtable (r29 is 'that')
+	mr	r3,r29		// self is first arg, obviously
+
+	sldi	r30,r30,3	// Find function descriptor 
+	add	r9,r9,r30
+	ld	r9,0(r9)
+	
+	ld	r0,0(r9)	// Actual address from fd.
+	std	r2,40(r1)	// Save r2 (TOC pointer)
+
+	mtctr	0
+	ld	r11,16(r9)	// Environment pointer from fd.
+	ld	r2,8(r9)	// TOC pointer from fd.
+
+	// Load FP and GP registers as required
+	ld	r4, -(23*8)(r31) 
+	ld	r5, -(22*8)(r31) 
+	ld	r6, -(21*8)(r31) 
+	ld	r7, -(20*8)(r31) 
+	ld	r8, -(19*8)(r31) 
+	ld	r9, -(18*8)(r31) 
+	ld	r10, -(17*8)(r31) 
+
+	lfd	f1, -(16*8)(r31)
+	lfd	f2, -(15*8)(r31)
+	lfd	f3, -(14*8)(r31)
+	lfd	f4, -(13*8)(r31)
+	lfd	f5, -(12*8)(r31)
+	lfd	f6, -(11*8)(r31)
+	lfd	f7, -(10*8)(r31)
+	lfd	f8, -(9*8)(r31)
+	lfd	f9, -(8*8)(r31)
+	lfd	f10, -(7*8)(r31)
+	lfd	f11, -(6*8)(r31)
+	lfd	f12, -(5*8)(r31)
+	lfd	f13, -(4*8)(r31)
+
+	bctrl			// Do it
+
+	ld	r2,40(r1)	// Load our own TOC pointer
+	ld	r1,0(r1)	// Revert stack frame
+	ld	0,16(r1)	// Reload lr
+	ld	29,-24(r1)	// Restore NVGPRS
+	ld	30,-16(r1)
+	ld	31,-8(r1)
+	mtlr	0
+	blr
+
+	.size   XPTC_InvokeByIndex,.-.XPTC_InvokeByIndex
+
+	/* Magic indicating no need for an executable stack */
+	.section .note.GNU-stack, "", @progbits ; .previous
--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp	1970-01-01 01:00:00.000000000 +0100
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp	2006-11-21 17:00:06.000000000 +0000
@@ -0,0 +1,127 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   dwmw2@infradead.org (David Woodhouse)
+ *   Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
+ *   beard@netscape.com (Patrick Beard)
+ *   waterson@netscape.com (Chris Waterson)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+// Platform specific code to invoke XPCOM methods on native objects
+
+// The purpose of XPTC_InvokeByIndex() is to map a platform
+// independent call to the platform ABI. To do that,
+// XPTC_InvokeByIndex() has to determine the method to call via vtable
+// access. The parameters for the method are read from the
+// nsXPTCVariant* and prepared for the native ABI.
+
+#include <stdio.h>
+#include "xptcprivate.h"
+
+// 8 integral parameters are passed in registers, not including 'that'
+#define GPR_COUNT     7
+
+// 8 floating point parameters are passed in registers, floats are
+// promoted to doubles when passed in registers
+#define FPR_COUNT     13
+
+extern "C" PRUint32
+invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
+{
+  return PRUint32(((paramCount * 2) + 3) & ~3);
+}
+
+extern "C" void
+invoke_copy_to_stack(PRUint64* gpregs,
+                     double* fpregs,
+                     PRUint32 paramCount,
+                     nsXPTCVariant* s, 
+                     PRUint64* d)
+{
+    PRUint64 tempu64;
+
+    for(uint32 i = 0; i < paramCount; i++, s++) {
+        if(s->IsPtrData())
+            tempu64 = (PRUint64) s->ptr;
+        else {
+            switch(s->type) {
+            case nsXPTType::T_FLOAT:                                  break;
+            case nsXPTType::T_DOUBLE:                                 break;
+            case nsXPTType::T_I8:     tempu64 = s->val.i8;            break;
+            case nsXPTType::T_I16:    tempu64 = s->val.i16;           break;
+            case nsXPTType::T_I32:    tempu64 = s->val.i32;           break;
+            case nsXPTType::T_I64:    tempu64 = s->val.i64;           break;
+            case nsXPTType::T_U8:     tempu64 = s->val.u8;            break;
+            case nsXPTType::T_U16:    tempu64 = s->val.u16;           break;
+            case nsXPTType::T_U32:    tempu64 = s->val.u32;           break;
+            case nsXPTType::T_U64:    tempu64 = s->val.u64;           break;
+            case nsXPTType::T_BOOL:   tempu64 = s->val.b;             break;
+            case nsXPTType::T_CHAR:   tempu64 = s->val.c;             break;
+            case nsXPTType::T_WCHAR:  tempu64 = s->val.wc;            break;
+            default:                  tempu64 = (PRUint64) s->val.p;  break;
+            }
+        }
+
+        if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
+            if (i < FPR_COUNT)
+                fpregs[i]    = s->val.d;
+            else
+                *(double *)d = s->val.d;
+        }
+        else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
+            if (i < FPR_COUNT) {
+                fpregs[i]   = s->val.f; // if passed in registers, floats are promoted to doubles
+            } else {
+                float *p = (float *)d;
+                p++;
+                *p = s->val.f;
+            }
+        }
+        else {
+            if (i < GPR_COUNT)
+                gpregs[i] = tempu64;
+            else
+                *d          = tempu64;
+        }
+        if (i >= 7)
+            d++;
+    }
+}
+
+extern "C"
+XPTC_PUBLIC_API(nsresult)
+XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
+                   PRUint32 paramCount, nsXPTCVariant* params);
+
diff -u mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s
--- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s	2006-11-21 16:38:52.000000000 +0000
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s	2006-11-22 10:51:14.000000000 +0000
@@ -0,0 +1,102 @@
+// -*- Mode: Asm -*-
+//
+// The contents of this file are subject to the Netscape Public
+// License Version 1.1 (the "License"); you may not use this file
+// except in compliance with the License. You may obtain a copy of
+// the License at http://www.mozilla.org/NPL/
+//
+// Software distributed under the License is distributed on an "AS
+// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
+// implied. See the License for the specific language governing
+// rights and limitations under the License.
+//
+// The Original Code is mozilla.org code.
+//
+// The Initial Developer of the Original Code is Netscape
+// Communications Corporation.  Portions created by Netscape are
+// Copyright (C) 1999 Netscape Communications Corporation. All
+// Rights Reserved.
+//
+// Contributor(s):
+//   dwmw2@infradead.org (David Woodhouse)
+//   Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
+//   beard@netscape.com (Patrick Beard)
+//   waterson@netscape.com (Chris Waterson)
+//
+
+.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4
+.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
+.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
+.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
+.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
+.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
+.set r30,30; .set r31,31
+.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
+.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
+.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
+.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
+.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
+.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
+.set f30,30; .set f31,31
+
+	.section ".text"
+	.align 2
+	.globl SharedStub
+	.section	".opd","aw"
+	.align 3
+
+SharedStub:
+	.quad   .SharedStub,.TOC.@tocbase
+	.previous
+      	.type  SharedStub,@function
+
+.SharedStub:
+	mflr	r0
+
+	std	r4, -56(r1)			// Save all GPRS
+	std	r5, -48(r1)
+	std	r6, -40(r1)
+	std	r7, -32(r1)
+	std	r8, -24(r1)
+	std	r9, -16(r1)
+	std	r10, -8(r1)
+
+	stfd	f13, -64(r1)			// ... and FPRS
+	stfd	f12, -72(r1)
+	stfd	f11, -80(r1)
+	stfd	f10, -88(r1)
+	stfd	f9, -96(r1)
+	stfd	f8, -104(r1)
+	stfd	f7, -112(r1)
+	stfd	f6, -120(r1)
+	stfd	f5, -128(r1)
+	stfd	f4, -136(r1)
+	stfd	f3, -144(r1)
+	stfd	f2, -152(r1)
+	stfd	f1, -160(r1)
+
+	subi	r6,r1,56			// r6 --> gprData
+	subi	r7,r1,160			// r7 --> fprData
+	addi	r5,r1,112			// r5 --> extra stack args
+
+	std	r0, 16(r1)
+	
+	stdu	r1,-288(r1)
+					// r3 has the 'self' pointer already
+	
+	mr      r4,r11		// r4 is methodIndex selector, passed
+				// via r11 in the nsXPTCStubBase::StubXX() call
+	
+	bl	PrepareAndDispatch
+	nop
+
+	ld	1,0(r1)				// restore stack
+	ld	r0,16(r1)			// restore LR
+	mtlr	r0
+	blr
+
+	.size   SharedStub,.-.SharedStub
+
+
+/* Magic indicating no need for an executable stack */
+.section .note.GNU-stack, "", @progbits ; .previous
unchanged:
--- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp	1970-01-01 01:00:00.000000000 +0100
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp	2006-11-21 16:59:46.000000000 +0000
@@ -0,0 +1,247 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1999
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   dwmw2@infradead.org (David Woodhouse)
+ *   Franz.Sirl-kernel@lauterbach.com (Franz Sirl)
+ *   beard@netscape.com (Patrick Beard)
+ *   waterson@netscape.com (Chris Waterson)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+// Implement shared vtbl methods.
+
+#include "xptcprivate.h"
+
+// The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral
+// parameters and the first 13 floating point parameters in registers
+// (r3-r10 and f1-f13), no stack space is allocated for these by the
+// caller.  The rest of the parameters are passed in the callers stack
+// area. The stack pointer has to retain 16-byte alignment, longlongs
+// and doubles are aligned on 8-byte boundaries.
+
+#define PARAM_BUFFER_COUNT     16
+#define GPR_COUNT               7
+#define FPR_COUNT               13
+
+// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
+//
+// - 'args[]' contains the arguments passed on stack
+// - 'gprData[]' contains the arguments passed in integer registers
+// - 'fprData[]' contains the arguments passed in floating point registers
+// 
+// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
+// and then the method gets called.
+#include <stdio.h>
+extern "C" nsresult
+PrepareAndDispatch(nsXPTCStubBase* self,
+                   PRUint64 methodIndex,
+                   PRUint64* args,
+                   PRUint64 *gprData,
+                   double *fprData)
+{
+    nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
+    nsXPTCMiniVariant* dispatchParams = NULL;
+    nsIInterfaceInfo* iface_info = NULL;
+    const nsXPTMethodInfo* info;
+    PRUint32 paramCount;
+    PRUint32 i;
+    nsresult result = NS_ERROR_FAILURE;
+
+    NS_ASSERTION(self,"no self");
+
+    self->GetInterfaceInfo(&iface_info);
+    NS_ASSERTION(iface_info,"no interface info");
+    if (! iface_info)
+        return NS_ERROR_UNEXPECTED;
+
+    iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
+    NS_ASSERTION(info,"no method info");
+    if (! info)
+        return NS_ERROR_UNEXPECTED;
+
+    paramCount = info->GetParamCount();
+
+    // setup variant array pointer
+    if(paramCount > PARAM_BUFFER_COUNT)
+        dispatchParams = new nsXPTCMiniVariant[paramCount];
+    else
+        dispatchParams = paramBuffer;
+
+    NS_ASSERTION(dispatchParams,"no place for params");
+    if (! dispatchParams)
+        return NS_ERROR_OUT_OF_MEMORY;
+
+    PRUint64* ap = args;
+    PRUint64 tempu64;
+
+    for(i = 0; i < paramCount; i++) {
+        const nsXPTParamInfo& param = info->GetParam(i);
+        const nsXPTType& type = param.GetType();
+        nsXPTCMiniVariant* dp = &dispatchParams[i];
+	
+        if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
+            if (i < FPR_COUNT)
+                dp->val.d = fprData[i];
+            else
+                dp->val.d = *(double*) ap;
+        } else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
+            if (i < FPR_COUNT)
+                dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles
+            else {
+                float *p = (float *)ap;
+                p++;
+                dp->val.f = *p;
+            }
+        } else { /* integer type or pointer */
+            if (i < GPR_COUNT)
+                tempu64 = gprData[i];
+            else
+                tempu64 = *ap;
+
+            if (param.IsOut() || !type.IsArithmetic())
+                dp->val.p = (void*) tempu64;
+            else if (type ==nsXPTType::T_I8)
+                dp->val.i8  = (PRInt8)   tempu64;
+            else if (type ==nsXPTType::T_I16)
+                dp->val.i16 = (PRInt16)  tempu64;
+            else if (type ==nsXPTType::T_I32)
+                dp->val.i32 = (PRInt32)  tempu64;
+            else if (type ==nsXPTType::T_I64)
+                dp->val.i64 = (PRInt64)  tempu64;
+            else if (type ==nsXPTType::T_U8)
+                dp->val.u8  = (PRUint8)  tempu64;
+            else if (type ==nsXPTType::T_U16)
+                dp->val.u16 = (PRUint16) tempu64;
+            else if (type ==nsXPTType::T_U32)
+                dp->val.u32 = (PRUint32) tempu64;
+            else if (type ==nsXPTType::T_U64)
+                dp->val.u64 = (PRUint64) tempu64;
+            else if (type ==nsXPTType::T_BOOL)
+                dp->val.b   = (PRBool)   tempu64;
+            else if (type ==nsXPTType::T_CHAR)
+                dp->val.c   = (char)     tempu64;
+            else if (type ==nsXPTType::T_WCHAR)
+                dp->val.wc  = (wchar_t)  tempu64;
+            else
+                NS_ASSERTION(0, "bad type");
+        }
+
+        if (i >= 7)
+            ap++;
+    }
+
+    result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
+
+    NS_RELEASE(iface_info);
+
+    if (dispatchParams != paramBuffer)
+        delete [] dispatchParams;
+
+    return result;
+}
+
+// Load r11 with the constant 'n' and branch to SharedStub().
+//
+// XXX Yes, it's ugly that we're relying on gcc's name-mangling here;
+// however, it's quick, dirty, and'll break when the ABI changes on
+// us, which is what we want ;-).
+
+#if __GXX_ABI_VERSION < 100
+#error Prehistoric GCC not supported here
+#else
+// gcc-3 version
+//
+// As G++3 ABI contains the length of the functionname in the mangled
+// name, it is difficult to get a generic assembler mechanism like
+// in the G++ 2.95 case.
+// Create names would be like:
+// _ZN14nsXPTCStubBase5Stub1Ev
+// _ZN14nsXPTCStubBase6Stub12Ev
+// _ZN14nsXPTCStubBase7Stub123Ev
+// _ZN14nsXPTCStubBase8Stub1234Ev
+// etc.
+// Use assembler directives to get the names right...
+
+# define STUB_ENTRY(n)							\
+__asm__ (								\
+        ".section \".toc\",\"aw\" \n\t"                                 \
+        ".section \".text\" \n\t"                                       \
+	".align	2 \n\t"							\
+	".if	"#n" < 10 \n\t"						\
+	".globl	_ZN14nsXPTCStubBase5Stub"#n"Ev \n\t"			\
+        ".section \".opd\",\"aw\" \n\t"                                 \
+	".align	3 \n\t"							\
+"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t"					\
+        ".quad  ._ZN14nsXPTCStubBase5Stub"#n"Ev,.TOC.@tocbase \n\t"     \
+	".previous \n\t"						\
+	".type	_ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n"		\
+"._ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t"					\
+									\
+	".elseif "#n" < 100 \n\t"					\
+	".globl	_ZN14nsXPTCStubBase6Stub"#n"Ev \n\t"			\
+        ".section \".opd\",\"aw\" \n\t"                                 \
+	".align	3 \n\t"							\
+"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t"					\
+        ".quad  ._ZN14nsXPTCStubBase6Stub"#n"Ev,.TOC.@tocbase \n\t"     \
+	".previous \n\t"						\
+	".type	_ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n"		\
+"._ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t"					\
+									\
+	".elseif "#n" < 1000 \n\t"					\
+	".globl	_ZN14nsXPTCStubBase7Stub"#n"Ev \n\t"			\
+        ".section \".opd\",\"aw\" \n\t"                                 \
+	".align	3 \n\t"							\
+"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t"					\
+        ".quad  ._ZN14nsXPTCStubBase7Stub"#n"Ev,.TOC.@tocbase \n\t"     \
+	".previous \n\t"						\
+	".type	_ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n"		\
+"._ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t"					\
+									\
+	".else \n\t"							\
+	".err	\"stub number "#n" >= 1000 not yet supported\"\n"	\
+	".endif \n\t"							\
+									\
+	"li	11,"#n" \n\t"						\
+	"b	SharedStub \n"					\
+);
+#endif
+
+#define SENTINEL_ENTRY(n)                            \
+nsresult nsXPTCStubBase::Sentinel##n()               \
+{                                                    \
+  NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
+  return NS_ERROR_NOT_IMPLEMENTED;                   \
+}
+
+#include "xptcstubsdef.inc"



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/033_firefox-2.0_ppc_powerpc.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/033_firefox-2.0_ppc_powerpc.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/033_firefox-2.0_ppc_powerpc.patch?rev=1.1&content-type=text/plain

Index: 033_firefox-2.0_ppc_powerpc.patch
===================================================================
--- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig	2007-03-05 13:46:38.000000000 +0100
+++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in	2007-03-05 13:47:30.000000000 +0100
@@ -288,12 +288,12 @@
 #
 # Linux/PPC
 #
-ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc)
+ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
 CPPSRCS		:= xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
 ASFILES		:= xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
 AS		:= $(CC) -c -x assembler-with-cpp
 endif
-ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc64)
+ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
 CPPSRCS		:= xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
 ASFILES		:= xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
 AS		:= $(CC) -c -x assembler-with-cpp



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/050_respect-host-variable.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/050_respect-host-variable.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/050_respect-host-variable.patch?rev=1.1&content-type=text/plain

Index: 050_respect-host-variable.patch
===================================================================
# https://bugs.gentoo.org/show_bug.cgi?id=168893

--- mozilla/configure.in.old	2007-03-02 23:28:27.000000000 +0200
+++ mozilla/configure.in	2007-03-02 23:29:23.000000000 +0200
@@ -825,7 +825,6 @@
     OS_TARGET="${target_os}"
     OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
     OS_RELEASE=
-    OS_TEST="${target_cpu}"
     case "${target_os}" in
         linux*)       OS_ARCH=Linux ;;
         solaris*)     OS_ARCH=SunOS OS_RELEASE=5 ;;
@@ -837,8 +836,10 @@
     OS_TARGET=`uname -s`
     OS_ARCH=`uname -s | sed -e 's|/|_|g'`
     OS_RELEASE=`uname -r`
-    OS_TEST=`uname -m`
 fi
+
+OS_TEST="${target_cpu}"
+
 _COMPILER_PREFIX=
 
 HOST_OS_ARCH=`echo $host_os | sed -e 's|/|_|g'`



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/055_firefox-2.0_gfbsd-pthreads.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&content-type=text/plain

Index: 055_firefox-2.0_gfbsd-pthreads.patch
===================================================================
# https://bugs.gentoo.org/show_bug.cgi?id=169825

--- mozilla/config/rules.mk.orig	Thu Sep 14 14:07:03 2006
+++ mozilla/config/rules.mk	Wed Oct 18 11:00:09 2006
@@ -442,9 +442,7 @@
 endif
 
 ifeq ($(OS_ARCH),FreeBSD)
-ifdef IS_COMPONENT
-EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
-endif
+EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc
 endif
 
 ifeq ($(OS_ARCH),NetBSD)
--- mozilla/configure.in.orig	2007-02-06 02:37:37 -0300
+++ mozilla/configure.in	2007-03-07 15:35:41 -0300
@@ -2667,7 +2667,7 @@
 *-hpux11.*)
 	;;
 *)
-	AC_CHECK_LIB(c_r, gethostbyname_r)
+	AC_SEARCH_LIBS([gethostbyname_r], [c_r])
 	;;
 esac
 AC_CHECK_LIB(m, atan)
--- mozilla/configure.in.orig   2007-02-06 02:37:37 -0300
+++ mozilla/configure.in	2007-03-07 13:59:53 -0300
@@ -2839,11 +2839,12 @@
 	    *-*-freebsd*)
 			AC_DEFINE(_REENTRANT)
 			AC_DEFINE(_THREAD_SAFE)
-			dnl -pthread links in -lc_r, so don't specify it explicitly.
-			if test "$ac_cv_have_dash_pthread" = "yes"; then
-				_PTHREAD_LDFLAGS="-pthread"
+			dnl use the environment PTHREAD_LIBS
+			if test -n "$PTHREAD_LIBS"; then
+				_PTHREAD_LDFLAGS="$PTHREAD_LIBS"
 			else
-				_PTHREAD_LDFLAGS="-lc_r"
+				_PTHREAD_LDFLAGS="-lpthread"
 			fi
+			LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
 			;;



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/060_embed-typeaheadfind-1.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/060_embed-typeaheadfind-1.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/060_embed-typeaheadfind-1.patch?rev=1.1&content-type=text/plain

Index: 060_embed-typeaheadfind-1.patch
===================================================================
# Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=273524

diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/Makefile.in mozilla/extensions/typeaheadfind/Makefile.in
--- mozilla.orig/extensions/typeaheadfind/Makefile.in	2005-03-26 00:12:02.000000000 -0500
+++ mozilla/extensions/typeaheadfind/Makefile.in	2005-03-26 11:39:29.000000000 -0500
@@ -31,7 +31,7 @@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE		= typeaheadfind
+MODULE		= typeaheadfindsea
 DIRS		= public src resources
 
 include $(topsrcdir)/config/rules.mk
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/Makefile.in mozilla/extensions/typeaheadfind/public/Makefile.in
--- mozilla.orig/extensions/typeaheadfind/public/Makefile.in	2005-03-26 00:12:02.000000000 -0500
+++ mozilla/extensions/typeaheadfind/public/Makefile.in	2005-03-26 11:39:29.000000000 -0500
@@ -31,11 +31,11 @@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE=typeaheadfind
-XPIDL_MODULE=typeaheadfind
+MODULE=typeaheadfindsea
+XPIDL_MODULE=typeaheadfindsea
 GRE_MODULE	= 1
 
-XPIDLSRCS= ./nsITypeAheadFind.idl \
+XPIDLSRCS= ./nsITypeAheadFindSea.idl \
   $(NULL)
 
 
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFind.idl mozilla/extensions/typeaheadfind/public/nsITypeAheadFind.idl
--- mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFind.idl	2005-03-26 00:12:02.000000000 -0500
+++ mozilla/extensions/typeaheadfind/public/nsITypeAheadFind.idl	1969-12-31 19:00:00.000000000 -0500
@@ -1,88 +0,0 @@
-/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 1998
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Original Author: Aaron Leventhal (aaronl@netscape.com)
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
-
-#include "nsISupports.idl"
-#include "domstubs.idl"
-#include "nsISupportsPrimitives.idl"
-
-%{ C++
-  #include "nsIDOMEvent.h"
-
-  #define NS_TYPEAHEADFIND_CID \
-    {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}}
-
-  #define NS_TYPEAHEADFIND_CONTRACTID "@mozilla.org/typeaheadfind;1"
-%}
-
-interface nsIDOMEvent;
-
-[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)]
-interface nsITypeAheadFind : nsISupports
-{
-  /** Is type ahead find mode currently on? */
-  readonly attribute boolean isActive;
-
-  /** Manually start type ahead find mode */
-  void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly);
-
-  /** Manually cancel type ahead find mode */
-  void cancelFind();
-
-  /**
-    * Will find as you type start automatically if the user
-    * types with the focus on page content other than a textfield or select?
-    * If autostart is off, the startNewFind() method can be used to enact
-    * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText.
-    */
-  void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn);
-  boolean getAutoStart(in nsIDOMWindow aWindow);  
-
-  /**
-    * Find next recurrence if typeaheadfind was the last used find, 
-    * as opposed to regular find. Returns false in nsISupportsPRBool if we
-    * don't handle the request.
-    */
-  void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports);
-
-  /*
-   * Go back and remove one character from find string
-   * Returns true if backspace used
-   */
-  boolean backOneChar();
-};
-
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl mozilla/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl
--- mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl	1969-12-31 19:00:00.000000000 -0500
+++ mozilla/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl	2005-03-26 11:39:29.000000000 -0500
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is mozilla.org code.
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Original Author: Aaron Leventhal (aaronl@netscape.com)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "nsISupports.idl"
+#include "domstubs.idl"
+#include "nsISupportsPrimitives.idl"
+
+%{ C++
+  #include "nsIDOMEvent.h"
+
+  #define NS_TYPEAHEADFINDSEA_CID \
+    {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}}
+
+  #define NS_TYPEAHEADFINDSEA_CONTRACTID "@mozilla.org/typeaheadfindsea;1"
+%}
+
+interface nsIDOMEvent;
+
+[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)]
+interface nsITypeAheadFindSea : nsISupports
+{
+  /** Is type ahead find mode currently on? */
+  readonly attribute boolean isActive;
+
+  /** Manually start type ahead find mode */
+  void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly);
+
+  /** Manually cancel type ahead find mode */
+  void cancelFind();
+
+  /**
+    * Will find as you type start automatically if the user
+    * types with the focus on page content other than a textfield or select?
+    * If autostart is off, the startNewFind() method can be used to enact
+    * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText.
+    */
+  void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn);
+  boolean getAutoStart(in nsIDOMWindow aWindow);  
+
+  /**
+    * Find next recurrence if typeaheadfindsea was the last used find, 
+    * as opposed to regular find. Returns false in nsISupportsPRBool if we
+    * don't handle the request.
+    */
+  void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports);
+
+  /*
+   * Go back and remove one character from find string
+   * Returns true if backspace used
+   */
+  boolean backOneChar();
+};
+
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js mozilla/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js
--- mozilla.orig/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js	2005-03-26 00:12:02.000000000 -0500
+++ mozilla/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js	2005-03-26 11:39:29.000000000 -0500
@@ -36,7 +36,7 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
-pref("accessibility.typeaheadfind", true);
-pref("accessibility.typeaheadfind.linksonly", true);
-pref("accessibility.typeaheadfind.startlinksonly", false);
-pref("accessibility.typeaheadfind.timeout", 5000);
+pref("accessibility.typeaheadfindsea", true);
+pref("accessibility.typeaheadfindsea.linksonly", true);
+pref("accessibility.typeaheadfindsea.startlinksonly", false);
+pref("accessibility.typeaheadfindsea.timeout", 5000);
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/jar.mn mozilla/extensions/typeaheadfind/resources/jar.mn
--- mozilla.orig/extensions/typeaheadfind/resources/jar.mn	2005-03-26 00:12:02.000000000 -0500
+++ mozilla/extensions/typeaheadfind/resources/jar.mn	2005-03-26 11:39:29.000000000 -0500
@@ -1,5 +1,5 @@
 en-US.jar:
-    locale/en-US/global/typeaheadfind.properties  (locale/en-US/typeaheadfind.properties)
+    locale/en-US/global/typeaheadfindsea.properties  (locale/en-US/typeaheadfindsea.properties)
 
 toolkit.jar:
     content/global/notfound.wav                   (content/notfound.wav)
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties
--- mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties	2005-03-26 00:12:02.000000000 -0500
+++ mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties	1969-12-31 19:00:00.000000000 -0500
@@ -1,13 +0,0 @@
-openparen     = (
-closeparen    = )
-textfound     = Text found: "
-textnotfound  = Text not found: "
-linkfound     = Link found: "
-linknotfound  = Link not found: "
-closequote    = "
-stopfind      = Find stopped.
-starttextfind = Starting -- find text as you type
-startlinkfind = Starting -- find links as you type
-repeated      = repeated
-nextmatch     = - next match
-prevmatch     = - previous match
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties
--- mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties	1969-12-31 19:00:00.000000000 -0500
+++ mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties	2005-03-26 11:39:29.000000000 -0500
@@ -0,0 +1,13 @@
+openparen     = (
+closeparen    = )
+textfound     = Text found: "
+textnotfound  = Text not found: "
+linkfound     = Link found: "
+linknotfound  = Link not found: "
+closequote    = "
+stopfind      = Find stopped.
+starttextfind = Starting -- find text as you type
+startlinkfind = Starting -- find links as you type
+repeated      = repeated
+nextmatch     = - next match
+prevmatch     = - previous match
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/Makefile.in mozilla/extensions/typeaheadfind/src/Makefile.in
--- mozilla.orig/extensions/typeaheadfind/src/Makefile.in	2005-03-26 00:12:02.000000000 -0500
+++ mozilla/extensions/typeaheadfind/src/Makefile.in	2005-03-26 11:39:29.000000000 -0500
@@ -31,15 +31,15 @@
 
 include $(DEPTH)/config/autoconf.mk
 
-MODULE = typeaheadfind
-LIBRARY_NAME = typeaheadfind
+MODULE = typeaheadfindsea
+LIBRARY_NAME = typeaheadfindsea
 ifneq ($(OS_ARCH),WINNT)
-SHORT_LIBNAME = typahead
+SHORT_LIBNAME = typaheadsea
 endif
 GRE_MODULE	= 1
 MOZILLA_INTERNAL_API = 1
 
-PACKAGE_FILE = typeaheadfind.pkg
+PACKAGE_FILE = typeaheadfindsea.pkg
 
 REQUIRES	= appcomps \
 		  embedcomponents \
@@ -66,7 +66,7 @@
 
 EXPORT_LIBRARY = 1
 IS_COMPONENT = 1
-MODULE_NAME	= nsTypeAheadFind
+MODULE_NAME	= nsTypeAheadFindSea
 
 CPPSRCS =   \
   nsTypeAheadFind.cpp	   \
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.cpp mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp
--- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.cpp	2005-03-26 00:12:02.000000000 -0500
+++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp	2005-03-26 11:39:29.000000000 -0500
@@ -114,8 +114,8 @@
 ////////////////////////////////////////////////////////////////////////
 
 
-NS_INTERFACE_MAP_BEGIN(nsTypeAheadFind)
-  NS_INTERFACE_MAP_ENTRY(nsITypeAheadFind)
+NS_INTERFACE_MAP_BEGIN(nsTypeAheadFindSea)
+  NS_INTERFACE_MAP_ENTRY(nsITypeAheadFindSea)
   NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
   NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
   NS_INTERFACE_MAP_ENTRY(nsIScrollPositionListener)
@@ -128,8 +128,8 @@
   NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMKeyListener)
 NS_INTERFACE_MAP_END
 
-NS_IMPL_ADDREF(nsTypeAheadFind)
-NS_IMPL_RELEASE(nsTypeAheadFind)
+NS_IMPL_ADDREF(nsTypeAheadFindSea)
+NS_IMPL_RELEASE(nsTypeAheadFindSea)
 
 static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
 static NS_DEFINE_CID(kStringBundleServiceCID,  NS_STRINGBUNDLESERVICE_CID);
@@ -138,11 +138,11 @@
 
 #define NS_FIND_CONTRACTID "@mozilla.org/embedcomp/rangefind;1"
 
-nsTypeAheadFind* nsTypeAheadFind::sInstance = nsnull;
-PRInt32 nsTypeAheadFind::sAccelKey = -1;  // magic value of -1 when unitialized
+nsTypeAheadFindSea* nsTypeAheadFindSea::sInstance = nsnull;
+PRInt32 nsTypeAheadFindSea::sAccelKey = -1;  // magic value of -1 when unitialized
 
 
-nsTypeAheadFind::nsTypeAheadFind():
+nsTypeAheadFindSea::nsTypeAheadFindSea():
   mIsFindAllowedInWindow(PR_FALSE), mAutoStartPref(PR_FALSE),
   mLinksOnlyPref(PR_FALSE), mStartLinksOnlyPref(PR_FALSE),
   mLinksOnly(PR_FALSE), mIsTypeAheadOn(PR_FALSE), mCaretBrowsingOn(PR_FALSE),
@@ -161,25 +161,25 @@
   static PRInt32 gInstanceCount;
   ++gInstanceCount;
   NS_ASSERTION(gInstanceCount == 1,
-    "There should be only 1 instance of nsTypeAheadFind!");
+    "There should be only 1 instance of nsTypeAheadFindSea!");
 #endif
 }
 
 
-nsTypeAheadFind::~nsTypeAheadFind()
+nsTypeAheadFindSea::~nsTypeAheadFindSea()
 {
   RemoveDocListeners();
   mTimer = nsnull;
 
   nsCOMPtr<nsIPrefBranch2> prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID));
   if (prefInternal) {
-    prefInternal->RemoveObserver("accessibility.typeaheadfind", this);
+    prefInternal->RemoveObserver("accessibility.typeaheadfindsea", this);
     prefInternal->RemoveObserver("accessibility.browsewithcaret", this);
   }
 }
 
 nsresult
-nsTypeAheadFind::Init()
+nsTypeAheadFindSea::Init()
 {
   nsresult rv = NS_NewISupportsArray(getter_AddRefs(mManualFindWindows));
   NS_ENSURE_SUCCESS(rv, rv);
@@ -196,7 +196,7 @@
   }
 
   // ----------- Listen to prefs ------------------
-  rv = prefInternal->AddObserver("accessibility.typeaheadfind", this, PR_FALSE);
+  rv = prefInternal->AddObserver("accessibility.typeaheadfindsea", this, PR_FALSE);
   NS_ENSURE_SUCCESS(rv, rv);
 
   rv = prefInternal->AddObserver("accessibility.browsewithcaret", this, PR_FALSE);
@@ -217,11 +217,11 @@
   return rv;
 }
 
-nsTypeAheadFind *
-nsTypeAheadFind::GetInstance()
+nsTypeAheadFindSea *
+nsTypeAheadFindSea::GetInstance()
 {
   if (!sInstance) {
-    sInstance = new nsTypeAheadFind();
+    sInstance = new nsTypeAheadFindSea();
     if (!sInstance)
       return nsnull;
 
@@ -241,14 +241,14 @@
 
 
 void
-nsTypeAheadFind::ReleaseInstance()
+nsTypeAheadFindSea::ReleaseInstance()
 {
   NS_IF_RELEASE(sInstance);
 }
 
 
 void 
-nsTypeAheadFind::Shutdown()
+nsTypeAheadFindSea::Shutdown()
 {
   // Application shutdown 
   mTimer = nsnull;
@@ -264,14 +264,14 @@
 // ------- Pref Callbacks (2) ---------------
 
 nsresult
-nsTypeAheadFind::PrefsReset()
+nsTypeAheadFindSea::PrefsReset()
 {
   nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
   NS_ENSURE_TRUE(prefBranch, NS_ERROR_FAILURE);
 
   PRBool wasTypeAheadOn = mIsTypeAheadOn;
 
-  prefBranch->GetBoolPref("accessibility.typeaheadfind", &mIsTypeAheadOn);
+  prefBranch->GetBoolPref("accessibility.typeaheadfindsea", &mIsTypeAheadOn);
 
   if (mIsTypeAheadOn != wasTypeAheadOn) {
     if (!mIsTypeAheadOn) {
@@ -291,7 +291,7 @@
         do_GetService(kStringBundleServiceCID);
 
       if (stringBundleService)
-        stringBundleService->CreateBundle(TYPEAHEADFIND_BUNDLE_URL,
+        stringBundleService->CreateBundle(TYPEAHEADFINDSEA_BUNDLE_URL,
                                           getter_AddRefs(mStringBundle));
 
       // Observe find again commands. We'll handle them if we were the last find
@@ -306,34 +306,34 @@
   }
 
   PRBool oldAutoStartPref = mAutoStartPref;
-  prefBranch->GetBoolPref("accessibility.typeaheadfind.autostart",
+  prefBranch->GetBoolPref("accessibility.typeaheadfindsea.autostart",
                            &mAutoStartPref);
   if (mAutoStartPref != oldAutoStartPref) {
     ResetGlobalAutoStart(mAutoStartPref);
   }
  
-  prefBranch->GetBoolPref("accessibility.typeaheadfind.linksonly",
+  prefBranch->GetBoolPref("accessibility.typeaheadfindsea.linksonly",
                           &mLinksOnlyPref);
 
-  prefBranch->GetBoolPref("accessibility.typeaheadfind.startlinksonly",
+  prefBranch->GetBoolPref("accessibility.typeaheadfindsea.startlinksonly",
                           &mStartLinksOnlyPref);
 
   PRBool isSoundEnabled = PR_TRUE;
-  prefBranch->GetBoolPref("accessibility.typeaheadfind.enablesound",
+  prefBranch->GetBoolPref("accessibility.typeaheadfindsea.enablesound",
                            &isSoundEnabled);
   nsXPIDLCString soundStr;
   if (isSoundEnabled) {
-    prefBranch->GetCharPref("accessibility.typeaheadfind.soundURL",
+    prefBranch->GetCharPref("accessibility.typeaheadfindsea.soundURL",
                              getter_Copies(soundStr));
   }
   mNotFoundSoundURL = soundStr;
 
   PRBool isTimeoutEnabled = PR_FALSE;
-  prefBranch->GetBoolPref("accessibility.typeaheadfind.enabletimeout",
+  prefBranch->GetBoolPref("accessibility.typeaheadfindsea.enabletimeout",
                           &isTimeoutEnabled);
   PRInt32 timeoutLength = 0;
   if (isTimeoutEnabled) {
-    prefBranch->GetIntPref("accessibility.typeaheadfind.timeout",
+    prefBranch->GetIntPref("accessibility.typeaheadfindsea.timeout",
                            &timeoutLength);
   }
   mTimeoutLength = timeoutLength;
@@ -349,7 +349,7 @@
 // ------- nsITimer Methods (1) ---------------
 
 NS_IMETHODIMP
-nsTypeAheadFind::Notify(nsITimer *timer)
+nsTypeAheadFindSea::Notify(nsITimer *timer)
 {
   CancelFind();
   return NS_OK;
@@ -358,7 +358,7 @@
 // ----------- nsIObserver Methods (1) -------------------
 
 NS_IMETHODIMP
-nsTypeAheadFind::Observe(nsISupports *aSubject, const char *aTopic,
+nsTypeAheadFindSea::Observe(nsISupports *aSubject, const char *aTopic,
                          const PRUnichar *aData)
 {
   PRBool isOpening;
@@ -476,7 +476,7 @@
 
 
 nsresult
-nsTypeAheadFind::UseInWindow(nsIDOMWindow *aDOMWin)
+nsTypeAheadFindSea::UseInWindow(nsIDOMWindow *aDOMWin)
 {
   NS_ENSURE_ARG_POINTER(aDOMWin);
 
@@ -529,7 +529,7 @@
 // ------- nsIDOMEventListener Methods (1) ---------------
 
 NS_IMETHODIMP
-nsTypeAheadFind::HandleEvent(nsIDOMEvent* aEvent)
+nsTypeAheadFindSea::HandleEvent(nsIDOMEvent* aEvent)
 {
   nsAutoString eventType;
   aEvent->GetType(eventType);
@@ -589,21 +589,21 @@
 // ------- nsIDOMKeyListener Methods (3) ---------------
 
 NS_IMETHODIMP
-nsTypeAheadFind::KeyDown(nsIDOMEvent* aEvent)
+nsTypeAheadFindSea::KeyDown(nsIDOMEvent* aEvent)
 {
   return NS_OK;
 }
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::KeyUp(nsIDOMEvent* aEvent)
+nsTypeAheadFindSea::KeyUp(nsIDOMEvent* aEvent)
 {
   return NS_OK;
 }
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::KeyPress(nsIDOMEvent* aEvent)
+nsTypeAheadFindSea::KeyPress(nsIDOMEvent* aEvent)
 {
   if (!mIsTypeAheadOn || mIsMenuBarActive || mIsMenuPopupActive) {
     return NS_OK;
@@ -733,7 +733,7 @@
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::BackOneChar(PRBool *aIsBackspaceUsed)
+nsTypeAheadFindSea::BackOneChar(PRBool *aIsBackspaceUsed)
 {
   if (!mFocusedDocSelection) {
     *aIsBackspaceUsed = PR_FALSE;
@@ -863,7 +863,7 @@
 
 
 nsresult
-nsTypeAheadFind::HandleChar(PRUnichar aChar)
+nsTypeAheadFindSea::HandleChar(PRUnichar aChar)
 {
   // Add a printable char to mTypeAheadBuffer, then search for buffer contents
 
@@ -1039,7 +1039,7 @@
 
 
 void
-nsTypeAheadFind::SaveFind()
+nsTypeAheadFindSea::SaveFind()
 {
   // Store find string for find-next
   mFindNextBuffer = mTypeAheadBuffer;
@@ -1060,14 +1060,14 @@
     mFindService->SetSearchString(mFindNextBuffer);
   }
 
-  // --- If accessibility.typeaheadfind.timeout is set,
+  // --- If accessibility.typeaheadfindsea.timeout is set,
   //     cancel find after specified # milliseconds ---
   StartTimeout();
 }
 
 
 void
-nsTypeAheadFind::PlayNotFoundSound()
+nsTypeAheadFindSea::PlayNotFoundSound()
 {
   if (mNotFoundSoundURL.IsEmpty())    // no sound
     return;
@@ -1097,7 +1097,7 @@
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::HandleText(nsIDOMEvent* aTextEvent)
+nsTypeAheadFindSea::HandleText(nsIDOMEvent* aTextEvent)
 {
   // This is called multiple times in the middle of an 
   // IME composition
@@ -1145,7 +1145,7 @@
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::HandleStartComposition(nsIDOMEvent* aCompositionEvent)
+nsTypeAheadFindSea::HandleStartComposition(nsIDOMEvent* aCompositionEvent)
 {
   // This is called once at the start of an IME composition
 
@@ -1167,7 +1167,7 @@
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::HandleEndComposition(nsIDOMEvent* aCompositionEvent)
+nsTypeAheadFindSea::HandleEndComposition(nsIDOMEvent* aCompositionEvent)
 {
   // This is called once at the end of an IME composition
 
@@ -1198,28 +1198,28 @@
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::HandleQueryComposition(nsIDOMEvent* aCompositionEvent)
+nsTypeAheadFindSea::HandleQueryComposition(nsIDOMEvent* aCompositionEvent)
 {
   return NS_OK;
 }
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::HandleQueryReconversion(nsIDOMEvent* aCompositionEvent)
+nsTypeAheadFindSea::HandleQueryReconversion(nsIDOMEvent* aCompositionEvent)
 {
   return NS_OK;
 }
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::HandleQueryCaretRect(nsIDOMEvent* aCompositionEvent)
+nsTypeAheadFindSea::HandleQueryCaretRect(nsIDOMEvent* aCompositionEvent)
 {
   return NS_OK;
 }
 
 
 nsresult
-nsTypeAheadFind::FindItNow(nsIPresShell *aPresShell,
+nsTypeAheadFindSea::FindItNow(nsIPresShell *aPresShell,
                            PRBool aIsRepeatingSameChar, PRBool aIsLinksOnly,
                            PRBool aIsFirstVisiblePreferred)
 {
@@ -1241,7 +1241,7 @@
 
   nsCOMPtr<nsISupports> startingContainer = presContext->GetContainer();
   nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(startingContainer));
-  NS_ASSERTION(treeItem, "Bug 175321 Crashes with Type Ahead Find [@ nsTypeAheadFind::FindItNow]");
+  NS_ASSERTION(treeItem, "Bug 175321 Crashes with Type Ahead Find [@ nsTypeAheadFindSea::FindItNow]");
   if (!treeItem) {
     return NS_ERROR_FAILURE;
   }
@@ -1465,7 +1465,7 @@
 
 
 nsresult
-nsTypeAheadFind::GetSearchContainers(nsISupports *aContainer,
+nsTypeAheadFindSea::GetSearchContainers(nsISupports *aContainer,
                                      PRBool aIsRepeatingSameChar,
                                      PRBool aIsFirstVisiblePreferred,
                                      PRBool aCanUseDocSelection,
@@ -1573,7 +1573,7 @@
 
 
 void
-nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
+nsTypeAheadFindSea::RangeStartsInsideLink(nsIDOMRange *aRange,
                                        nsIPresShell *aPresShell,
                                        PRBool *aIsInsideLink,
                                        PRBool *aIsStartingLink)
@@ -1680,7 +1680,7 @@
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::ScrollPositionWillChange(nsIScrollableView *aView,
+nsTypeAheadFindSea::ScrollPositionWillChange(nsIScrollableView *aView,
                                           nscoord aX, nscoord aY)
 {
   return NS_OK;
@@ -1688,7 +1688,7 @@
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::ScrollPositionDidChange(nsIScrollableView *aScrollableView,
+nsTypeAheadFindSea::ScrollPositionDidChange(nsIScrollableView *aScrollableView,
                                          nscoord aX, nscoord aY)
 {
   if (!mIsFindingText)
@@ -1699,7 +1699,7 @@
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::NotifySelectionChanged(nsIDOMDocument *aDoc,
+nsTypeAheadFindSea::NotifySelectionChanged(nsIDOMDocument *aDoc,
                                         nsISelection *aSel, PRInt16 aReason)
 {
   if (!mIsFindingText) {
@@ -1716,10 +1716,10 @@
 }
 
 
-// ---------------- nsITypeAheadFind --------------------
+// ---------------- nsITypeAheadFindSea --------------------
 
 NS_IMETHODIMP
-nsTypeAheadFind::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aCallerWindowSupports)
+nsTypeAheadFindSea::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aCallerWindowSupports)
 {
   NS_ENSURE_TRUE(aCallerWindowSupports, NS_ERROR_FAILURE);
 
@@ -1731,7 +1731,7 @@
     return NS_OK;
   }
 
-  // Compare the top level content pres shell of typeaheadfind
+  // Compare the top level content pres shell of typeaheadfindsea
   // with the top level content pres shell window where find next is happening
   // If they're different, exit so that webbrowswerfind can handle FindNext()
 
@@ -1764,7 +1764,7 @@
   NS_ENSURE_TRUE(callerPresShell, NS_OK);
 
   if (callerPresShell != typeAheadPresShell) {
-    // This means typeaheadfind is active in a different window or doc
+    // This means typeaheadfindsea is active in a different window or doc
     // So it's not appropriate to find next for the current window
     mFindNextBuffer.Truncate();
     return NS_OK;
@@ -1782,7 +1782,7 @@
     webBrowserFind->GetSearchString(getter_Copies(webBrowserFindString));
     if (!webBrowserFindString.Equals(mFindNextBuffer)) {
       // If they're not equal, then the find dialog was used last,
-      // not typeaheadfind. Typeaheadfind applies to the last find,
+      // not typeaheadfindsea. Typeaheadfind applies to the last find,
       // so we should let nsIWebBrowserFind::FindNext() do it.
       mFindNextBuffer.Truncate();
       return NS_OK;
@@ -1832,7 +1832,7 @@
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::GetIsActive(PRBool *aIsActive)
+nsTypeAheadFindSea::GetIsActive(PRBool *aIsActive)
 {
   *aIsActive = mLinksOnlyManuallySet || !mTypeAheadBuffer.IsEmpty();
 
@@ -1845,7 +1845,7 @@
  */
 
 NS_IMETHODIMP
-nsTypeAheadFind::StartNewFind(nsIDOMWindow *aWindow, PRBool aLinksOnly)
+nsTypeAheadFindSea::StartNewFind(nsIDOMWindow *aWindow, PRBool aLinksOnly)
 {
   if (!mFind || !mIsTypeAheadOn || !aWindow)
     return NS_ERROR_FAILURE;  // Type Ahead Find not correctly initialized
@@ -1878,7 +1878,7 @@
 }
 
 void
-nsTypeAheadFind::ResetGlobalAutoStart(PRBool aAutoStart)
+nsTypeAheadFindSea::ResetGlobalAutoStart(PRBool aAutoStart)
 {
   // Enumerate through the current top level windows
   // and either attach or remove window listeners
@@ -1916,7 +1916,7 @@
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::SetAutoStart(nsIDOMWindow *aDOMWin, PRBool aAutoStartOn)
+nsTypeAheadFindSea::SetAutoStart(nsIDOMWindow *aDOMWin, PRBool aAutoStartOn)
 {
   if (!aDOMWin) {
     return NS_ERROR_FAILURE;
@@ -1946,7 +1946,7 @@
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn)
+nsTypeAheadFindSea::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn)
 {
   *aIsAutoStartOn = PR_FALSE;
 
@@ -2014,7 +2014,7 @@
 
 
 NS_IMETHODIMP
-nsTypeAheadFind::CancelFind()
+nsTypeAheadFindSea::CancelFind()
 {
   // Stop current find if:
   //   1. Escape pressed
@@ -2070,7 +2070,7 @@
 // ------- Helper Methods ---------------
 
 void 
-nsTypeAheadFind::GetTopContentPresShell(nsIDocShellTreeItem *aDocShellTreeItem, 
+nsTypeAheadFindSea::GetTopContentPresShell(nsIDocShellTreeItem *aDocShellTreeItem, 
                                         nsIPresShell **aPresShell)
 {
   *aPresShell = nsnull;
@@ -2086,7 +2086,7 @@
 }
 
 void 
-nsTypeAheadFind::GetStartWindow(nsIDOMWindow *aWindow, nsIDOMWindow **aStartWindow)
+nsTypeAheadFindSea::GetStartWindow(nsIDOMWindow *aWindow, nsIDOMWindow **aStartWindow)
 {
   // Return the root ancestor content window of aWindow
 
@@ -2118,7 +2118,7 @@
 }
 
 nsresult
-nsTypeAheadFind::GetWebBrowserFind(nsIDOMWindow *aWin, 
+nsTypeAheadFindSea::GetWebBrowserFind(nsIDOMWindow *aWin, 
                                    nsIWebBrowserFind **aWebBrowserFind)
 {
   NS_ENSURE_ARG_POINTER(aWin);
@@ -2143,7 +2143,7 @@
 
 
 void
-nsTypeAheadFind::StartTimeout()
+nsTypeAheadFindSea::StartTimeout()
 {
   if (mTimeoutLength) {
     if (!mTimer) {
@@ -2159,7 +2159,7 @@
 }
 
 void
-nsTypeAheadFind::SetSelectionLook(nsIPresShell *aPresShell, 
+nsTypeAheadFindSea::SetSelectionLook(nsIPresShell *aPresShell, 
                                   PRBool aChangeColor, 
                                   PRBool aEnabled)
 {
@@ -2167,8 +2167,8 @@
     return;
 
   // Show caret when type ahead find is on
-  // Also paint selection bright (typeaheadfind on) or normal
-  // (typeaheadfind off)
+  // Also paint selection bright (typeaheadfindsea on) or normal
+  // (typeaheadfindsea off)
 
   if (aChangeColor) {
     mFocusedDocSelCon->SetDisplaySelection(nsISelectionController::SELECTION_ATTENTION);
@@ -2211,7 +2211,7 @@
 
 
 void
-nsTypeAheadFind::RemoveDocListeners()
+nsTypeAheadFindSea::RemoveDocListeners()
 {
   nsCOMPtr<nsIPresShell> presShell(GetPresShell());
   nsIViewManager* vm = nsnull;
@@ -2245,7 +2245,7 @@
 
 
 void
-nsTypeAheadFind::AttachDocListeners(nsIPresShell *aPresShell)
+nsTypeAheadFindSea::AttachDocListeners(nsIPresShell *aPresShell)
 {
   if (!aPresShell) {
     return;
@@ -2275,7 +2275,7 @@
 
 
 void
-nsTypeAheadFind::RemoveWindowListeners(nsIDOMWindow *aDOMWin)
+nsTypeAheadFindSea::RemoveWindowListeners(nsIDOMWindow *aDOMWin)
 {
   nsCOMPtr<nsIDOMEventTarget> chromeEventHandler;
   GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler));
@@ -2332,7 +2332,7 @@
 
 
 void
-nsTypeAheadFind::AttachWindowListeners(nsIDOMWindow *aDOMWin)
+nsTypeAheadFindSea::AttachWindowListeners(nsIDOMWindow *aDOMWin)
 {
   nsCOMPtr<nsIDOMEventTarget> chromeEventHandler;
   GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler));
@@ -2385,7 +2385,7 @@
 
 
 void
-nsTypeAheadFind::GetChromeEventHandler(nsIDOMWindow *aDOMWin,
+nsTypeAheadFindSea::GetChromeEventHandler(nsIDOMWindow *aDOMWin,
                                        nsIDOMEventTarget **aChromeTarget)
 {
   nsCOMPtr<nsPIDOMWindow> privateDOMWindow(do_QueryInterface(aDOMWin));
@@ -2401,7 +2401,7 @@
 }
 
 PRBool
-nsTypeAheadFind::IsTargetContentOkay(nsIContent *aContent)
+nsTypeAheadFindSea::IsTargetContentOkay(nsIContent *aContent)
 {
   if (!aContent) {
     return PR_FALSE;
@@ -2439,7 +2439,7 @@
 
 
 nsresult
-nsTypeAheadFind::GetTargetIfTypeAheadOkay(nsIDOMEvent *aEvent, 
+nsTypeAheadFindSea::GetTargetIfTypeAheadOkay(nsIDOMEvent *aEvent, 
                                           nsIContent **aTargetContent,
                                           nsIPresShell **aTargetPresShell)
 {
@@ -2522,7 +2522,7 @@
 
 
 void
-nsTypeAheadFind::GetSelection(nsIPresShell *aPresShell,
+nsTypeAheadFindSea::GetSelection(nsIPresShell *aPresShell,
                               nsISelectionController **aSelCon,
                               nsISelection **aDOMSel)
 {
@@ -2544,7 +2544,7 @@
 
 
 PRBool
-nsTypeAheadFind::IsRangeVisible(nsIPresShell *aPresShell,
+nsTypeAheadFindSea::IsRangeVisible(nsIPresShell *aPresShell,
                                 nsPresContext *aPresContext,
                                 nsIDOMRange *aRange, PRBool aMustBeInViewPort,
                                 PRBool aGetTopVisibleLeaf,
@@ -2698,7 +2698,7 @@
 
 
 nsresult
-nsTypeAheadFind::GetTranslatedString(const nsAString& aKey,
+nsTypeAheadFindSea::GetTranslatedString(const nsAString& aKey,
                                      nsAString& aStringOut)
 {
   nsXPIDLString xsValue;
@@ -2716,7 +2716,7 @@
 
 
 void
-nsTypeAheadFind::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent,
+nsTypeAheadFindSea::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent,
                                PRBool aClearStatus, const PRUnichar *aText)
 {
   // pres shell -> pres context -> container -> tree item ->
@@ -2863,7 +2863,7 @@
   // Make sure we're not focused on a text field, listbox
   // or other form control that needs typeahead keystrokes
   if (focusedContent) {
-    *aResult = nsTypeAheadFind::IsTargetContentOkay(focusedContent);
+    *aResult = nsTypeAheadFindSea::IsTargetContentOkay(focusedContent);
     return NS_OK;
   }
 
@@ -2928,8 +2928,8 @@
   EnsureContentWindow(domWinInternal, getter_AddRefs(startContentWin));
   NS_ENSURE_TRUE(startContentWin, NS_ERROR_FAILURE);
 
-  nsCOMPtr<nsITypeAheadFind> typeAhead = 
-    do_GetService(NS_TYPEAHEADFIND_CONTRACTID);
+  nsCOMPtr<nsITypeAheadFindSea> typeAhead = 
+    do_GetService(NS_TYPEAHEADFINDSEA_CONTRACTID);
   NS_ENSURE_TRUE(typeAhead, NS_ERROR_FAILURE);
 
   return typeAhead->StartNewFind(startContentWin, isLinkSearch);
@@ -3013,7 +3013,7 @@
 }
 
 already_AddRefed<nsIPresShell>
-nsTypeAheadFind::GetPresShell()
+nsTypeAheadFindSea::GetPresShell()
 {
   if (!mFocusedWeakShell)
     return nsnull;
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.h mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.h
--- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.h	2005-03-26 00:12:02.000000000 -0500
+++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.h	2005-03-26 11:39:29.000000000 -0500
@@ -62,13 +62,13 @@
 #include "nsIDOMRange.h"
 #include "nsIDOMWindow.h"
 #include "nsIDocShellTreeItem.h"
-#include "nsITypeAheadFind.h"
+#include "nsITypeAheadFindSea.h"
 #include "nsIStringBundle.h"
 #include "nsISupportsArray.h"
 #include "nsISound.h"
 
-#define TYPEAHEADFIND_BUNDLE_URL \
-        "chrome://global/locale/typeaheadfind.properties"
+#define TYPEAHEADFINDSEA_BUNDLE_URL \
+        "chrome://global/locale/typeaheadfindsea.properties"
 #define TYPEAHEADFIND_NOTFOUND_WAV_URL \
         "chrome://global/content/notfound.wav"
 
@@ -82,7 +82,7 @@
 
 const int kMaxBadCharsBeforeCancel = 3;
 
-class nsTypeAheadFind : public nsITypeAheadFind,
+class nsTypeAheadFindSea : public nsITypeAheadFindSea,
                         public nsIDOMKeyListener,
                         public nsIDOMTextListener,
                         public nsIDOMCompositionListener,
@@ -93,13 +93,13 @@
                         public nsSupportsWeakReference
 {
 public:
-  nsTypeAheadFind();
-  virtual ~nsTypeAheadFind();
+  nsTypeAheadFindSea();
+  virtual ~nsTypeAheadFindSea();
 
-  NS_DEFINE_STATIC_CID_ACCESSOR(NS_TYPEAHEADFIND_CID);
+  NS_DEFINE_STATIC_CID_ACCESSOR(NS_TYPEAHEADFINDSEA_CID);
 
   NS_DECL_ISUPPORTS
-  NS_DECL_NSITYPEAHEADFIND
+  NS_DECL_NSITYPEAHEADFINDSEA
   NS_DECL_NSIOBSERVER
   NS_DECL_NSIDOMEVENTLISTENER
   NS_DECL_NSISELECTIONLISTENER
@@ -127,7 +127,7 @@
   // ----- nsITimerCallback -----------------------------
   NS_DECL_NSITIMERCALLBACK
 
-  static nsTypeAheadFind *GetInstance();
+  static nsTypeAheadFindSea *GetInstance();
   static void ReleaseInstance(void);
   static PRBool IsTargetContentOkay(nsIContent *aContent);
 
@@ -185,7 +185,7 @@
   nsresult GetTranslatedString(const nsAString& aKey, nsAString& aStringOut);
 
   // Used by GetInstance and ReleaseInstance
-  static nsTypeAheadFind *sInstance;
+  static nsTypeAheadFindSea *sInstance;
 
   // Current find state
   nsString mTypeAheadBuffer;
@@ -196,7 +196,7 @@
 
   // PRBool's are used instead of PRPackedBool's where the address of the
   // boolean variable is getting passed into a method. For example:
-  // GetBoolPref("accessibility.typeaheadfind.linksonly", &mLinksOnlyPref);
+  // GetBoolPref("accessibility.typeaheadfindsea.linksonly", &mLinksOnlyPref);
   PRBool mIsFindAllowedInWindow;
   PRBool mAutoStartPref;
   PRBool mLinksOnlyPref;
@@ -251,7 +251,7 @@
   nsCOMPtr<nsIDOMWindow> mFocusedWindow;
   nsCOMPtr<nsIWeakReference> mFocusedWeakShell;
 
-  // Windows where typeaheadfind doesn't auto start as the user types
+  // Windows where typeaheadfindsea doesn't auto start as the user types
   nsCOMPtr<nsISupportsArray> mManualFindWindows;
 };
 
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp mozilla/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp
--- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp	2005-03-26 00:12:02.000000000 -0500
+++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp	2005-03-26 11:39:40.000000000 -0500
@@ -55,7 +55,7 @@
 
 // This function is called at component registration time
 static NS_METHOD
-nsTypeAheadFindRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath,
+nsTypeAheadFindSeaRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath,
                                 const char *registryLocation,
                                 const char *componentType,
                                 const nsModuleComponentInfo *info)
@@ -64,7 +64,7 @@
   // an application component. This makes sure that we're
   // initialized on application startup.
 
-  // Register nsTypeAheadFind to be instantiated on startup.
+  // Register nsTypeAheadFindSea to be instantiated on startup.
   // XXX This is needed on linux, but for some reason not needed on win32.
   nsresult rv;
   nsCOMPtr<nsICategoryManager> categoryManager =
@@ -74,7 +74,7 @@
     rv = categoryManager->AddCategoryEntry(APPSTARTUP_CATEGORY,
-                                           "Type Ahead Find", 
+                                           "Type Ahead Find Sea", 
                                            "service,"
-                                           NS_TYPEAHEADFIND_CONTRACTID,
+                                           NS_TYPEAHEADFINDSEA_CONTRACTID,
                                            PR_TRUE, PR_TRUE, nsnull);
   }
 
@@ -82,22 +82,22 @@
 }
 
 
-NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsTypeAheadFind,
-                                         nsTypeAheadFind::GetInstance)
+NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsTypeAheadFindSea,
+                                         nsTypeAheadFindSea::GetInstance)
 
 static void PR_CALLBACK
-TypeAheadFindModuleDtor(nsIModule* self)
+TypeAheadFindSeaModuleDtor(nsIModule* self)
 {
-  nsTypeAheadFind::ReleaseInstance();
+  nsTypeAheadFindSea::ReleaseInstance();
 }
 
 static const nsModuleComponentInfo components[] =
 {
-  { "TypeAheadFind Component", NS_TYPEAHEADFIND_CID,
-    NS_TYPEAHEADFIND_CONTRACTID, nsTypeAheadFindConstructor,
-    nsTypeAheadFindRegistrationProc, nsnull  // Unregistration proc
+  { "TypeAheadFindSea Component", NS_TYPEAHEADFINDSEA_CID,
+    NS_TYPEAHEADFINDSEA_CONTRACTID, nsTypeAheadFindSeaConstructor,
+    nsTypeAheadFindSeaRegistrationProc, nsnull  // Unregistration proc
   }
 };
 
-NS_IMPL_NSGETMODULE_WITH_DTOR(nsTypeAheadFind, components,
-                              TypeAheadFindModuleDtor)
+NS_IMPL_NSGETMODULE_WITH_DTOR(nsTypeAheadFindSea, components,
+                              TypeAheadFindSeaModuleDtor)
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/typeaheadfind.pkg mozilla/extensions/typeaheadfind/src/typeaheadfind.pkg
--- mozilla.orig/extensions/typeaheadfind/src/typeaheadfind.pkg	2005-03-26 00:12:02.000000000 -0500
+++ mozilla/extensions/typeaheadfind/src/typeaheadfind.pkg	1969-12-31 19:00:00.000000000 -0500
@@ -1,9 +0,0 @@
-# why not ship this with GRE/embedding, if we're building it?
-
-[xpfe-browser browser]
-#if SHARED_LIBRARY
-dist/bin/components/@SHARED_LIBRARY@
-#else
-!staticcomp @LIBRARY@ @MODULE_NAME@
-#endif
-!xpt dist/bin/components/typeaheadfind.xpt
diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/typeaheadfindsea.pkg mozilla/extensions/typeaheadfind/src/typeaheadfindsea.pkg
--- mozilla.orig/extensions/typeaheadfind/src/typeaheadfindsea.pkg	1969-12-31 19:00:00.000000000 -0500
+++ mozilla/extensions/typeaheadfind/src/typeaheadfindsea.pkg	2005-03-26 11:39:29.000000000 -0500
@@ -0,0 +1,9 @@
+# why not ship this with GRE/embedding, if we're building it?
+
+[xpfe-browser browser]
+#if SHARED_LIBRARY
+dist/bin/components/@SHARED_LIBRARY@
+#else
+!staticcomp @LIBRARY@ @MODULE_NAME@
+#endif
+!xpt dist/bin/components/typeaheadfindsea.xpt



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/063_firefox-rpath-3.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/063_firefox-rpath-3.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/063_firefox-rpath-3.patch?rev=1.1&content-type=text/plain

Index: 063_firefox-rpath-3.patch
===================================================================
# Gentoo http://bugs.gentoo.org/show_bug.cgi?id=100597

--- mozilla/config/rules.mk.orig	2006-07-07 06:13:36.000000000 +0200
+++ mozilla/config/rules.mk	2006-07-19 13:22:04.000000000 +0200
@@ -510,7 +510,12 @@
 # 
 ifeq ($(OS_ARCH),Linux)
 ifdef IS_COMPONENT
+DSO_LDOPTS += -Wl,-rpath,'$$ORIGIN:$$ORIGIN/..'
+OS_LDFLAGS += -Wl,-rpath,'$$ORIGIN:$$ORIGIN/..'
 EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
+else
+DSO_LDOPTS += -Wl,-rpath,'$$ORIGIN'
+OS_LDFLAGS += -Wl,-rpath,'$$ORIGIN'
 endif
 endif 
 



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/064_firefox-nsplugins-v2.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/064_firefox-nsplugins-v2.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/064_firefox-nsplugins-v2.patch?rev=1.1&content-type=text/plain

Index: 064_firefox-nsplugins-v2.patch
===================================================================
# Gentoo's Add a search path for plugins. by agriffis

--- mozilla/xpcom/io/nsAppFileLocationProvider.cpp.orig	2006-07-16 22:38:44.000000000 +0200
+++ mozilla/xpcom/io/nsAppFileLocationProvider.cpp	2006-07-16 22:39:41.000000000 +0200
@@ -215,6 +215,14 @@
         if (NS_SUCCEEDED(rv))
             rv = localFile->AppendRelativeNativePath(PLUGINS_DIR_NAME);
     }
+    else if (nsCRT::strcmp(prop, GENTOO_NSPLUGINS_DIR) == 0)
+    {
+        rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSPLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
+    }
+    else if (nsCRT::strcmp(prop, GENTOO_NSBROWSER_PLUGINS_DIR) == 0)
+    {
+        rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSBROWSER_PLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
+    }
 #if defined(XP_MAC) || defined(XP_MACOSX)
     else if (nsCRT::strcmp(prop, NS_MACOSX_USER_PLUGIN_DIR) == 0)
     {
@@ -617,7 +625,7 @@
 
         *_retval = new nsAppDirectoryEnumerator(this, keys);
 #else
-        static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
+        static const char* keys[] = { nsnull, GENTOO_NSPLUGINS_DIR, GENTOO_NSBROWSER_PLUGINS_DIR, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
         if (!keys[0] && !(keys[0] = PR_GetEnv("MOZ_PLUGIN_PATH"))) {
             static const char nullstr = 0;
             keys[0] = &nullstr;



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/401_firefox-1.5-theme-change.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/401_firefox-1.5-theme-change.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/401_firefox-1.5-theme-change.patch?rev=1.1&content-type=text/plain

Index: 401_firefox-1.5-theme-change.patch
===================================================================
Index: layout/base/nsPresContext.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/base/nsPresContext.cpp,v
retrieving revision 3.288.12.2.4.1
diff -d -u -p -r3.288.12.2.4.1 nsPresContext.cpp
--- layout/base/nsPresContext.cpp	21 Apr 2006 23:30:50 -0000	3.288.12.2.4.1
+++ layout/base/nsPresContext.cpp	26 Sep 2006 19:26:40 -0000
@@ -73,6 +73,9 @@
 #include "nsIDOMDocument.h"
 #include "nsAutoPtr.h"
 #include "nsEventStateManager.h"
+#include "nsIEventQueue.h"
+#include "nsIEventQueueService.h"
+
 #ifdef IBMBIDI
 #include "nsBidiPresUtils.h"
 #endif // IBMBIDI
@@ -267,6 +270,7 @@ nsPresContext::~nsPresContext()
   NS_IF_RELEASE(mDeviceContext);
   NS_IF_RELEASE(mLookAndFeel);
   NS_IF_RELEASE(mLangGroup);
+  NS_IF_RELEASE(mEventQueueService);
 }
 
 NS_IMPL_ISUPPORTS2(nsPresContext, nsPresContext, nsIObserver)
@@ -285,6 +289,17 @@ static const char* const kGenericFont[] 
   ".fantasy."
 };
 
+// Set to true when LookAndFeelChanged needs to be called.  This is used
+// because the look and feel is a service, so there's no need to notify it from
+// more than one prescontext.
+static PRBool sLookAndFeelChanged;
+
+// Set to true when ThemeChanged needs to be called on mTheme.  This is used
+// because mTheme is a service, so there's no need to notify it from more than
+// one prescontext.
+static PRBool sThemeChanged;
+
+
 void
 nsPresContext::GetFontPreferences()
 {
@@ -709,6 +724,9 @@ nsPresContext::Init(nsIDeviceContext* aD
                                        this);
 #endif
 
+  rv = CallGetService(NS_EVENTQUEUESERVICE_CONTRACTID, &mEventQueueService);
+  NS_ENSURE_SUCCESS(rv, rv);
+
   // Initialize our state from the user preferences
   GetUserPreferences();
 
@@ -1180,33 +1198,126 @@ nsPresContext::GetTheme()
 void
 nsPresContext::ThemeChanged()
 {
+  if (!mPendingThemeChanged) {
+    sLookAndFeelChanged = PR_TRUE;
+    sThemeChanged = PR_TRUE;
+
+    nsCOMPtr<nsIEventQueue> eventQ;
+    mEventQueueService->
+      GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
+                           getter_AddRefs(eventQ));
+    if (!eventQ) {
+      return;
+    }
+
+    PLEvent* evt = new PLEvent();
+    if (!evt) {
+      return;
+    }
+
+    PL_InitEvent(evt, this, nsPresContext::ThemeChangedInternal,
+                 nsPresContext::DestroyThemeChangeEvt);
+
+    // After this point, event destruction will release |this|
+    NS_ADDREF_THIS();
+
+    nsresult rv = eventQ->PostEvent(evt);
+    if (NS_FAILED(rv)) {
+      PL_DestroyEvent(evt);
+    } else {
+      mPendingThemeChanged = PR_TRUE;
+    }
+  }    
+}
+
+void* PR_CALLBACK
+nsPresContext::ThemeChangedInternal(PLEvent *aEvent)
+{
+  nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
+
+  pc->mPendingThemeChanged = PR_FALSE;
+
   // Tell the theme that it changed, so it can flush any handles to stale theme
   // data.
-  if (mTheme)
-    mTheme->ThemeChanged();
+  if (pc->mTheme && sThemeChanged) {
+    pc->mTheme->ThemeChanged();
+    sThemeChanged = PR_FALSE;
+  }
 
   // Clear all cached nsILookAndFeel colors.
-  if (mLookAndFeel)
-    mLookAndFeel->LookAndFeelChanged();
+  if (pc->mLookAndFeel && sLookAndFeelChanged) {
+    pc->mLookAndFeel->LookAndFeelChanged();
+    sLookAndFeelChanged = PR_FALSE;
+  }
 
   // We have to clear style data because the assumption of style rule
   // immutability has been violated since any style rule that uses
   // system colors or fonts (and probably -moz-appearance as well) has
   // changed.
-  nsPresContext::ClearStyleDataAndReflow();
+  pc->ClearStyleDataAndReflow();
+
+  return nsnull;
+}
+
+
+void PR_CALLBACK
+nsPresContext::DestroyThemeChangeEvt(PLEvent* aEvent)
+{
+  nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
+  NS_RELEASE(pc);
+  delete aEvent;
 }
 
 void
 nsPresContext::SysColorChanged()
 {
-  if (mLookAndFeel) {
+  if (!mPendingSysColorChanged) {
+    sLookAndFeelChanged = PR_TRUE;
+
+    nsCOMPtr<nsIEventQueue> eventQ;
+    mEventQueueService->
+      GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
+                           getter_AddRefs(eventQ));
+    if (!eventQ) {
+      return;
+    }
+
+    PLEvent* evt = new PLEvent();
+    if (!evt) {
+      return;
+    }
+
+    PL_InitEvent(evt, this, nsPresContext::SysColorChangedInternal,
+                 nsPresContext::DestroySysColorChangeEvt);
+
+    // After this point, event destruction will release |this|
+    NS_ADDREF_THIS();
+
+    nsresult rv = eventQ->PostEvent(evt);
+    if (NS_FAILED(rv)) {
+      PL_DestroyEvent(evt);
+    } else {
+      mPendingSysColorChanged = PR_TRUE;
+    }
+  }
+}
+
+void* PR_CALLBACK
+nsPresContext::SysColorChangedInternal(PLEvent *aEvent)
+{
+  nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
+
+  pc->mPendingSysColorChanged = PR_FALSE;
+  
+  if (pc->mLookAndFeel && sLookAndFeelChanged) {
      // Don't use the cached values for the system colors
-    mLookAndFeel->LookAndFeelChanged();
+    pc->mLookAndFeel->LookAndFeelChanged();
+    sLookAndFeelChanged = PR_FALSE;
   }
-   
+
   // Reset default background and foreground colors for the document since
   // they may be using system colors
-  GetDocumentColorPreferences();
+  pc->GetDocumentColorPreferences();
 
   // Clear out all of the style data since it may contain RGB values
   // which originated from system colors.
@@ -1222,7 +1333,17 @@ nsPresContext::SysColorChanged()
   // data without reflowing/updating views will lead to incorrect change hints
   // later, because when generating change hints, any style structs which have
   // been cleared and not reread are assumed to not be used at all.
-  ClearStyleDataAndReflow();
+  pc->ClearStyleDataAndReflow();
+
+  return nsnull;
+}
+
+void PR_CALLBACK
+nsPresContext::DestroySysColorChangeEvt(PLEvent* aEvent)
+{
+  nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
+  NS_RELEASE(pc);
+  delete aEvent;
 }
 
 void
Index: layout/base/nsPresContext.h
===================================================================
RCS file: /cvsroot/mozilla/layout/base/nsPresContext.h,v
retrieving revision 3.150.4.2
diff -d -u -p -r3.150.4.2 nsPresContext.h
--- layout/base/nsPresContext.h	29 Aug 2005 16:15:39 -0000	3.150.4.2
+++ layout/base/nsPresContext.h	26 Sep 2006 19:26:40 -0000
@@ -56,6 +56,7 @@
 #include "nsCRT.h"
 #include "nsIPrintSettings.h"
 #include "nsPropertyTable.h"
+#include "plevent.h"
 #ifdef IBMBIDI
 class nsBidiPresUtils;
 #endif // IBMBIDI
@@ -76,6 +77,7 @@ class nsIAtom;
 class nsIEventStateManager;
 class nsIURI;
 class nsILookAndFeel;
+class nsIEventQueueService;
 class nsICSSPseudoComparator;
 class nsIAtom;
 struct nsStyleStruct;
@@ -627,6 +629,14 @@ public:
   const nscoord* GetBorderWidthTable() { return mBorderWidthTable; }
 
 protected:
+  static NS_HIDDEN_(void*) PR_CALLBACK ThemeChangedInternal(PLEvent* aEvent);
+  static NS_HIDDEN_(void*) PR_CALLBACK SysColorChangedInternal(PLEvent* aEvent);
+  static NS_HIDDEN_(void) PR_CALLBACK DestroyThemeChangeEvt(PLEvent* aEvent);
+  static NS_HIDDEN_(void) PR_CALLBACK DestroySysColorChangeEvt(PLEvent* aEvent);
+
+  friend void* PR_CALLBACK ThemeChangedInternal(PLEvent* aEvent);
+  friend void* PR_CALLBACK SysColorChangedInternal(PLEvent* aEvent);
+
   NS_HIDDEN_(void) SetImgAnimations(nsIContent *aParent, PRUint16 aMode);
   NS_HIDDEN_(void) GetDocumentColorPreferences();
 
@@ -654,6 +664,7 @@ protected:
                                         // from gfx back to layout.
   nsIEventStateManager* mEventManager;  // [STRONG]
   nsILookAndFeel*       mLookAndFeel;   // [STRONG]
+  nsIEventQueueService *mEventQueueService; // [STRONG]
   nsIAtom*              mMedium;        // initialized by subclass ctors;
                                         // weak pointer to static atom
 
@@ -724,6 +735,8 @@ protected:
   unsigned              mCanPaginatedScroll : 1;
   unsigned              mDoScaledTwips : 1;
   unsigned              mEnableJapaneseTransform : 1;
+  unsigned              mPendingSysColorChanged : 1;
+  unsigned              mPendingThemeChanged : 1;
 #ifdef IBMBIDI
   unsigned              mIsVisual : 1;
   unsigned              mIsBidiSystem : 1;



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/402_firefox-2.0-pango-cursor.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/402_firefox-2.0-pango-cursor.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/402_firefox-2.0-pango-cursor.patch?rev=1.1&content-type=text/plain

Index: 402_firefox-2.0-pango-cursor.patch
===================================================================
# Upstream bug #335810

Index: mozilla/gfx/src/gtk/nsFontMetricsPango.cpp
===================================================================
RCS file: /cvsroot/mozilla/gfx/src/gtk/nsFontMetricsPango.cpp,v
retrieving revision 1.24
diff -d -u -p -6 -r1.24 nsFontMetricsPango.cpp
--- mozilla/gfx/src/gtk/nsFontMetricsPango.cpp	25 Aug 2006 01:02:34 -0000	1.24
+++ mozilla/gfx/src/gtk/nsFontMetricsPango.cpp	6 Sep 2006 07:01:49 -0000
@@ -948,13 +948,12 @@ nsFontMetricsPango::GetClusterInfo(const
 PRInt32
 nsFontMetricsPango::GetPosition(const PRUnichar *aText, PRUint32 aLength,
                                 nsPoint aPt)
 {
     int trailing = 0;
     int inx = 0;
-    gboolean found = FALSE;
     const gchar *curChar;
     PRInt32 retval = 0;
 
     float f = mDeviceContext->AppUnitsToDevUnits();
     
     PangoLayout *layout = pango_layout_new(mPangoContext);
@@ -974,28 +973,18 @@ nsFontMetricsPango::GetPosition(const PR
     }
 
     // Set up the pango layout
     pango_layout_set_text(layout, text, strlen(text));
     FixupSpaceWidths(layout, text);
     
-    found = pango_layout_xy_to_index(layout, localX, localY,
-                                     &inx, &trailing);
+    pango_layout_xy_to_index(layout, localX, localY,
+                             &inx, &trailing);
 
     // Convert the index back to the utf-16 index
     curChar = text;
 
-    // Jump to the end if it's not found.
-    if (!found) {
-        if (inx == 0)
-            retval = 0;
-        else if (trailing)
-            retval = aLength;
-
-        goto loser;
-    }
-
     for (PRUint32 curOffset=0; curOffset < aLength;
          curOffset++, curChar = g_utf8_find_next_char(curChar, NULL)) {
 
         // Check for a match before checking for a surrogate pair
         if (curChar - text == inx) {
             retval = curOffset;



1.1                  src/patchsets/mozilla-firefox/2.0.0.11/803_fbsd-3.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/803_fbsd-3.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.11/803_fbsd-3.patch?rev=1.1&content-type=text/plain

Index: 803_fbsd-3.patch
===================================================================
--- a/config/rules.mk	2007-07-03 17:39:53 +0100
+++ b/config/rules.mk	2007-07-03 17:41:50 +0100
@@ -462,6 +462,8 @@
 endif
 
 ifeq ($(OS_ARCH),FreeBSD)
+DSO_LDOPTS += -Wl,-rpath,'$(mozappdir)'
+OS_LDFLAGS += -Wl,-rpath,'$(mozappdir)'
 EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc
 endif
 



-- 
gentoo-commits@gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-12-03 21:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-03 21:52 [gentoo-commits] gentoo commit in src/patchsets/mozilla-firefox/2.0.0.11: 000_flex-configure-LANG.patch 001_firefox-arm.patch 002_firefox-libdeps.patch 003_firefox-bus-error.patch 004_mozilla-hppa.patch 005_mozilla-firefox-1.5-ia64.patch 006_mips-asm.patch 007_mozilla-firefox-1.5-asneeded.patch 008_firefox-pkgconfig-1.patch 010_visibility-gcc-4.2.patch 032_firefox-2.0_ppc64-1.patch 033_firefox-2.0_ppc_powerpc.patch 050_respect-host-variable.patch 055_firefox-2.0_gfbsd-pthreads.patch 060_embed-typeaheadfind-1.patch 063_firefox-rpath-3.patch 064_firefox-nsplugins-v2.patch 401_firefox-1.5-theme-change.patch 402_firefox-2.0-pango-cursor.patch 803_fbsd-3.patch Raul Porcel (armin76)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox