Gentoo Archives: gentoo-commits

From: "Raul Porcel (armin76)" <armin76@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/mozilla-firefox/2.0.0.17: 000_flex-configure-LANG.patch 001_firefox-arm.patch 002_firefox-libdeps.patch 003_unaligned.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 016_firefox-nss-3.12-asneeded.patch 032_firefox-2.0_ppc64-1.patch 033_firefox-2.0_ppc_powerpc.patch 040_firefox-2.0_arm.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 090_xul-gcc4.3.patch 401_firefox-1.5-theme-change.patch 402_firefox-2.0-pango-cursor.patch 803_fbsd-3.patch
Date: Thu, 25 Sep 2008 19:18:55
Message-Id: E1KiwMP-0002Wt-Uo@stork.gentoo.org
1 armin76 08/09/25 19:18:45
2
3 Added: 000_flex-configure-LANG.patch 001_firefox-arm.patch
4 002_firefox-libdeps.patch 003_unaligned.patch
5 004_mozilla-hppa.patch
6 005_mozilla-firefox-1.5-ia64.patch
7 006_mips-asm.patch
8 007_mozilla-firefox-1.5-asneeded.patch
9 008_firefox-pkgconfig-1.patch
10 010_visibility-gcc-4.2.patch
11 016_firefox-nss-3.12-asneeded.patch
12 032_firefox-2.0_ppc64-1.patch
13 033_firefox-2.0_ppc_powerpc.patch
14 040_firefox-2.0_arm.patch
15 050_respect-host-variable.patch
16 055_firefox-2.0_gfbsd-pthreads.patch
17 060_embed-typeaheadfind-1.patch
18 063_firefox-rpath-3.patch
19 064_firefox-nsplugins-v2.patch 090_xul-gcc4.3.patch
20 401_firefox-1.5-theme-change.patch
21 402_firefox-2.0-pango-cursor.patch 803_fbsd-3.patch
22 Log:
23 Add patchset for 2.0.0.17 with a fix for arm
24
25 Revision Changes Path
26 1.1 src/patchsets/mozilla-firefox/2.0.0.17/000_flex-configure-LANG.patch
27
28 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/000_flex-configure-LANG.patch?rev=1.1&view=markup
29 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/000_flex-configure-LANG.patch?rev=1.1&content-type=text/plain
30
31 Index: 000_flex-configure-LANG.patch
32 ===================================================================
33 The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
34 option parsing, it may break.
35
36 http://bugs.gentoo.org/103483
37
38 --- configure
39 +++ configure
40 @@ -54,6 +54,16 @@
41 infodir='${prefix}/info'
42 mandir='${prefix}/man'
43
44 +# NLS nuisances.
45 +# Only set these to C if already set. These must not be set unconditionally
46 +# because not all systems understand e.g. LANG=C (notably SCO).
47 +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
48 +# Non-C LC_CTYPE values break the ctype check.
49 +if test "${LANG+set}" = set; then LANG=C; export LANG; fi
50 +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
51 +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
52 +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
53 +
54 # Initialize some other variables.
55 subdirs=
56 MFLAGS= MAKEFLAGS=
57 @@ -452,16 +463,6 @@
58 esac
59 done
60
61 -# NLS nuisances.
62 -# Only set these to C if already set. These must not be set unconditionally
63 -# because not all systems understand e.g. LANG=C (notably SCO).
64 -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
65 -# Non-C LC_CTYPE values break the ctype check.
66 -if test "${LANG+set}" = set; then LANG=C; export LANG; fi
67 -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
68 -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
69 -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
70 -
71 # confdefs.h avoids OS command line length limits that DEFS can exceed.
72 rm -rf conftest* confdefs.h
73 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
74
75
76
77 1.1 src/patchsets/mozilla-firefox/2.0.0.17/001_firefox-arm.patch
78
79 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/001_firefox-arm.patch?rev=1.1&view=markup
80 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/001_firefox-arm.patch?rev=1.1&content-type=text/plain
81
82 Index: 001_firefox-arm.patch
83 ===================================================================
84 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=336183
85
86 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2006-05-17 02:02:51.000000000 -0400
87 +++ mozilla-16052006/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2006-05-17 01:17:16.000000000 -0400
88 @@ -39,18 +39,31 @@
89 /* Implement shared vtbl methods. */
90
91 #include "xptcprivate.h"
92
93 #if !defined(LINUX) || !defined(__arm__)
94 #error "This code is for Linux ARM only. Please check if it works for you, too.\nDepends strongly on gcc behaviour."
95 #endif
96
97 +#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
98 +/* This tells gcc3.4+ not to optimize away symbols.
99 + * @see http://gcc.gnu.org/gcc-3.4/changes.html
100 + */
101 +#define DONT_DROP_OR_WARN __attribute__((used))
102 +#else
103 +/* This tells older gccs not to warn about unused vairables.
104 + * @see http://docs.freebsd.org/info/gcc/gcc.info.Variable_Attributes.html
105 + */
106 +#define DONT_DROP_OR_WARN __attribute__((unused))
107 +#endif
108 +
109 /* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol. */
110 -static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch");
111 +static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch")
112 +DONT_DROP_OR_WARN;
113
114 static nsresult
115 PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
116 {
117 #define PARAM_BUFFER_COUNT 16
118
119 nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
120 nsXPTCMiniVariant* dispatchParams = NULL;
121
122
123
124 1.1 src/patchsets/mozilla-firefox/2.0.0.17/002_firefox-libdeps.patch
125
126 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/002_firefox-libdeps.patch?rev=1.1&view=markup
127 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/002_firefox-libdeps.patch?rev=1.1&content-type=text/plain
128
129 Index: 002_firefox-libdeps.patch
130 ===================================================================
131 # Linking issue with pango
132 #
133 # https://bugzilla.mozilla.org/show_bug.cgi?id=344821
134
135 --- mozilla/layout/build/Makefile.in.orig 2006-07-16 00:24:51.000000000 +1000
136 +++ mozilla/layout/build/Makefile.in 2006-07-16 00:35:51.000000000 +1000
137 @@ -213,6 +213,12 @@
138 $(NULL)
139 endif
140
141 +ifdef MOZ_ENABLE_CANVAS
142 +ifdef MOZ_ENABLE_XFT
143 +EXTRA_DSO_LDOPTS += $(MOZ_XFT_LIBS)
144 +endif
145 +endif
146 +
147 ifdef NS_TRACE_MALLOC
148 EXTRA_DSO_LIBS += tracemalloc
149 endif
150
151
152
153 1.1 src/patchsets/mozilla-firefox/2.0.0.17/003_unaligned.patch
154
155 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/003_unaligned.patch?rev=1.1&view=markup
156 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/003_unaligned.patch?rev=1.1&content-type=text/plain
157
158 Index: 003_unaligned.patch
159 ===================================================================
160 # Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=161826
161 # Fix unaligned access
162 diff -ur mozilla.orig/intl/unicharutil/util/nsUnicharUtils.cpp mozilla/intl/unicharutil/util/nsUnicharUtils.cpp
163 --- mozilla.orig/intl/unicharutil/util/nsUnicharUtils.cpp 2007-12-29 12:43:10.000000000 +0000
164 +++ mozilla/intl/unicharutil/util/nsUnicharUtils.cpp 2007-12-29 12:44:08.000000000 +0000
165 @@ -348,3 +348,15 @@
166 return result;
167 }
168
169 +void
170 +SetUnichar(void *ptr, PRUnichar aChar)
171 +{
172 +#if NEED_STRICT_ALIGNMENT
173 + *((char *) ptr) = *((char *) &aChar);
174 + *((char *) ptr + 1) = *((char *) &aChar + 1);
175 +#else
176 + *((PRUnichar *) ptr) = aChar;
177 +#endif
178 +}
179 +
180 +
181 diff -ur mozilla.orig/intl/unicharutil/util/nsUnicharUtils.h mozilla/intl/unicharutil/util/nsUnicharUtils.h
182 --- mozilla.orig/intl/unicharutil/util/nsUnicharUtils.h 2007-12-29 12:43:10.000000000 +0000
183 +++ mozilla/intl/unicharutil/util/nsUnicharUtils.h 2007-12-29 12:44:31.000000000 +0000
184 @@ -82,6 +82,10 @@
185 PRUnichar ToUpperCase(PRUnichar);
186 PRUnichar ToLowerCase(PRUnichar);
187
188 +#define NEED_STRICT_ALIGNMENT defined(__sparc__) || defined(__alpha__) || defined(__mips__)
189 +
190 +void SetUnichar(void *, PRUnichar);
191 +
192 inline PRBool IsUpperCase(PRUnichar c) {
193 return ToLowerCase(c) != c;
194 }
195 diff -ur mozilla.orig/layout/generic/nsTextFrame.cpp mozilla/layout/generic/nsTextFrame.cpp
196 --- mozilla.orig/layout/generic/nsTextFrame.cpp 2007-12-29 12:43:02.000000000 +0000
197 +++ mozilla/layout/generic/nsTextFrame.cpp 2007-12-29 12:46:16.000000000 +0000
198 @@ -5123,18 +5123,27 @@
199 };
200
201 // Transforms characters in place from ascii to Unicode
202 -static void
203 +static PRUnichar *
204 TransformTextToUnicode(char* aText, PRInt32 aNumChars)
205 {
206 // Go backwards over the characters and convert them.
207 unsigned char* cp1 = (unsigned char*)aText + aNumChars - 1;
208 - PRUnichar* cp2 = (PRUnichar*)aText + (aNumChars - 1);
209 + PRUnichar* cp2;
210 + PRUnichar* ret;
211 +
212 + if ((unsigned long) aText & 0x1)
213 + cp2 = ((PRUnichar*)(aText + 1));
214 + else
215 + cp2 = (PRUnichar*)aText;
216
217 - while (aNumChars-- > 0) {
218 - // XXX: If you crash here then you may see the issue described
219 - // in http://bugzilla.mozilla.org/show_bug.cgi?id=36146#c44
220 - *cp2-- = PRUnichar(*cp1--);
221 - }
222 + ret = cp2;
223 +
224 + cp2 += (aNumChars - 1);
225 +
226 + while (aNumChars-- > 0)
227 + SetUnichar(cp2--, PRUnichar(*cp1--));
228 +
229 + return ret;
230 }
231
232 PRUint32
233 @@ -5702,7 +5711,7 @@
234 // The text transform buffer contains ascii characters, so
235 // transform it to Unicode
236 NS_ASSERTION(wordBufLen >= PRUint32(lastWordLen), "no room to transform in place");
237 - TransformTextToUnicode((char*)lastWordPtr, lastWordLen);
238 + pWordBuf = TransformTextToUnicode((char*)lastWordPtr, lastWordLen);
239 }
240
241 // Look ahead in the text-run and compute the final word
242 @@ -6232,7 +6241,7 @@
243 for (; aBuffer < end; aBuffer++) {
244 PRUnichar ch = *aBuffer;
245 if (ch == ' ') {
246 - *aBuffer = CH_NBSP;
247 + SetUnichar(aBuffer, CH_NBSP);
248 }
249 }
250 }
251
252
253
254 1.1 src/patchsets/mozilla-firefox/2.0.0.17/004_mozilla-hppa.patch
255
256 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/004_mozilla-hppa.patch?rev=1.1&view=markup
257 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/004_mozilla-hppa.patch?rev=1.1&content-type=text/plain
258
259 Index: 004_mozilla-hppa.patch
260 ===================================================================
261 # Original patch just cleaned up, Author on original patch was Randolph Chung (tausq@××××××.org)
262 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=287150
263
264 Index: xpcom/reflect/xptcall/src/md/unix/Makefile.in
265 ===================================================================
266 RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v
267 retrieving revision 1.92
268 diff -u -B -u -8 -p -r1.92 Makefile.in
269 --- xpcom/reflect/xptcall/src/md/unix/Makefile.in 14 Dec 2006 19:13:43 -0000 1.92
270 +++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 3 Jan 2007 18:20:44 -0000
271 @@ -185,16 +185,29 @@ CPPSRCS := xptcinvoke_ipf32.cpp xptcstu
272 ASFILES := xptcstubs_asm_ipf32.s xptcinvoke_asm_ipf32.s
273 endif
274
275 # #18875 Building the CPP's (CXX) optimized causes a crash
276 CXXFLAGS := $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(CXXFLAGS))
277 endif
278 endif
279
280 +#
281 +# Linux/HPPA/gcc
282 +#
283 +ifeq ($(OS_ARCH),Linux)
284 +ifneq (,$(filter hppa2.0 hppa1.1,$(OS_TEST)))
285 +#ifeq ($(CC),gcc) # Do not check for gcc since there is only this compiler on linux for hppa
286 +CPPSRCS := xptcinvoke_pa32.cpp xptcstubs_pa32.cpp
287 +ASFILES := xptcstubs_asm_parisc_linux.s xptcinvoke_asm_parisc_linux.s
288 +#endif
289 +endif
290 +endif
291 +
292 +
293 ######################################################################
294 # M68k
295 ######################################################################
296 #
297 # NetBSD/m68k
298 #
299 ifeq ($(OS_ARCH),NetBSD)
300 ifneq (,$(filter amiga atari hp300 mac68k mvme68k next68k sun3 sun3x x68k,$(OS_TEST)))
301 Index: xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
302 ===================================================================
303 RCS file: xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
304 diff -N xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
305 --- /dev/null 1 Jan 1970 00:00:00 -0000
306 +++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s 3 Jan 2007 18:20:44 -0000
307 @@ -0,0 +1,102 @@
308 +
309 + .LEVEL 1.1
310 + .text
311 + .align 4
312 +
313 +framesz:
314 + .equ 128
315 +
316 +.globl XPTC_InvokeByIndex
317 + .type XPTC_InvokeByIndex, @function
318 +
319 +
320 +XPTC_InvokeByIndex:
321 + .PROC
322 + .CALLINFO FRAME=72, CALLER,SAVE_RP, SAVE_SP, ENTRY_GR=3
323 + .ENTRY
324 +
325 + ; frame marker takes 48 bytes,
326 + ; register spill area takes 8 bytes,
327 + ; local stack area takes 72 bytes result in 128 bytes total
328 +
329 + STW %rp,-20(%sp)
330 + STW,MA %r3,128(%sp)
331 +
332 + LDO -framesz(%r30),%r28
333 + STW %r28,-4(%r30) ; save previous sp
334 + STW %r19,-32(%r30)
335 +
336 + STW %r26,-36-framesz(%r30) ; save argument registers in
337 + STW %r25,-40-framesz(%r30) ; in PREVIOUS frame
338 + STW %r24,-44-framesz(%r30) ;
339 + STW %r23,-48-framesz(%r30) ;
340 +
341 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26;out=28
342 + BL invoke_count_bytes,%r31
343 + COPY %r31,%r2
344 +
345 + CMPIB,>= 0,%r28, .+76
346 + COPY %r30,%r3 ; copy stack ptr to saved stack ptr
347 + ADD %r30,%r28,%r30 ; extend stack frame
348 + LDW -4(%r3),%r28 ; move frame
349 + STW %r28,-4(%r30)
350 + LDW -8(%r3),%r28
351 + STW %r28,-8(%r30)
352 + LDW -12(%r3),%r28
353 + STW %r28,-12(%r30)
354 + LDW -16(%r3),%r28
355 + STW %r28,-16(%r30)
356 + LDW -20(%r3),%r28
357 + STW %r28,-20(%r30)
358 + LDW -24(%r3),%r28
359 + STW %r28,-24(%r30)
360 + LDW -28(%r3),%r28
361 + STW %r28,-28(%r30)
362 + LDW -32(%r3),%r28
363 + STW %r28,-32(%r30)
364 +
365 + LDO -40(%r30),%r26 ; load copy address
366 + LDW -44-framesz(%r3),%r25 ; load rest of 2 arguments
367 + LDW -48-framesz(%r3),%r24 ;
368 +
369 + LDW -32(%r30),%r19 ; shared lib call destroys r19; reload
370 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26
371 + BL invoke_copy_to_stack,%r31
372 + COPY %r31,%r2
373 +
374 + LDO -48(%r30),%r20
375 + EXTRW,U,= %r28,31,1,%r22
376 + FLDD 0(%r20),%fr7 ; load double arg 1
377 + EXTRW,U,= %r28,30,1,%r22
378 + FLDW 8(%r20),%fr5L ; load float arg 1
379 + EXTRW,U,= %r28,29,1,%r22
380 + FLDW 4(%r20),%fr6L ; load float arg 2
381 + EXTRW,U,= %r28,28,1,%r22
382 + FLDW 0(%r20),%fr7L ; load float arg 3
383 +
384 + LDW -36-framesz(%r3),%r26 ; load ptr to 'that'
385 + LDW -40(%r30),%r25 ; load the rest of dispatch argument registers
386 + LDW -44(%r30),%r24
387 + LDW -48(%r30),%r23
388 +
389 + LDW -36-framesz(%r3),%r20 ; load vtable addr
390 + LDW -40-framesz(%r3),%r28 ; load index
391 + LDW 0(%r20),%r20 ; follow vtable
392 + SH2ADDL %r28,%r20,%r28 ; add 4*index to vtable entry
393 + LDW 0(%r28),%r22 ; load vtable entry
394 +
395 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=22-26;out=28;
396 + BL $$dyncall,%r31
397 + COPY %r31,%r2
398 +
399 + LDW -32(%r30),%r19
400 + COPY %r3,%r30 ; restore saved stack ptr
401 +
402 + LDW -148(%sp),%rp
403 + LDWM -128(%sp),%r3
404 + BV,N (%rp)
405 + NOP
406 + .EXIT
407 + .PROCEND ;in=23,24,25,26;
408 + .SIZE XPTC_InvokeByIndex, .-XPTC_InvokeByIndex
409 +
410 Index: xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
411 ===================================================================
412 RCS file: xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
413 diff -N xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
414 --- /dev/null 1 Jan 1970 00:00:00 -0000
415 +++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s 3 Jan 2007 18:20:44 -0000
416 @@ -0,0 +1,66 @@
417 + .LEVEL 1.1
418 + .TEXT
419 + .ALIGN 4
420 +
421 +curframesz:
422 + .EQU 128
423 +
424 +
425 +; SharedStub has stack size of 128 bytes
426 +
427 +lastframesz:
428 + .EQU 64
429 +
430 +; the StubN C++ function has a small stack size of 64 bytes
431 +
432 +
433 +.globl SharedStub
434 + .type SharedStub, @function
435 +
436 +SharedStub:
437 + .PROC
438 + .CALLINFO CALLER,FRAME=80,SAVE_RP
439 +
440 + .ENTRY
441 + STW %rp,-20(%sp)
442 + LDO 128(%sp),%sp
443 +
444 + STW %r19,-32(%r30)
445 + STW %r26,-36-curframesz(%r30) ; save arg0 in previous frame
446 +
447 + LDO -80(%r30),%r28
448 + FSTD,MA %fr5,8(%r28) ; save darg0
449 + FSTD,MA %fr7,8(%r28) ; save darg1
450 + FSTW,MA %fr4L,4(%r28) ; save farg0
451 + FSTW,MA %fr5L,4(%r28) ; save farg1
452 + FSTW,MA %fr6L,4(%r28) ; save farg2
453 + FSTW,MA %fr7L,4(%r28) ; save farg3
454 +
455 + ; Former value of register 26 is already properly saved by StubN,
456 + ; but register 25-23 are not because of the arguments mismatch
457 + STW %r25,-40-curframesz-lastframesz(%r30) ; save r25
458 + STW %r24,-44-curframesz-lastframesz(%r30) ; save r24
459 + STW %r23,-48-curframesz-lastframesz(%r30) ; save r23
460 + COPY %r26,%r25 ; method index is arg1
461 + LDW -36-curframesz-lastframesz(%r30),%r26 ; self is arg0
462 + LDO -40-curframesz-lastframesz(%r30),%r24 ; normal args is arg2
463 + LDO -80(%r30),%r23 ; floating args is arg3
464 +
465 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=23-26;out=28;
466 + BL PrepareAndDispatch, %r31
467 + COPY %r31,%r2
468 +
469 + LDW -32(%r30),%r19
470 +
471 + LDW -148(%sp),%rp
472 + LDO -128(%sp),%sp
473 +
474 +
475 + BV,N (%rp)
476 + NOP
477 + NOP
478 +
479 + .EXIT
480 + .PROCEND ;in=26;out=28;
481 +
482 + .SIZE SharedStub, .-SharedStub
483
484
485
486 1.1 src/patchsets/mozilla-firefox/2.0.0.17/005_mozilla-firefox-1.5-ia64.patch
487
488 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/005_mozilla-firefox-1.5-ia64.patch?rev=1.1&view=markup
489 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/005_mozilla-firefox-1.5-ia64.patch?rev=1.1&content-type=text/plain
490
491 Index: 005_mozilla-firefox-1.5-ia64.patch
492 ===================================================================
493 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=289394
494
495 --- mozilla.orig/extensions/transformiix/source/base/Double.cpp
496 +++ mozilla/extensions/transformiix/source/base/Double.cpp
497 @@ -75,14 +75,7 @@
498 #define CPU_IS_ARM
499 #endif
500
501 -#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
502 -/**
503 - * This version of the macros is safe for the alias optimizations
504 - * that gcc does, but uses gcc-specific extensions.
505 - */
506 -
507 typedef union txdpun {
508 - PRFloat64 d;
509 struct {
510 #if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
511 PRUint32 lo, hi;
512 @@ -90,8 +83,14 @@
513 PRUint32 hi, lo;
514 #endif
515 } s;
516 + PRFloat64 d;
517 } txdpun;
518
519 +#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
520 +/**
521 + * This version of the macros is safe for the alias optimizations
522 + * that gcc does, but uses gcc-specific extensions.
523 + */
524 #define TX_DOUBLE_HI32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.hi; }))
525 #define TX_DOUBLE_LO32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.lo; }))
526
527 @@ -117,20 +116,20 @@
528
529 //-- Initialize Double related constants
530 #ifdef IS_BIG_ENDIAN
531 -const PRUint32 nanMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK,
532 - 0xffffffff};
533 -const PRUint32 infMask[2] = {TX_DOUBLE_HI32_EXPMASK, 0};
534 -const PRUint32 negInfMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0};
535 +const txdpun nanMask = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK,
536 + 0xffffffff};
537 +const txdpun infMask = {TX_DOUBLE_HI32_EXPMASK, 0};
538 +const txdpun negInfMask = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0};
539 #else
540 -const PRUint32 nanMask[2] = {0xffffffff,
541 - TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK};
542 -const PRUint32 infMask[2] = {0, TX_DOUBLE_HI32_EXPMASK};
543 -const PRUint32 negInfMask[2] = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT};
544 +const txdpun nanMask = {0xffffffff,
545 + TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK};
546 +const txdpun infMask = {0, TX_DOUBLE_HI32_EXPMASK};
547 +const txdpun negInfMask = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT};
548 #endif
549
550 -const double Double::NaN = *((double*)nanMask);
551 -const double Double::POSITIVE_INFINITY = *((double*)infMask);
552 -const double Double::NEGATIVE_INFINITY = *((double*)negInfMask);
553 +const double Double::NaN = nanMask.d;
554 +const double Double::POSITIVE_INFINITY = infMask.d;
555 +const double Double::NEGATIVE_INFINITY = negInfMask.d;
556
557 /*
558 * Determines whether the given double represents positive or negative
559 --- mozilla.orig/js/src/fdlibm/fdlibm.h
560
561
562
563 1.1 src/patchsets/mozilla-firefox/2.0.0.17/006_mips-asm.patch
564
565 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/006_mips-asm.patch?rev=1.1&view=markup
566 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/006_mips-asm.patch?rev=1.1&content-type=text/plain
567
568 Index: 006_mips-asm.patch
569 ===================================================================
570 Upstream Bug: http://bugzilla.mozilla.org/show_bug.cgi?id=258429
571
572 This patch is required to fix build issues with Mozilla on MIPS architectures.
573 The out-of-the-box code is coded to build on a PlayStation 2 game console, which
574 is a highly specialised MIPS machine based around the Toshiba TX5900. This CPU
575 is very non-standard, causing problems with generic MIPS machines like Silicon
576 Graphics workstations.
577
578 The following patch fixes the assembly language routines for generic MIPS
579 machines. In the case where it is being compiled for a PlayStation 2, the older
580 PS2-specific implementation is used instead.
581
582 Patch $Revision: 1.1 $
583 Index: mozilla/configure.in
584 ===================================================================
585 RCS file: /cvsroot/mozilla/configure.in,v
586 retrieving revision 1.1819
587 diff -p -u -r1.1819 configure.in
588 --- mozilla/configure.in 24 May 2007 17:45:55 -0000 1.1819
589 +++ mozilla/configure.in 30 May 2007 09:08:10 -0000
590 @@ -1706,6 +1706,12 @@ case "$target" in
591 MOZ_ENABLE_OLD_ABI_COMPAT_WRAPPERS=1
592 ;;
593 mips*)
594 + if test -z "$CROSS_COMPILE" ; then
595 + if grep -c -E '^system type\W*:.*EE PS2' /proc/cpuinfo >/dev/null; then
596 + OS_TEST="mipsEE"
597 + fi
598 + fi
599 +
600 CFLAGS="$CFLAGS -Wa,-xgot"
601 CXXFLAGS="$CXXFLAGS -Wa,-xgot"
602 ;;
603 Index: mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
604 ===================================================================
605 RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v
606 retrieving revision 1.92
607 diff -p -u -r1.92 Makefile.in
608 --- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 14 Dec 2006 19:13:43 -0000 1.92
609 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 30 May 2007 09:08:10 -0000
610 @@ -229,16 +229,28 @@ endif
611 endif
612 endif
613
614 +#
615 +# Linux/MIPS
616 +#
617 ifeq ($(OS_ARCH),Linux)
618 -ifneq (,$(findstring mips, $(OS_TEST)))
619 -CPPSRCS := xptcinvoke_mips.cpp xptcstubs_mips.cpp
620 -ASFILES := xptcinvoke_asm_mips.s xptcstubs_asm_mips.s
621 -#xptcstubs_mips.cpp
622 -# xptcstubs_asm_mips.s
623 +
624 +# PlayStation2 Linux
625 +ifneq (,$(findstring mipsEE, $(OS_TEST)))
626 +CPPSRCS := xptcinvoke_ps2mips.cpp xptcstubs_ps2mips.cpp
627 +ASFILES := xptcinvoke_asm_ps2mips.s xptcstubs_asm_ps2mips.s
628 ifdef GNU_CC
629 ASFLAGS += $(INCLUDES) -x assembler-with-cpp -D__GNUC__
630 endif
631 +else
632 +
633 +endif
634 +# Generic 32-bit Linux
635 +ifneq (,$(findstring mips, $(OS_TEST)))
636 +CPPSRCS := xptcinvoke_mips.cpp xptcstubs_mips.cpp
637 +ASFILES := xptcinvoke_asm_mips.s xptcstubs_asm_mips.s
638 +AS := $(CC) $(CFLAGS) $(INCLUDES) -c -x assembler-with-cpp
639 endif
640 +
641 endif
642
643 ######################################################################
644 @@ -386,14 +398,24 @@ LOCAL_INCLUDES += \
645 $(NULL)
646
647 ifeq ($(OS_ARCH),Linux)
648 +
649 +# PlayStation 2 Linux
650 +ifneq (,$(findstring mipsEE, $(OS_TEST)))
651 +xptcstubs_asm_ps2mips.o: xptcstubs_asm_ps2mips.s.m4 $(PUBLIC)/xptcstubsdef.inc
652 + m4 $(INCLUDES) $< > ./xptcstubs_asm_ps2mips.s && \
653 + $(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) ./xptcstubs_asm_ps2mips.s
654 + $(RM) -f ./xptcstubs_asm_ps2mips.s
655 +else
656 +
657 +# Generic Linux
658 ifneq (,$(findstring mips, $(OS_TEST)))
659 -xptcstubs_asm_mips.o: xptcstubs_asm_mips.s.m4 $(PUBLIC)/xptcstubsdef.inc
660 - m4 $(INCLUDES) $< > ./xptcstubs_asm_mips.s && \
661 - $(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) ./xptcstubs_asm_mips.s
662 - $(RM) -f ./xptcstubs_asm_mips.s
663 +xptcstubs_asm_mips.o: xptcstubs_asm_mips.s $(PUBLIC)/xptcstubsdef.inc
664 + $(AS) -o $@ $<
665 endif
666 endif
667
668 +endif
669 +
670 ifeq ($(OS_ARCH),Darwin)
671 xptcstubs_asm_ppc_darwin.o: xptcstubs_asm_ppc_darwin.s.m4 $(PUBLIC)/xptcstubsdef.inc Makefile
672 gm4 $(INCLUDES) $< > ./xptcstubs_asm_ppc_darwin.s && \
673 Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s
674 ===================================================================
675 RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s,v
676 retrieving revision 1.3
677 diff -p -u -r1.3 xptcinvoke_asm_mips.s
678 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s.orig 2007-07-09 09:02:07 +1000
679 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s 2007-07-09 09:04:37 +1000
680 @@ -21,6 +21,7 @@
681 * Contributor(s):
682 * Brendan Eich <brendan@×××××××.org>
683 * Stuart Parmenter <pavlov@××××××××.com>
684 + * Thiemo Seufer <seufer@×××××××××××××××××××××.de>
685 */
686
687 /* This code is for MIPS using the O32 ABI. */
688 @@ -28,139 +29,123 @@
689 #include <sys/regdef.h>
690 #include <sys/asm.h>
691
692 -.text
693 -.globl invoke_count_words
694 -.globl invoke_copy_to_stack
695 -
696 -# We need a variable number of words allocated from the stack for copies of
697 -# the params, and this space must come between the high frame (where ra, gp,
698 -# and s0 are saved) and the low frame (where a0-a3 are saved by the callee
699 -# functions we invoke).
700 -
701 -LOCALSZ=4 # s0, s1, ra, gp
702 -NARGSAVE=4 # a0, a1, a2, a3
703 -HIFRAMESZ=(LOCALSZ*SZREG)
704 -LOFRAMESZ=(NARGSAVE*SZREG)
705 -FRAMESZ=(HIFRAMESZ+LOFRAMESZ+ALSZ)&ALMASK
706 -
707 -# XXX these 2*SZREG, etc. are very magic -- we *know* that ALSZ&ALMASK cause
708 -# FRAMESZ to be 0 mod 8, in this case to be 16 and not 12.
709 -RAOFF=FRAMESZ - (2*SZREG)
710 -GPOFF=FRAMESZ - (3*SZREG)
711 -S0OFF=FRAMESZ - (4*SZREG)
712 -S1OFF=FRAMESZ - (5*SZREG)
713 -
714 -# These are not magic -- they are just our argsave slots in the caller frame.
715 -A0OFF=FRAMESZ
716 -A1OFF=FRAMESZ + (1*SZREG)
717 -A2OFF=FRAMESZ + (2*SZREG)
718 -A3OFF=FRAMESZ + (3*SZREG)
719 -
720 - #
721 - # _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
722 - # a0 a1 a2 a3
723 -
724 -NESTED(_XPTC_InvokeByIndex, FRAMESZ, ra)
725 -
726 - .set noreorder
727 - .cpload t9
728 - .set reorder
729 -
730 +# NARGSAVE is the argument space in the callers frame, including extra
731 +# 'shadowed' space for the argument registers. The minimum of 4
732 +# argument slots is sometimes predefined in the header files.
733 +#ifndef NARGSAVE
734 +#define NARGSAVE 4
735 +#endif
736 +
737 +#define LOCALSZ 3 /* gp, fp, ra */
738 +#define FRAMESZ ((((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK)
739 +
740 +#define RAOFF (FRAMESZ - (1*SZREG))
741 +#define FPOFF (FRAMESZ - (2*SZREG))
742 +#define GPOFF (FRAMESZ - (3*SZREG))
743 +
744 +#define A0OFF (FRAMESZ + (0*SZREG))
745 +#define A1OFF (FRAMESZ + (1*SZREG))
746 +#define A2OFF (FRAMESZ + (2*SZREG))
747 +#define A3OFF (FRAMESZ + (3*SZREG))
748 +
749 + .text
750 +
751 +#
752 +# _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
753 +# a0 a1 a2 a3
754 +
755 + .globl _XPTC_InvokeByIndex
756 + .align 2
757 + .type _XPTC_InvokeByIndex,@function
758 + .ent _XPTC_InvokeByIndex,0
759 + .frame fp, FRAMESZ, ra
760 +_XPTC_InvokeByIndex:
761 + SETUP_GP
762 subu sp, FRAMESZ
763
764 - # specify the save register mask -- XXX do we want the a0-a3 here, given
765 - # our "split" frame where the args are saved below a dynamicly allocated
766 - # region under the high frame?
767 - #
768 - # 10010000000000010000000011110000
769 - .mask 0x900100F0, -((NARGSAVE+LOCALSZ)*SZREG)
770 -
771 - # thou shalt not use .cprestore if yer frame has variable size...
772 - # .cprestore GPOFF
773 -
774 - REG_S ra, RAOFF(sp)
775 -
776 - # this happens automatically with .cprestore, but we cannot use that op...
777 - REG_S gp, GPOFF(sp)
778 - REG_S s0, S0OFF(sp)
779 - REG_S s1, S1OFF(sp)
780 -
781 - REG_S a0, A0OFF(sp)
782 - REG_S a1, A1OFF(sp)
783 - REG_S a2, A2OFF(sp)
784 - REG_S a3, A3OFF(sp)
785 + # specify the save register mask for gp, fp, ra, a3 - a0
786 + .mask 0xD00000F0, RAOFF-FRAMESZ
787
788 - # invoke_count_words(paramCount, params)
789 - move a0, a2
790 - move a1, a3
791 + sw ra, RAOFF(sp)
792 + sw fp, FPOFF(sp)
793
794 - jal invoke_count_words
795 - lw gp, GPOFF(sp)
796 + # we can't use .cprestore in a variable stack frame
797 + sw gp, GPOFF(sp)
798
799 - # save the old sp so we can pop the param area and any "low frame"
800 - # needed as an argsave area below the param block for callees that
801 - # we invoke.
802 - move s0, sp
803 -
804 - REG_L a1, A2OFF(sp) # a1 = paramCount
805 - REG_L a2, A3OFF(sp) # a2 = params
806 -
807 - # we define a word as 4 bytes, period end of story!
808 - sll v0, 2 # 4 bytes * result of invoke_copy_words
809 - subu v0, LOFRAMESZ # but we take back the argsave area built into
810 - # our stack frame -- SWEET!
811 - subu sp, sp, v0 # make room
812 - move a0, sp # a0 = param stack address
813 - move s1, a0 # save it for later -- it should be safe here
814 -
815 - # the old sp is still saved in s0, but we now need another argsave
816 - # area ("low frame") for the invoke_copy_to_stack call.
817 - subu sp, sp, LOFRAMESZ
818 + sw a0, A0OFF(sp)
819 + sw a1, A1OFF(sp)
820 + sw a2, A2OFF(sp)
821 + sw a3, A3OFF(sp)
822 +
823 + # save bottom of fixed frame
824 + move fp, sp
825 +
826 + # extern "C" uint32
827 + # invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s);
828 + la t9, invoke_count_words
829 + move a0, a2
830 + move a1, a3
831 + jalr t9
832 + lw gp, GPOFF(fp)
833
834 - # copy the param into the stack areas
835 + # allocate variable stack, with a size of:
836 + # wordsize (of 4 bytes) * result (already aligned to dword)
837 + # but a minimum of 16 byte
838 + sll v0, 2
839 + slt t0, v0, 16
840 + beqz t0, 1f
841 + li v0, 16
842 +1: subu sp, v0
843 +
844 + # let a0 point to the bottom of the variable stack, allocate
845 + # another fixed stack for:
846 + # extern "C" void
847 # invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
848 - # nsXPTCVariant* s)
849 - jal invoke_copy_to_stack
850 - lw gp, GPOFF(s0)
851 -
852 - move sp, s0 # get orig sp back, popping params and argsave
853 -
854 - REG_L a0, A0OFF(sp) # a0 = set "that" to be "this"
855 - REG_L a1, A1OFF(sp) # a1 = methodIndex
856 -
857 - # t1 = methodIndex * 4
858 - # (use shift instead of mult)
859 - sll t1, a1, 2
860 -
861 - # calculate the function we need to jump to,
862 - # which must then be saved in t9
863 + # nsXPTCVariant* s);
864 + la t9, invoke_copy_to_stack
865 + move a0, sp
866 + lw a1, A2OFF(fp)
867 + lw a2, A3OFF(fp)
868 + subu sp, 16
869 + jalr t9
870 + lw gp, GPOFF(fp)
871 +
872 + # back to the variable stack frame
873 + addu sp, 16
874 +
875 + # calculate the function we need to jump to, which must then be
876 + # stored in t9
877 + lw a0, A0OFF(fp) # a0 = set "that" to be "this"
878 + lw t0, A1OFF(fp) # a1 = methodIndex
879 lw t9, 0(a0)
880 - addu t9, t9, t1
881 - lw t9, 8(t9)
882 -
883 - # a1..a3 and f13..f14 should now be set to what
884 - # invoke_copy_to_stack told us. skip a0 and f12
885 - # because that is the "this" pointer
886 -
887 - REG_L a1, 1*SZREG(s1)
888 - REG_L a2, 2*SZREG(s1)
889 - REG_L a3, 3*SZREG(s1)
890 -
891 - l.d $f13, 8(s1)
892 - l.d $f14, 16(s1)
893 -
894 - # Create the stack pointer for the function, which must have 4 words
895 - # of space for callee-saved args. invoke_count_words allocated space
896 - # for a0 starting at s1, so we just move s1 into sp.
897 - move sp, s1
898 + # t0 = methodIndex << PTRLOG
899 + sll t0, t0, PTRLOG
900 + addu t9, t0
901 +#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
902 + lw t9, (t9)
903 +#else /* not G++ V3 ABI */
904 + lw t9, 2*PTRSIZE(t9)
905 +#endif /* G++ V3 ABI */
906 +
907 + # Set a1-a3 to what invoke_copy_to_stack told us. a0 is already
908 + # the "this" pointer. We don't have to care about floating
909 + # point arguments, the non-FP "this" pointer as first argument
910 + # means they'll never be used.
911 + lw a1, 1*SZREG(sp)
912 + lw a2, 2*SZREG(sp)
913 + lw a3, 3*SZREG(sp)
914 +
915 + jalr t9
916 + # Micro-optimization: There's no gp usage below this point, so
917 + # we don't reload.
918 + # lw gp, GPOFF(fp)
919
920 - jalr ra, t9
921 - lw gp, GPOFF(s0)
922 + # leave variable stack frame
923 + move sp, fp
924
925 - move sp, s0
926 + lw ra, RAOFF(sp)
927 + lw fp, FPOFF(sp)
928
929 - REG_L ra, RAOFF(sp)
930 - REG_L s0, S0OFF(sp)
931 - addu sp, FRAMESZ
932 + addiu sp, FRAMESZ
933 j ra
934 -.end _XPTC_InvokeByIndex
935 +END(_XPTC_InvokeByIndex)
936 Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s
937 ===================================================================
938 RCS file: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s
939 diff -N mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s
940 --- /dev/null 1 Jan 1970 00:00:00 -0000
941 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s 30 May 2007 09:08:10 -0000
942 @@ -0,0 +1,166 @@
943 +/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
944 + * Version: MPL 1.1
945 + *
946 + * The contents of this file are subject to the Mozilla Public License Version
947 + * 1.1 (the "License"); you may not use this file except in compliance with
948 + * the License. You may obtain a copy of the License at
949 + * http://www.mozilla.org/MPL/
950 + *
951 + * Software distributed under the License is distributed on an "AS IS" basis,
952 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
953 + * for the specific language governing rights and limitations under the
954 + * License.
955 + *
956 + * The Original Code is mozilla.org code.
957 + *
958 + * The Initial Developer of the Original Code is
959 + * Netscape Communications Corp, Inc.
960 + * Portions created by the Initial Developer are Copyright (C) 2001
961 + * the Initial Developer. All Rights Reserved.
962 + *
963 + * Contributor(s):
964 + * Brendan Eich <brendan@×××××××.org>
965 + * Stuart Parmenter <pavlov@××××××××.com>
966 + */
967 +
968 +/* This code is for MIPS using the O32 ABI. */
969 +
970 +#include <sys/regdef.h>
971 +#include <sys/asm.h>
972 +
973 +.text
974 +.globl invoke_count_words
975 +.globl invoke_copy_to_stack
976 +
977 +# We need a variable number of words allocated from the stack for copies of
978 +# the params, and this space must come between the high frame (where ra, gp,
979 +# and s0 are saved) and the low frame (where a0-a3 are saved by the callee
980 +# functions we invoke).
981 +
982 +LOCALSZ=4 # s0, s1, ra, gp
983 +NARGSAVE=4 # a0, a1, a2, a3
984 +HIFRAMESZ=(LOCALSZ*SZREG)
985 +LOFRAMESZ=(NARGSAVE*SZREG)
986 +FRAMESZ=(HIFRAMESZ+LOFRAMESZ+ALSZ)&ALMASK
987 +
988 +# XXX these 2*SZREG, etc. are very magic -- we *know* that ALSZ&ALMASK cause
989 +# FRAMESZ to be 0 mod 8, in this case to be 16 and not 12.
990 +RAOFF=FRAMESZ - (2*SZREG)
991 +GPOFF=FRAMESZ - (3*SZREG)
992 +S0OFF=FRAMESZ - (4*SZREG)
993 +S1OFF=FRAMESZ - (5*SZREG)
994 +
995 +# These are not magic -- they are just our argsave slots in the caller frame.
996 +A0OFF=FRAMESZ
997 +A1OFF=FRAMESZ + (1*SZREG)
998 +A2OFF=FRAMESZ + (2*SZREG)
999 +A3OFF=FRAMESZ + (3*SZREG)
1000 +
1001 + #
1002 + # _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
1003 + # a0 a1 a2 a3
1004 +
1005 +NESTED(_XPTC_InvokeByIndex, FRAMESZ, ra)
1006 +
1007 + .set noreorder
1008 + .cpload t9
1009 + .set reorder
1010 +
1011 + subu sp, FRAMESZ
1012 +
1013 + # specify the save register mask -- XXX do we want the a0-a3 here, given
1014 + # our "split" frame where the args are saved below a dynamicly allocated
1015 + # region under the high frame?
1016 + #
1017 + # 10010000000000010000000011110000
1018 + .mask 0x900100F0, -((NARGSAVE+LOCALSZ)*SZREG)
1019 +
1020 + # thou shalt not use .cprestore if yer frame has variable size...
1021 + # .cprestore GPOFF
1022 +
1023 + REG_S ra, RAOFF(sp)
1024 +
1025 + # this happens automatically with .cprestore, but we cannot use that op...
1026 + REG_S gp, GPOFF(sp)
1027 + REG_S s0, S0OFF(sp)
1028 + REG_S s1, S1OFF(sp)
1029 +
1030 + REG_S a0, A0OFF(sp)
1031 + REG_S a1, A1OFF(sp)
1032 + REG_S a2, A2OFF(sp)
1033 + REG_S a3, A3OFF(sp)
1034 +
1035 + # invoke_count_words(paramCount, params)
1036 + move a0, a2
1037 + move a1, a3
1038 +
1039 + jal invoke_count_words
1040 + lw gp, GPOFF(sp)
1041 +
1042 + # save the old sp so we can pop the param area and any "low frame"
1043 + # needed as an argsave area below the param block for callees that
1044 + # we invoke.
1045 + move s0, sp
1046 +
1047 + REG_L a1, A2OFF(sp) # a1 = paramCount
1048 + REG_L a2, A3OFF(sp) # a2 = params
1049 +
1050 + # we define a word as 4 bytes, period end of story!
1051 + sll v0, 2 # 4 bytes * result of invoke_copy_words
1052 + subu v0, LOFRAMESZ # but we take back the argsave area built into
1053 + # our stack frame -- SWEET!
1054 + subu sp, sp, v0 # make room
1055 + move a0, sp # a0 = param stack address
1056 + move s1, a0 # save it for later -- it should be safe here
1057 +
1058 + # the old sp is still saved in s0, but we now need another argsave
1059 + # area ("low frame") for the invoke_copy_to_stack call.
1060 + subu sp, sp, LOFRAMESZ
1061 +
1062 + # copy the param into the stack areas
1063 + # invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
1064 + # nsXPTCVariant* s)
1065 + jal invoke_copy_to_stack
1066 + lw gp, GPOFF(s0)
1067 +
1068 + move sp, s0 # get orig sp back, popping params and argsave
1069 +
1070 + REG_L a0, A0OFF(sp) # a0 = set "that" to be "this"
1071 + REG_L a1, A1OFF(sp) # a1 = methodIndex
1072 +
1073 + # t1 = methodIndex * 4
1074 + # (use shift instead of mult)
1075 + sll t1, a1, 2
1076 +
1077 + # calculate the function we need to jump to,
1078 + # which must then be saved in t9
1079 + lw t9, 0(a0)
1080 + addu t9, t9, t1
1081 + lw t9, 8(t9)
1082 +
1083 + # a1..a3 and f13..f14 should now be set to what
1084 + # invoke_copy_to_stack told us. skip a0 and f12
1085 + # because that is the "this" pointer
1086 +
1087 + REG_L a1, 1*SZREG(s1)
1088 + REG_L a2, 2*SZREG(s1)
1089 + REG_L a3, 3*SZREG(s1)
1090 +
1091 + l.d $f13, 8(s1)
1092 + l.d $f14, 16(s1)
1093 +
1094 + # Create the stack pointer for the function, which must have 4 words
1095 + # of space for callee-saved args. invoke_count_words allocated space
1096 + # for a0 starting at s1, so we just move s1 into sp.
1097 + move sp, s1
1098 +
1099 + jalr ra, t9
1100 + lw gp, GPOFF(s0)
1101 +
1102 + move sp, s0
1103 +
1104 + REG_L ra, RAOFF(sp)
1105 + REG_L s0, S0OFF(sp)
1106 + addu sp, FRAMESZ
1107 + j ra
1108 +.end _XPTC_InvokeByIndex
1109 Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp
1110 ===================================================================
1111 RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp,v
1112 retrieving revision 1.2
1113 diff -p -u -r1.2 xptcinvoke_mips.cpp
1114 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp 18 Apr 2004 14:18:18 -0000 1.2
1115 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp 30 May 2007 09:08:10 -0000
1116 @@ -1,6 +1,4 @@
1117 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1118 - * Version: MPL 1.1
1119 - *
1120 * ***** BEGIN LICENSE BLOCK *****
1121 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1122 *
1123 @@ -24,6 +22,7 @@
1124 * Contributor(s):
1125 * Stuart Parmenter <pavlov@××××××××.com>
1126 * Brendan Eich <brendan@×××××××.org>
1127 + * Thiemo Seufer <seufer@×××××××××××××××××××××.de>
1128 *
1129 * Alternatively, the contents of this file may be used under the terms of
1130 * either of the GNU General Public License Version 2 or later (the "GPL"),
1131 @@ -52,10 +51,8 @@ invoke_count_words(PRUint32 paramCount,
1132 // Count a word for a0 even though it's never stored or loaded
1133 // We do this only for alignment of register pairs.
1134 PRUint32 result = 1;
1135 - for (PRUint32 i = 0; i < paramCount; i++, s++)
1136 + for (PRUint32 i = 0; i < paramCount; i++, result++, s++)
1137 {
1138 - result++;
1139 -
1140 if (s->IsPtrData())
1141 continue;
1142
1143 @@ -68,6 +65,9 @@ invoke_count_words(PRUint32 paramCount,
1144 result++;
1145 result++;
1146 break;
1147 +
1148 + default:
1149 + break;
1150 }
1151 }
1152 return (result + 1) & ~(PRUint32)1;
1153 @@ -88,8 +88,6 @@ invoke_copy_to_stack(PRUint32* d, PRUint
1154 continue;
1155 }
1156
1157 - *((void**)d) = s->val.p;
1158 -
1159 switch(s->type)
1160 {
1161 case nsXPTType::T_I64 :
1162 @@ -104,6 +102,9 @@ invoke_copy_to_stack(PRUint32* d, PRUint
1163 if ((PRWord)d & 4) d++;
1164 *((double*) d) = s->val.d; d++;
1165 break;
1166 + default:
1167 + *((void**)d) = s->val.p;
1168 + break;
1169 }
1170 }
1171 }
1172 @@ -118,5 +119,4 @@ XPTC_InvokeByIndex(nsISupports* that, PR
1173 PRUint32 paramCount, nsXPTCVariant* params)
1174 {
1175 return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
1176 -}
1177 -
1178 +}
1179 Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp
1180 ===================================================================
1181 RCS file: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp
1182 diff -N mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp
1183 --- /dev/null 1 Jan 1970 00:00:00 -0000
1184 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp 30 May 2007 09:08:10 -0000
1185 @@ -0,0 +1,122 @@
1186 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1187 + * Version: MPL 1.1
1188 + *
1189 + * ***** BEGIN LICENSE BLOCK *****
1190 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1191 + *
1192 + * The contents of this file are subject to the Mozilla Public License Version
1193 + * 1.1 (the "License"); you may not use this file except in compliance with
1194 + * the License. You may obtain a copy of the License at
1195 + * http://www.mozilla.org/MPL/
1196 + *
1197 + * Software distributed under the License is distributed on an "AS IS" basis,
1198 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1199 + * for the specific language governing rights and limitations under the
1200 + * License.
1201 + *
1202 + * The Original Code is mozilla.org code.
1203 + *
1204 + * The Initial Developer of the Original Code is
1205 + * Netscape Communications Corp, Inc.
1206 + * Portions created by the Initial Developer are Copyright (C) 2001
1207 + * the Initial Developer. All Rights Reserved.
1208 + *
1209 + * Contributor(s):
1210 + * Stuart Parmenter <pavlov@××××××××.com>
1211 + * Brendan Eich <brendan@×××××××.org>
1212 + *
1213 + * Alternatively, the contents of this file may be used under the terms of
1214 + * either of the GNU General Public License Version 2 or later (the "GPL"),
1215 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1216 + * in which case the provisions of the GPL or the LGPL are applicable instead
1217 + * of those above. If you wish to allow use of your version of this file only
1218 + * under the terms of either the GPL or the LGPL, and not to allow others to
1219 + * use your version of this file under the terms of the MPL, indicate your
1220 + * decision by deleting the provisions above and replace them with the notice
1221 + * and other provisions required by the GPL or the LGPL. If you do not delete
1222 + * the provisions above, a recipient may use your version of this file under
1223 + * the terms of any one of the MPL, the GPL or the LGPL.
1224 + *
1225 + * ***** END LICENSE BLOCK ***** */
1226 +
1227 +/* This code is for MIPS using the O32 ABI. */
1228 +
1229 +/* Platform specific code to invoke XPCOM methods on native objects */
1230 +
1231 +#include "xptcprivate.h"
1232 +
1233 +
1234 +extern "C" uint32
1235 +invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
1236 +{
1237 + // Count a word for a0 even though it's never stored or loaded
1238 + // We do this only for alignment of register pairs.
1239 + PRUint32 result = 1;
1240 + for (PRUint32 i = 0; i < paramCount; i++, s++)
1241 + {
1242 + result++;
1243 +
1244 + if (s->IsPtrData())
1245 + continue;
1246 +
1247 + switch(s->type)
1248 + {
1249 + case nsXPTType::T_I64 :
1250 + case nsXPTType::T_U64 :
1251 + case nsXPTType::T_DOUBLE :
1252 + if (result & 1)
1253 + result++;
1254 + result++;
1255 + break;
1256 + }
1257 + }
1258 + return (result + 1) & ~(PRUint32)1;
1259 +}
1260 +
1261 +extern "C" void
1262 +invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
1263 + nsXPTCVariant* s)
1264 +{
1265 + // Skip the unused a0 slot, which we keep only for register pair alignment.
1266 + d++;
1267 +
1268 + for (PRUint32 i = 0; i < paramCount; i++, d++, s++)
1269 + {
1270 + if (s->IsPtrData())
1271 + {
1272 + *((void**)d) = s->ptr;
1273 + continue;
1274 + }
1275 +
1276 + *((void**)d) = s->val.p;
1277 +
1278 + switch(s->type)
1279 + {
1280 + case nsXPTType::T_I64 :
1281 + if ((PRWord)d & 4) d++;
1282 + *((PRInt64*) d) = s->val.i64; d++;
1283 + break;
1284 + case nsXPTType::T_U64 :
1285 + if ((PRWord)d & 4) d++;
1286 + *((PRUint64*) d) = s->val.u64; d++;
1287 + break;
1288 + case nsXPTType::T_DOUBLE :
1289 + if ((PRWord)d & 4) d++;
1290 + *((double*) d) = s->val.d; d++;
1291 + break;
1292 + }
1293 + }
1294 +}
1295 +
1296 +extern "C" nsresult _XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
1297 + PRUint32 paramCount,
1298 + nsXPTCVariant* params);
1299 +
1300 +extern "C"
1301 +XPTC_PUBLIC_API(nsresult)
1302 +XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
1303 + PRUint32 paramCount, nsXPTCVariant* params)
1304 +{
1305 + return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
1306 +}
1307 +
1308 Index: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp
1309 ===================================================================
1310 RCS file: mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp
1311 diff -N mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp
1312 --- /dev/null 1 Jan 1970 00:00:00 -0000
1313 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp 30 May 2007 09:08:10 -0000
1314 @@ -0,0 +1,131 @@
1315 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1316 + * Version: MPL 1.1
1317 + *
1318 + * ***** BEGIN LICENSE BLOCK *****
1319 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1320 + *
1321 + * The contents of this file are subject to the Mozilla Public License Version
1322 + * 1.1 (the "License"); you may not use this file except in compliance with
1323 + * the License. You may obtain a copy of the License at
1324 + * http://www.mozilla.org/MPL/
1325 + *
1326 + * Software distributed under the License is distributed on an "AS IS" basis,
1327 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1328 + * for the specific language governing rights and limitations under the
1329 + * License.
1330 + *
1331 + * The Original Code is mozilla.org code.
1332 + *
1333 + * The Initial Developer of the Original Code is
1334 + * Netscape Communications Corp, Inc.
1335 + * Portions created by the Initial Developer are Copyright (C) 2001
1336 + * the Initial Developer. All Rights Reserved.
1337 + *
1338 + * Contributor(s):
1339 + * Stuart Parmenter <pavlov@××××××××.com>
1340 + *
1341 + * Alternatively, the contents of this file may be used under the terms of
1342 + * either of the GNU General Public License Version 2 or later (the "GPL"),
1343 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1344 + * in which case the provisions of the GPL or the LGPL are applicable instead
1345 + * of those above. If you wish to allow use of your version of this file only
1346 + * under the terms of either the GPL or the LGPL, and not to allow others to
1347 + * use your version of this file under the terms of the MPL, indicate your
1348 + * decision by deleting the provisions above and replace them with the notice
1349 + * and other provisions required by the GPL or the LGPL. If you do not delete
1350 + * the provisions above, a recipient may use your version of this file under
1351 + * the terms of any one of the MPL, the GPL or the LGPL.
1352 + *
1353 + * ***** END LICENSE BLOCK ***** */
1354 +
1355 +#include "xptcprivate.h"
1356 +
1357 +/*
1358 + * This is for MIPS O32 ABI
1359 + * Args contains a0-3 and then the stack.
1360 + * Because a0 is 'this', we want to skip it
1361 + */
1362 +extern "C" nsresult
1363 +PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args)
1364 +{
1365 + args++; // always skip over a0
1366 +
1367 +#define PARAM_BUFFER_COUNT 16
1368 +
1369 + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
1370 + nsXPTCMiniVariant* dispatchParams = NULL;
1371 + nsIInterfaceInfo* iface_info = NULL;
1372 + const nsXPTMethodInfo* info;
1373 + PRUint8 paramCount;
1374 + PRUint8 i;
1375 + nsresult result = NS_ERROR_FAILURE;
1376 +
1377 + NS_ASSERTION(self,"no self");
1378 +
1379 + self->GetInterfaceInfo(&iface_info);
1380 + NS_ASSERTION(iface_info,"no interface info");
1381 +
1382 + iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
1383 + NS_ASSERTION(info,"no interface info");
1384 +
1385 + paramCount = info->GetParamCount();
1386 +
1387 + // setup variant array pointer
1388 + if(paramCount > PARAM_BUFFER_COUNT)
1389 + dispatchParams = new nsXPTCMiniVariant[paramCount];
1390 + else
1391 + dispatchParams = paramBuffer;
1392 + NS_ASSERTION(dispatchParams,"no place for params");
1393 +
1394 + PRUint32* ap = args;
1395 + for(i = 0; i < paramCount; i++, ap++)
1396 + {
1397 + const nsXPTParamInfo& param = info->GetParam(i);
1398 + const nsXPTType& type = param.GetType();
1399 + nsXPTCMiniVariant* dp = &dispatchParams[i];
1400 +
1401 + if(param.IsOut() || !type.IsArithmetic())
1402 + {
1403 + dp->val.p = (void*) *ap;
1404 + continue;
1405 + }
1406 +
1407 + dp->val.p = (void*) *ap;
1408 +
1409 + switch(type)
1410 + {
1411 + case nsXPTType::T_I64 :
1412 + if ((PRWord)ap & 4) ap++;
1413 + dp->val.i64 = *((PRInt64*) ap); ap++;
1414 + break;
1415 + case nsXPTType::T_U64 :
1416 + if ((PRWord)ap & 4) ap++;
1417 + dp->val.u64 = *((PRInt64*) ap); ap++;
1418 + break;
1419 + case nsXPTType::T_DOUBLE:
1420 + if ((PRWord)ap & 4) ap++;
1421 + dp->val.d = *((double*) ap); ap++;
1422 + break;
1423 + }
1424 + }
1425 +
1426 + result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
1427 +
1428 + NS_RELEASE(iface_info);
1429 +
1430 + if(dispatchParams != paramBuffer)
1431 + delete [] dispatchParams;
1432 +
1433 + return result;
1434 +}
1435 +
1436 +#define STUB_ENTRY(n) // done in the .s file
1437 +
1438 +#define SENTINEL_ENTRY(n) \
1439 +nsresult nsXPTCStubBase::Sentinel##n() \
1440 +{ \
1441 + NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
1442 + return NS_ERROR_NOT_IMPLEMENTED; \
1443 +}
1444 +
1445 +#include "xptcstubsdef.inc"
1446 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
1447 --- mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s 1970-01-01 10:00:00 +1000
1448 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s 2007-01-17 15:33:47 +1000
1449 @@ -0,0 +1,142 @@
1450 +/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1451 + * Version: MPL 1.1
1452 + *
1453 + * The contents of this file are subject to the Mozilla Public License Version
1454 + * 1.1 (the "License"); you may not use this file except in compliance with
1455 + * the License. You may obtain a copy of the License at
1456 + * http://www.mozilla.org/MPL/
1457 + *
1458 + * Software distributed under the License is distributed on an "AS IS" basis,
1459 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1460 + * for the specific language governing rights and limitations under the
1461 + * License.
1462 + *
1463 + * The Original Code is mozilla.org code.
1464 + *
1465 + * The Initial Developer of the Original Code is
1466 + * Netscape Communications Corp, Inc.
1467 + * Portions created by the Initial Developer are Copyright (C) 2001
1468 + * the Initial Developer. All Rights Reserved.
1469 + *
1470 + * Contributor(s):
1471 + * Stuart Parmenter <pavlov@××××××××.com>
1472 + * Chris Waterson <waterson@××××××××.com>
1473 + * Thiemo Seufer <seufer@×××××××××××××××××××××.de>
1474 + */
1475 +
1476 +/* This code is for MIPS using the O32 ABI. */
1477 +
1478 +#include <sys/regdef.h>
1479 +#include <sys/asm.h>
1480 +
1481 +# NARGSAVE is the argument space in the callers frame, including extra
1482 +# 'shadowed' space for the argument registers. The minimum of 4
1483 +# argument slots is sometimes predefined in the header files.
1484 +#ifndef NARGSAVE
1485 +#define NARGSAVE 4
1486 +#endif
1487 +
1488 +#define LOCALSZ 2 /* gp, ra */
1489 +#define FRAMESZ ((((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK)
1490 +
1491 +#define RAOFF (FRAMESZ - (1*SZREG))
1492 +#define GPOFF (FRAMESZ - (2*SZREG))
1493 +
1494 +#define A0OFF (FRAMESZ + (0*SZREG))
1495 +#define A1OFF (FRAMESZ + (1*SZREG))
1496 +#define A2OFF (FRAMESZ + (2*SZREG))
1497 +#define A3OFF (FRAMESZ + (3*SZREG))
1498 +
1499 + .text
1500 +
1501 +#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
1502 +#define STUB_ENTRY(x) \
1503 + .if x < 10; \
1504 + .globl _ZN14nsXPTCStubBase5Stub ##x ##Ev; \
1505 + .type _ZN14nsXPTCStubBase5Stub ##x ##Ev,@function; \
1506 + .aent _ZN14nsXPTCStubBase5Stub ##x ##Ev,0; \
1507 +_ZN14nsXPTCStubBase5Stub ##x ##Ev:; \
1508 + SETUP_GP; \
1509 + li t0,x; \
1510 + b sharedstub; \
1511 + .elseif x < 100; \
1512 + .globl _ZN14nsXPTCStubBase6Stub ##x ##Ev; \
1513 + .type _ZN14nsXPTCStubBase6Stub ##x ##Ev,@function; \
1514 + .aent _ZN14nsXPTCStubBase6Stub ##x ##Ev,0; \
1515 +_ZN14nsXPTCStubBase6Stub ##x ##Ev:; \
1516 + SETUP_GP; \
1517 + li t0,x; \
1518 + b sharedstub; \
1519 + .elseif x < 1000; \
1520 + .globl _ZN14nsXPTCStubBase7Stub ##x ##Ev; \
1521 + .type _ZN14nsXPTCStubBase7Stub ##x ##Ev,@function; \
1522 + .aent _ZN14nsXPTCStubBase7Stub ##x ##Ev,0; \
1523 +_ZN14nsXPTCStubBase7Stub ##x ##Ev:; \
1524 + SETUP_GP; \
1525 + li t0,x; \
1526 + b sharedstub; \
1527 + .else; \
1528 + .err; \
1529 + .endif
1530 +#else /* not G++ V3 ABI */
1531 +#define STUB_ENTRY(x) \
1532 + .globl Stub ##x ##__14nsXPTCStubBase; \
1533 + .type Stub ##x ##__14nsXPTCStubBase,@function; \
1534 + .aent Stub ##x ##__14nsXPTCStubBase,0; \
1535 +Stub ##x ##__14nsXPTCStubBase:; \
1536 + SETUP_GP; \
1537 + li t0,x; \
1538 + b sharedstub
1539 +#endif /* G++ V3 ABI */
1540 +
1541 +# SENTINEL_ENTRY is handled in the cpp file.
1542 +#define SENTINEL_ENTRY(x)
1543 +
1544 +#
1545 +# open a dummy frame for the function entries
1546 +#
1547 + .align 2
1548 + .type dummy,@function
1549 + .ent dummy, 0
1550 + .frame sp, FRAMESZ, ra
1551 +dummy:
1552 + SETUP_GP
1553 +
1554 +#include "xptcstubsdef.inc"
1555 +
1556 +sharedstub:
1557 + subu sp, FRAMESZ
1558 +
1559 + # specify the save register mask for gp, ra, a0-a3
1560 + .mask 0x900000F0, RAOFF-FRAMESZ
1561 +
1562 + sw ra, RAOFF(sp)
1563 + SAVE_GP(GPOFF)
1564 +
1565 + # Micro-optimization: a0 is already loaded, and its slot gets
1566 + # ignored by PrepareAndDispatch, so no need to save it here.
1567 + # sw a0, A0OFF(sp)
1568 + sw a1, A1OFF(sp)
1569 + sw a2, A2OFF(sp)
1570 + sw a3, A3OFF(sp)
1571 +
1572 + la t9, PrepareAndDispatch
1573 +
1574 + # t0 is methodIndex
1575 + move a1, t0
1576 + # have a2 point to the begin of the argument space on stack
1577 + addiu a2, sp, FRAMESZ
1578 +
1579 + # PrepareAndDispatch(that, methodIndex, args)
1580 + jalr t9
1581 +
1582 + # Micro-optimization: Using jalr explicitly has the side-effect
1583 + # of not triggering .cprestore. This is ok because we have no
1584 + # gp reference below this point. It also allows better
1585 + # instruction sscheduling.
1586 + # lw gp, GPOFF(fp)
1587 +
1588 + lw ra, RAOFF(sp)
1589 + addiu sp, FRAMESZ
1590 + j ra
1591 + END(dummy)
1592
1593
1594
1595 1.1 src/patchsets/mozilla-firefox/2.0.0.17/007_mozilla-firefox-1.5-asneeded.patch
1596
1597 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/007_mozilla-firefox-1.5-asneeded.patch?rev=1.1&view=markup
1598 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/007_mozilla-firefox-1.5-asneeded.patch?rev=1.1&content-type=text/plain
1599
1600 Index: 007_mozilla-firefox-1.5-asneeded.patch
1601 ===================================================================
1602 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=311236
1603
1604 --- mozilla/embedding/browser/gtk/tests/Makefile.in.orig 2005-02-04 00:01:41.000000000 +0100
1605 +++ mozilla/embedding/browser/gtk/tests/Makefile.in 2006-04-28 05:21:10.000000000 +0200
1606 @@ -75,6 +75,8 @@
1607 endif
1608 endif
1609
1610 +OS_LDFLAGS += -Wl,-rpath-link,'$(DEPTH)/dist/bin'
1611 +
1612 ifdef MOZ_ENABLE_GTK
1613 LIBS += \
1614 -lgtkembedmoz \
1615
1616
1617
1618 1.1 src/patchsets/mozilla-firefox/2.0.0.17/008_firefox-pkgconfig-1.patch
1619
1620 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/008_firefox-pkgconfig-1.patch?rev=1.1&view=markup
1621 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/008_firefox-pkgconfig-1.patch?rev=1.1&content-type=text/plain
1622
1623 Index: 008_firefox-pkgconfig-1.patch
1624 ===================================================================
1625 # Fixup pkgconfig files for broken out NSPR and NSS. Patch from Fedora.
1626 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=221823
1627
1628 --- mozilla/config/autoconf.mk.in.orig 2006-06-14 22:16:08.000000000 +0200
1629 +++ mozilla/config/autoconf.mk.in 2006-07-20 11:00:13.000000000 +0200
1630 @@ -57,13 +57,13 @@
1631 prefix = @prefix@
1632 exec_prefix = @exec_prefix@
1633 bindir = @bindir@
1634 -includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
1635 +includedir = $(mozappdir)/include
1636 libdir = @libdir@
1637 datadir = @datadir@
1638 mandir = @mandir@
1639 -idldir = @datadir@/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
1640 +idldir = $(mozappdir)/idl
1641
1642 -mozappdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
1643 +mozappdir = $(libdir)/mozilla-$(MOZ_APP_NAME)
1644 mredir = $(libdir)/mre/mre-$(MOZ_APP_VERSION)
1645 mrelibdir = $(mredir)/lib
1646
1647 --- mozilla/build/unix/Makefile.in.orig 2005-07-07 20:24:39.000000000 +0200
1648 +++ mozilla/build/unix/Makefile.in 2006-07-20 11:00:13.000000000 +0200
1649 @@ -61,6 +61,19 @@
1650 NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version)
1651 endif
1652
1653 +# Hack to make sure that mozilla-nss.pc has the proper nss dependencies
1654 +ifdef MOZ_NATIVE_NSS
1655 +FULL_NSS_CFLAGS=$(shell $(NSS_CONFIG) --cflags)
1656 +FULL_NSS_LIBS=$(shell $(NSS_CONFIG) --libs)
1657 +NSS_NAME=nss
1658 +NSS_VERSION=$(shell $(NSS_CONFIG) --version)
1659 +else
1660 +FULL_NSS_CFLAGS=-I$(includedir)/nss
1661 +FULL_NSS_LIBS=-L$(mozappdir)/nss -lnss3 -lsmime3 -lssl3 -lsoftokn3
1662 +NSS_NAME=$(MOZ_APP_NAME)-nss
1663 +NSS_VERSION=$(MOZ_APP_VERSION)
1664 +endif
1665 +
1666 ifdef MOZ_ENABLE_GTK
1667 SUPERWIN_LIBS=-lgtksuperwin
1668 endif
1669 @@ -83,7 +96,8 @@
1670 -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
1671 -e "s|%DEFS%|$(_DEFS)|" \
1672 -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
1673 - -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@
1674 + -e 's|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|' \
1675 + -e 's|\(echo -L.*\)\($$\)|\1 -Wl,-R$(mozappdir)\2|' > $@
1676
1677 $(MOZ_APP_NAME)-%.pc : mozilla-%.pc.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
1678 cat $< | sed \
1679 @@ -99,7 +113,12 @@
1680 -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
1681 -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
1682 -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
1683 - -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" > $@
1684 + -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \
1685 + -e "s|%FULL_NSS_LIBS%|$(FULL_NSS_LIBS)|" \
1686 + -e "s|%FULL_NSS_CFLAGS%|$(FULL_NSS_CFLAGS)|" \
1687 + -e "s|%NSS_NAME%|$(NSS_NAME)|" \
1688 + -e "s|%NSS_VERSION%|$(NSS_VERSION)|" \
1689 + -e "s|\(^Libs: -L.*\)|\1 -Wl,-R\$$\{libdir}|" > $@
1690
1691 libs:: $(MOZ_APP_NAME)-config
1692 chmod 755 $<
1693 --- mozilla/build/unix/mozilla-js.pc.in.orig 2006-07-20 10:58:48.000000000 +0200
1694 +++ mozilla/build/unix/mozilla-js.pc.in 2006-07-20 11:00:13.000000000 +0200
1695 @@ -6,6 +6,6 @@
1696 Name: JavaScript
1697 Description: The Mozilla JavaScript Library
1698 Version: %MOZILLA_VERSION%
1699 -Requires: %NSPR_NAME% >= %NSPR_VERSION%
1700 +Requires: %MOZ_APP_NAME%-%NSPR_NAME% >= %NSPR_VERSION%
1701 Libs: -L${libdir} -lmozjs
1702 Cflags: -I${includedir}/js -DXP_UNIX
1703 --- mozilla/build/unix/mozilla-nspr.pc.in.orig 2006-07-20 10:59:11.000000000 +0200
1704 +++ mozilla/build/unix/mozilla-nspr.pc.in 2006-07-20 11:00:13.000000000 +0200
1705 @@ -1,12 +1,5 @@
1706 -prefix=%prefix%
1707 -exec_prefix=%exec_prefix%
1708 -libdir=%libdir%
1709 -includedir=%includedir%
1710 -
1711 Name: NSPR
1712 Description: The Netscape Portable Runtime
1713 Version: %NSPR_VERSION%
1714 -Libs: %FULL_NSPR_LIBS%
1715 -Cflags: %FULL_NSPR_CFLAGS%
1716 -
1717 +Requires: %NSPR_NAME% >= %NSPR_VERSION%
1718
1719 --- mozilla/build/unix/mozilla-xpcom.pc.in.orig 2006-07-20 10:59:32.000000000 +0200
1720 +++ mozilla/build/unix/mozilla-xpcom.pc.in 2006-07-20 11:00:13.000000000 +0200
1721 @@ -7,6 +7,6 @@
1722 Name: XPCOM
1723 Description: The Mozilla Cross Platform Component Library
1724 Version: %MOZILLA_VERSION%
1725 -Requires: %NSPR_NAME% >= %NSPR_VERSION%
1726 +Requires: %MOZ_APP_NAME%-%NSPR_NAME% >= %NSPR_VERSION%
1727 Libs: -L${libdir} -lxpcom
1728 Cflags: -I${includedir} -I${includedir}/xpcom -I${includedir}/string
1729 --- mozilla/build/unix/mozilla-nss.pc.in.orig 2006-07-20 10:59:41.000000000 +0200
1730 +++ mozilla/build/unix/mozilla-nss.pc.in 2006-07-20 11:00:13.000000000 +0200
1731 @@ -1,11 +1,4 @@
1732 -prefix=%prefix%
1733 -exec_prefix=%exec_prefix%
1734 -libdir=%libdir%
1735 -includedir=%includedir%
1736 -
1737 Name: NSS
1738 Description: Mozilla Network Security Services
1739 -Version: %MOZILLA_VERSION%
1740 -Requires: %NSPR_NAME% >= %NSPR_VERSION%
1741 -Libs: -L${libdir} -lnss3 -lsmime3 -lssl3 -lsoftokn3
1742 -Cflags: -I${includedir}/nss
1743 +Version: %NSS_VERSION%
1744 +Requires: %NSS_NAME% >= %NSS_VERSION%
1745
1746
1747
1748 1.1 src/patchsets/mozilla-firefox/2.0.0.17/010_visibility-gcc-4.2.patch
1749
1750 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/010_visibility-gcc-4.2.patch?rev=1.1&view=markup
1751 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/010_visibility-gcc-4.2.patch?rev=1.1&content-type=text/plain
1752
1753 Index: 010_visibility-gcc-4.2.patch
1754 ===================================================================
1755 --- configure.in.orig 2007-10-12 20:39:27.000000000 +0200
1756 +++ configure.in 2007-10-12 20:40:49.000000000 +0200
1757 @@ -2657,8 +2657,7 @@
1758 ])
1759 if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \
1760 "$ac_cv_have_visibility_class_bug" = "no"; then
1761 - VISIBILITY_FLAGS='-I$(DIST)/include/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
1762 - WRAP_SYSTEM_INCLUDES=1
1763 + VISIBILITY_FLAGS='-fvisibility=hidden'
1764 else
1765 VISIBILITY_FLAGS='-fvisibility=hidden'
1766 fi # have visibility pragma bug
1767
1768
1769
1770 1.1 src/patchsets/mozilla-firefox/2.0.0.17/016_firefox-nss-3.12-asneeded.patch
1771
1772 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/016_firefox-nss-3.12-asneeded.patch?rev=1.1&view=markup
1773 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/016_firefox-nss-3.12-asneeded.patch?rev=1.1&content-type=text/plain
1774
1775 Index: 016_firefox-nss-3.12-asneeded.patch
1776 ===================================================================
1777 # Fix a FTBFS with system libnss (caused by bad linking order with libcrmf)
1778 # by Fabien Tassin <fta@×××××××××.org>
1779
1780 Index: seamonkey-1.1.4/configure.in
1781 ===================================================================
1782 --- seamonkey-1.1.4.orig/configure.in
1783 +++ seamonkey-1.1.4/configure.in
1784 @@ -3735,17 +3735,17 @@
1785 [ --with-system-nss Use system installed NSS],
1786 _USE_SYSTEM_NSS=1 )
1787
1788 if test -n "$_USE_SYSTEM_NSS"; then
1789 AM_PATH_NSS(3.0.0, [MOZ_NATIVE_NSS=1], [MOZ_NATIVE_NSS=])
1790 fi
1791
1792 if test -n "$MOZ_NATIVE_NSS"; then
1793 - NSS_LIBS="$NSS_LIBS -lcrmf"
1794 + NSS_LIBS=" -lcrmf $NSS_LIBS"
1795 else
1796 NSS_CFLAGS='-I$(DIST)/public/nss'
1797 NSS_DEP_LIBS='\\\
1798 $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \\\
1799 $(DIST)/lib/$(DLL_PREFIX)smime'$NSS_VERSION'$(DLL_SUFFIX) \\\
1800 $(DIST)/lib/$(DLL_PREFIX)ssl'$NSS_VERSION'$(DLL_SUFFIX) \\\
1801 $(DIST)/lib/$(DLL_PREFIX)nss'$NSS_VERSION'$(DLL_SUFFIX) \\\
1802 $(DIST)/lib/$(DLL_PREFIX)softokn'$NSS_VERSION'$(DLL_SUFFIX)'
1803
1804
1805
1806
1807 1.1 src/patchsets/mozilla-firefox/2.0.0.17/032_firefox-2.0_ppc64-1.patch
1808
1809 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/032_firefox-2.0_ppc64-1.patch?rev=1.1&view=markup
1810 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/032_firefox-2.0_ppc64-1.patch?rev=1.1&content-type=text/plain
1811
1812 Index: 032_firefox-2.0_ppc64-1.patch
1813 ===================================================================
1814 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=361415
1815
1816 unchanged:
1817 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-21 17:09:28.000000000 +0000
1818 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-20 10:13:38.000000000 +0000
1819 @@ -267,6 +267,11 @@
1820 ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
1821 AS := $(CC) -c -x assembler-with-cpp
1822 endif
1823 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc64)
1824 +CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
1825 +ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
1826 +AS := $(CC) -c -x assembler-with-cpp
1827 +endif
1828
1829 #
1830 # NetBSD/PPC
1831 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
1832 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-21 14:01:45.000000000 +0000
1833 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-22 10:43:26.000000000 +0000
1834 @@ -0,0 +1,154 @@
1835 +// -*- Mode: Asm -*-
1836 +//
1837 +// The contents of this file are subject to the Netscape Public
1838 +// License Version 1.1 (the "License"); you may not use this file
1839 +// except in compliance with the License. You may obtain a copy of
1840 +// the License at http://www.mozilla.org/NPL/
1841 +//
1842 +// Software distributed under the License is distributed on an "AS
1843 +// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
1844 +// implied. See the License for the specific language governing
1845 +// rights and limitations under the License.
1846 +//
1847 +// The Original Code is mozilla.org code.
1848 +//
1849 +// The Initial Developer of the Original Code is Netscape
1850 +// Communications Corporation. Portions created by Netscape are
1851 +// Copyright (C) 1999 Netscape Communications Corporation. All
1852 +// Rights Reserved.
1853 +//
1854 +// Contributor(s):
1855 +// dwmw2@×××××××××.org (David Woodhouse)
1856 +// Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
1857 +// beard@××××××××.com (Patrick Beard)
1858 +// waterson@××××××××.com (Chris Waterson)
1859 +//
1860 +
1861 +.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4
1862 +.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
1863 +.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
1864 +.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
1865 +.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
1866 +.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
1867 +.set r30,30; .set r31,31
1868 +.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
1869 +.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
1870 +.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
1871 +.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
1872 +.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
1873 +.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
1874 +.set f30,30; .set f31,31
1875 +
1876 +
1877 +//
1878 +// XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
1879 +// PRUint32 paramCount, nsXPTCVariant* params)
1880 +//
1881 +
1882 + .section ".toc","aw"
1883 + .section ".text"
1884 + .align 2
1885 + .globl XPTC_InvokeByIndex
1886 + .section ".opd","aw"
1887 + .align 3
1888 +XPTC_InvokeByIndex:
1889 + .quad .XPTC_InvokeByIndex,.TOC.@tocbase
1890 + .previous
1891 + .type XPTC_InvokeByIndex,@function
1892 +.XPTC_InvokeByIndex:
1893 + mflr 0
1894 + std 0,16(r1)
1895 +
1896 + std r29,-24(r1)
1897 + std r30,-16(r1)
1898 + std r31,-8(r1)
1899 +
1900 + mr r29,r3 // Save 'that' in r29
1901 + mr r30,r4 // Save 'methodIndex' in r30
1902 + mr r31,r1 // Save old frame
1903 +
1904 + // Allocate stack frame with space for params. Since at least the
1905 + // first 7 parameters (not including 'that') will be in registers,
1906 + // we don't actually need stack space for those. We must ensure
1907 + // that the stack remains 16-byte aligned.
1908 + //
1909 + // | ..128-byte stack frame.. | | 7 GP | 13 FP | 3 NV |
1910 + // | |(params)........| regs | regs | regs |
1911 + // (r1)...........(+112)....(+128)
1912 + // (-23*8).(-16*8).(-3*8)..(r31)
1913 +
1914 + // +stack frame, -unused stack params, +regs storage, +1 for alignment
1915 + addi r7,r5,((112/8)-7+7+13+3+1)
1916 + rldicr r7,r7,3,59 // multiply by 8 and mask with ~15
1917 + neg r7,r7
1918 + stdux r1,r1,r7
1919 +
1920 +
1921 + // Call invoke_copy_to_stack(PRUint64* gpregs, double* fpregs,
1922 + // PRUint32 paramCount, nsXPTCVariant* s,
1923 + // PRUint64* d))
1924 +
1925 + // r5, r6 are passed through intact (paramCount, params)
1926 + // r7 (d) has to be r1+112 -- where parameters are passed on the stack.
1927 + // r3, r4 are above that, easier to address from r31 than from r1
1928 +
1929 + subi r3,r31,(23*8) // r3 --> GPRS
1930 + subi r4,r31,(16*8) // r4 --> FPRS
1931 + addi r7,r1,112 // r7 --> params
1932 + bl invoke_copy_to_stack
1933 + nop
1934 +
1935 + // Set up to invoke function
1936 +
1937 + ld r9,0(r29) // vtable (r29 is 'that')
1938 + mr r3,r29 // self is first arg, obviously
1939 +
1940 + sldi r30,r30,3 // Find function descriptor
1941 + add r9,r9,r30
1942 + ld r9,0(r9)
1943 +
1944 + ld r0,0(r9) // Actual address from fd.
1945 + std r2,40(r1) // Save r2 (TOC pointer)
1946 +
1947 + mtctr 0
1948 + ld r11,16(r9) // Environment pointer from fd.
1949 + ld r2,8(r9) // TOC pointer from fd.
1950 +
1951 + // Load FP and GP registers as required
1952 + ld r4, -(23*8)(r31)
1953 + ld r5, -(22*8)(r31)
1954 + ld r6, -(21*8)(r31)
1955 + ld r7, -(20*8)(r31)
1956 + ld r8, -(19*8)(r31)
1957 + ld r9, -(18*8)(r31)
1958 + ld r10, -(17*8)(r31)
1959 +
1960 + lfd f1, -(16*8)(r31)
1961 + lfd f2, -(15*8)(r31)
1962 + lfd f3, -(14*8)(r31)
1963 + lfd f4, -(13*8)(r31)
1964 + lfd f5, -(12*8)(r31)
1965 + lfd f6, -(11*8)(r31)
1966 + lfd f7, -(10*8)(r31)
1967 + lfd f8, -(9*8)(r31)
1968 + lfd f9, -(8*8)(r31)
1969 + lfd f10, -(7*8)(r31)
1970 + lfd f11, -(6*8)(r31)
1971 + lfd f12, -(5*8)(r31)
1972 + lfd f13, -(4*8)(r31)
1973 +
1974 + bctrl // Do it
1975 +
1976 + ld r2,40(r1) // Load our own TOC pointer
1977 + ld r1,0(r1) // Revert stack frame
1978 + ld 0,16(r1) // Reload lr
1979 + ld 29,-24(r1) // Restore NVGPRS
1980 + ld 30,-16(r1)
1981 + ld 31,-8(r1)
1982 + mtlr 0
1983 + blr
1984 +
1985 + .size XPTC_InvokeByIndex,.-.XPTC_InvokeByIndex
1986 +
1987 + /* Magic indicating no need for an executable stack */
1988 + .section .note.GNU-stack, "", @progbits ; .previous
1989 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 1970-01-01 01:00:00.000000000 +0100
1990 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 2006-11-21 17:00:06.000000000 +0000
1991 @@ -0,0 +1,127 @@
1992 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
1993 +/* ***** BEGIN LICENSE BLOCK *****
1994 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1995 + *
1996 + * The contents of this file are subject to the Mozilla Public License Version
1997 + * 1.1 (the "License"); you may not use this file except in compliance with
1998 + * the License. You may obtain a copy of the License at
1999 + * http://www.mozilla.org/MPL/
2000 + *
2001 + * Software distributed under the License is distributed on an "AS IS" basis,
2002 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2003 + * for the specific language governing rights and limitations under the
2004 + * License.
2005 + *
2006 + * The Original Code is mozilla.org code.
2007 + *
2008 + * The Initial Developer of the Original Code is
2009 + * Netscape Communications Corporation.
2010 + * Portions created by the Initial Developer are Copyright (C) 1998
2011 + * the Initial Developer. All Rights Reserved.
2012 + *
2013 + * Contributor(s):
2014 + * dwmw2@×××××××××.org (David Woodhouse)
2015 + * Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
2016 + * beard@××××××××.com (Patrick Beard)
2017 + * waterson@××××××××.com (Chris Waterson)
2018 + *
2019 + * Alternatively, the contents of this file may be used under the terms of
2020 + * either of the GNU General Public License Version 2 or later (the "GPL"),
2021 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2022 + * in which case the provisions of the GPL or the LGPL are applicable instead
2023 + * of those above. If you wish to allow use of your version of this file only
2024 + * under the terms of either the GPL or the LGPL, and not to allow others to
2025 + * use your version of this file under the terms of the MPL, indicate your
2026 + * decision by deleting the provisions above and replace them with the notice
2027 + * and other provisions required by the GPL or the LGPL. If you do not delete
2028 + * the provisions above, a recipient may use your version of this file under
2029 + * the terms of any one of the MPL, the GPL or the LGPL.
2030 + *
2031 + * ***** END LICENSE BLOCK ***** */
2032 +
2033 +// Platform specific code to invoke XPCOM methods on native objects
2034 +
2035 +// The purpose of XPTC_InvokeByIndex() is to map a platform
2036 +// independent call to the platform ABI. To do that,
2037 +// XPTC_InvokeByIndex() has to determine the method to call via vtable
2038 +// access. The parameters for the method are read from the
2039 +// nsXPTCVariant* and prepared for the native ABI.
2040 +
2041 +#include <stdio.h>
2042 +#include "xptcprivate.h"
2043 +
2044 +// 8 integral parameters are passed in registers, not including 'that'
2045 +#define GPR_COUNT 7
2046 +
2047 +// 8 floating point parameters are passed in registers, floats are
2048 +// promoted to doubles when passed in registers
2049 +#define FPR_COUNT 13
2050 +
2051 +extern "C" PRUint32
2052 +invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
2053 +{
2054 + return PRUint32(((paramCount * 2) + 3) & ~3);
2055 +}
2056 +
2057 +extern "C" void
2058 +invoke_copy_to_stack(PRUint64* gpregs,
2059 + double* fpregs,
2060 + PRUint32 paramCount,
2061 + nsXPTCVariant* s,
2062 + PRUint64* d)
2063 +{
2064 + PRUint64 tempu64;
2065 +
2066 + for(uint32 i = 0; i < paramCount; i++, s++) {
2067 + if(s->IsPtrData())
2068 + tempu64 = (PRUint64) s->ptr;
2069 + else {
2070 + switch(s->type) {
2071 + case nsXPTType::T_FLOAT: break;
2072 + case nsXPTType::T_DOUBLE: break;
2073 + case nsXPTType::T_I8: tempu64 = s->val.i8; break;
2074 + case nsXPTType::T_I16: tempu64 = s->val.i16; break;
2075 + case nsXPTType::T_I32: tempu64 = s->val.i32; break;
2076 + case nsXPTType::T_I64: tempu64 = s->val.i64; break;
2077 + case nsXPTType::T_U8: tempu64 = s->val.u8; break;
2078 + case nsXPTType::T_U16: tempu64 = s->val.u16; break;
2079 + case nsXPTType::T_U32: tempu64 = s->val.u32; break;
2080 + case nsXPTType::T_U64: tempu64 = s->val.u64; break;
2081 + case nsXPTType::T_BOOL: tempu64 = s->val.b; break;
2082 + case nsXPTType::T_CHAR: tempu64 = s->val.c; break;
2083 + case nsXPTType::T_WCHAR: tempu64 = s->val.wc; break;
2084 + default: tempu64 = (PRUint64) s->val.p; break;
2085 + }
2086 + }
2087 +
2088 + if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
2089 + if (i < FPR_COUNT)
2090 + fpregs[i] = s->val.d;
2091 + else
2092 + *(double *)d = s->val.d;
2093 + }
2094 + else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
2095 + if (i < FPR_COUNT) {
2096 + fpregs[i] = s->val.f; // if passed in registers, floats are promoted to doubles
2097 + } else {
2098 + float *p = (float *)d;
2099 + p++;
2100 + *p = s->val.f;
2101 + }
2102 + }
2103 + else {
2104 + if (i < GPR_COUNT)
2105 + gpregs[i] = tempu64;
2106 + else
2107 + *d = tempu64;
2108 + }
2109 + if (i >= 7)
2110 + d++;
2111 + }
2112 +}
2113 +
2114 +extern "C"
2115 +XPTC_PUBLIC_API(nsresult)
2116 +XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
2117 + PRUint32 paramCount, nsXPTCVariant* params);
2118 +
2119 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
2120 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-21 16:38:52.000000000 +0000
2121 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-22 10:51:14.000000000 +0000
2122 @@ -0,0 +1,102 @@
2123 +// -*- Mode: Asm -*-
2124 +//
2125 +// The contents of this file are subject to the Netscape Public
2126 +// License Version 1.1 (the "License"); you may not use this file
2127 +// except in compliance with the License. You may obtain a copy of
2128 +// the License at http://www.mozilla.org/NPL/
2129 +//
2130 +// Software distributed under the License is distributed on an "AS
2131 +// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
2132 +// implied. See the License for the specific language governing
2133 +// rights and limitations under the License.
2134 +//
2135 +// The Original Code is mozilla.org code.
2136 +//
2137 +// The Initial Developer of the Original Code is Netscape
2138 +// Communications Corporation. Portions created by Netscape are
2139 +// Copyright (C) 1999 Netscape Communications Corporation. All
2140 +// Rights Reserved.
2141 +//
2142 +// Contributor(s):
2143 +// dwmw2@×××××××××.org (David Woodhouse)
2144 +// Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
2145 +// beard@××××××××.com (Patrick Beard)
2146 +// waterson@××××××××.com (Chris Waterson)
2147 +//
2148 +
2149 +.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4
2150 +.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
2151 +.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
2152 +.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
2153 +.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
2154 +.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
2155 +.set r30,30; .set r31,31
2156 +.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
2157 +.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
2158 +.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
2159 +.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
2160 +.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
2161 +.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
2162 +.set f30,30; .set f31,31
2163 +
2164 + .section ".text"
2165 + .align 2
2166 + .globl SharedStub
2167 + .section ".opd","aw"
2168 + .align 3
2169 +
2170 +SharedStub:
2171 + .quad .SharedStub,.TOC.@tocbase
2172 + .previous
2173 + .type SharedStub,@function
2174 +
2175 +.SharedStub:
2176 + mflr r0
2177 +
2178 + std r4, -56(r1) // Save all GPRS
2179 + std r5, -48(r1)
2180 + std r6, -40(r1)
2181 + std r7, -32(r1)
2182 + std r8, -24(r1)
2183 + std r9, -16(r1)
2184 + std r10, -8(r1)
2185 +
2186 + stfd f13, -64(r1) // ... and FPRS
2187 + stfd f12, -72(r1)
2188 + stfd f11, -80(r1)
2189 + stfd f10, -88(r1)
2190 + stfd f9, -96(r1)
2191 + stfd f8, -104(r1)
2192 + stfd f7, -112(r1)
2193 + stfd f6, -120(r1)
2194 + stfd f5, -128(r1)
2195 + stfd f4, -136(r1)
2196 + stfd f3, -144(r1)
2197 + stfd f2, -152(r1)
2198 + stfd f1, -160(r1)
2199 +
2200 + subi r6,r1,56 // r6 --> gprData
2201 + subi r7,r1,160 // r7 --> fprData
2202 + addi r5,r1,112 // r5 --> extra stack args
2203 +
2204 + std r0, 16(r1)
2205 +
2206 + stdu r1,-288(r1)
2207 + // r3 has the 'self' pointer already
2208 +
2209 + mr r4,r11 // r4 is methodIndex selector, passed
2210 + // via r11 in the nsXPTCStubBase::StubXX() call
2211 +
2212 + bl PrepareAndDispatch
2213 + nop
2214 +
2215 + ld 1,0(r1) // restore stack
2216 + ld r0,16(r1) // restore LR
2217 + mtlr r0
2218 + blr
2219 +
2220 + .size SharedStub,.-.SharedStub
2221 +
2222 +
2223 +/* Magic indicating no need for an executable stack */
2224 +.section .note.GNU-stack, "", @progbits ; .previous
2225 unchanged:
2226 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 1970-01-01 01:00:00.000000000 +0100
2227 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 2006-11-21 16:59:46.000000000 +0000
2228 @@ -0,0 +1,247 @@
2229 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2230 +/* ***** BEGIN LICENSE BLOCK *****
2231 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2232 + *
2233 + * The contents of this file are subject to the Mozilla Public License Version
2234 + * 1.1 (the "License"); you may not use this file except in compliance with
2235 + * the License. You may obtain a copy of the License at
2236 + * http://www.mozilla.org/MPL/
2237 + *
2238 + * Software distributed under the License is distributed on an "AS IS" basis,
2239 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2240 + * for the specific language governing rights and limitations under the
2241 + * License.
2242 + *
2243 + * The Original Code is mozilla.org code.
2244 + *
2245 + * The Initial Developer of the Original Code is
2246 + * Netscape Communications Corporation.
2247 + * Portions created by the Initial Developer are Copyright (C) 1999
2248 + * the Initial Developer. All Rights Reserved.
2249 + *
2250 + * Contributor(s):
2251 + * dwmw2@×××××××××.org (David Woodhouse)
2252 + * Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
2253 + * beard@××××××××.com (Patrick Beard)
2254 + * waterson@××××××××.com (Chris Waterson)
2255 + *
2256 + * Alternatively, the contents of this file may be used under the terms of
2257 + * either of the GNU General Public License Version 2 or later (the "GPL"),
2258 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2259 + * in which case the provisions of the GPL or the LGPL are applicable instead
2260 + * of those above. If you wish to allow use of your version of this file only
2261 + * under the terms of either the GPL or the LGPL, and not to allow others to
2262 + * use your version of this file under the terms of the MPL, indicate your
2263 + * decision by deleting the provisions above and replace them with the notice
2264 + * and other provisions required by the GPL or the LGPL. If you do not delete
2265 + * the provisions above, a recipient may use your version of this file under
2266 + * the terms of any one of the MPL, the GPL or the LGPL.
2267 + *
2268 + * ***** END LICENSE BLOCK ***** */
2269 +
2270 +// Implement shared vtbl methods.
2271 +
2272 +#include "xptcprivate.h"
2273 +
2274 +// The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral
2275 +// parameters and the first 13 floating point parameters in registers
2276 +// (r3-r10 and f1-f13), no stack space is allocated for these by the
2277 +// caller. The rest of the parameters are passed in the callers stack
2278 +// area. The stack pointer has to retain 16-byte alignment, longlongs
2279 +// and doubles are aligned on 8-byte boundaries.
2280 +
2281 +#define PARAM_BUFFER_COUNT 16
2282 +#define GPR_COUNT 7
2283 +#define FPR_COUNT 13
2284 +
2285 +// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
2286 +//
2287 +// - 'args[]' contains the arguments passed on stack
2288 +// - 'gprData[]' contains the arguments passed in integer registers
2289 +// - 'fprData[]' contains the arguments passed in floating point registers
2290 +//
2291 +// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
2292 +// and then the method gets called.
2293 +#include <stdio.h>
2294 +extern "C" nsresult
2295 +PrepareAndDispatch(nsXPTCStubBase* self,
2296 + PRUint64 methodIndex,
2297 + PRUint64* args,
2298 + PRUint64 *gprData,
2299 + double *fprData)
2300 +{
2301 + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
2302 + nsXPTCMiniVariant* dispatchParams = NULL;
2303 + nsIInterfaceInfo* iface_info = NULL;
2304 + const nsXPTMethodInfo* info;
2305 + PRUint32 paramCount;
2306 + PRUint32 i;
2307 + nsresult result = NS_ERROR_FAILURE;
2308 +
2309 + NS_ASSERTION(self,"no self");
2310 +
2311 + self->GetInterfaceInfo(&iface_info);
2312 + NS_ASSERTION(iface_info,"no interface info");
2313 + if (! iface_info)
2314 + return NS_ERROR_UNEXPECTED;
2315 +
2316 + iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
2317 + NS_ASSERTION(info,"no method info");
2318 + if (! info)
2319 + return NS_ERROR_UNEXPECTED;
2320 +
2321 + paramCount = info->GetParamCount();
2322 +
2323 + // setup variant array pointer
2324 + if(paramCount > PARAM_BUFFER_COUNT)
2325 + dispatchParams = new nsXPTCMiniVariant[paramCount];
2326 + else
2327 + dispatchParams = paramBuffer;
2328 +
2329 + NS_ASSERTION(dispatchParams,"no place for params");
2330 + if (! dispatchParams)
2331 + return NS_ERROR_OUT_OF_MEMORY;
2332 +
2333 + PRUint64* ap = args;
2334 + PRUint64 tempu64;
2335 +
2336 + for(i = 0; i < paramCount; i++) {
2337 + const nsXPTParamInfo& param = info->GetParam(i);
2338 + const nsXPTType& type = param.GetType();
2339 + nsXPTCMiniVariant* dp = &dispatchParams[i];
2340 +
2341 + if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
2342 + if (i < FPR_COUNT)
2343 + dp->val.d = fprData[i];
2344 + else
2345 + dp->val.d = *(double*) ap;
2346 + } else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
2347 + if (i < FPR_COUNT)
2348 + dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles
2349 + else {
2350 + float *p = (float *)ap;
2351 + p++;
2352 + dp->val.f = *p;
2353 + }
2354 + } else { /* integer type or pointer */
2355 + if (i < GPR_COUNT)
2356 + tempu64 = gprData[i];
2357 + else
2358 + tempu64 = *ap;
2359 +
2360 + if (param.IsOut() || !type.IsArithmetic())
2361 + dp->val.p = (void*) tempu64;
2362 + else if (type ==nsXPTType::T_I8)
2363 + dp->val.i8 = (PRInt8) tempu64;
2364 + else if (type ==nsXPTType::T_I16)
2365 + dp->val.i16 = (PRInt16) tempu64;
2366 + else if (type ==nsXPTType::T_I32)
2367 + dp->val.i32 = (PRInt32) tempu64;
2368 + else if (type ==nsXPTType::T_I64)
2369 + dp->val.i64 = (PRInt64) tempu64;
2370 + else if (type ==nsXPTType::T_U8)
2371 + dp->val.u8 = (PRUint8) tempu64;
2372 + else if (type ==nsXPTType::T_U16)
2373 + dp->val.u16 = (PRUint16) tempu64;
2374 + else if (type ==nsXPTType::T_U32)
2375 + dp->val.u32 = (PRUint32) tempu64;
2376 + else if (type ==nsXPTType::T_U64)
2377 + dp->val.u64 = (PRUint64) tempu64;
2378 + else if (type ==nsXPTType::T_BOOL)
2379 + dp->val.b = (PRBool) tempu64;
2380 + else if (type ==nsXPTType::T_CHAR)
2381 + dp->val.c = (char) tempu64;
2382 + else if (type ==nsXPTType::T_WCHAR)
2383 + dp->val.wc = (wchar_t) tempu64;
2384 + else
2385 + NS_ASSERTION(0, "bad type");
2386 + }
2387 +
2388 + if (i >= 7)
2389 + ap++;
2390 + }
2391 +
2392 + result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
2393 +
2394 + NS_RELEASE(iface_info);
2395 +
2396 + if (dispatchParams != paramBuffer)
2397 + delete [] dispatchParams;
2398 +
2399 + return result;
2400 +}
2401 +
2402 +// Load r11 with the constant 'n' and branch to SharedStub().
2403 +//
2404 +// XXX Yes, it's ugly that we're relying on gcc's name-mangling here;
2405 +// however, it's quick, dirty, and'll break when the ABI changes on
2406 +// us, which is what we want ;-).
2407 +
2408 +#if __GXX_ABI_VERSION < 100
2409 +#error Prehistoric GCC not supported here
2410 +#else
2411 +// gcc-3 version
2412 +//
2413 +// As G++3 ABI contains the length of the functionname in the mangled
2414 +// name, it is difficult to get a generic assembler mechanism like
2415 +// in the G++ 2.95 case.
2416 +// Create names would be like:
2417 +// _ZN14nsXPTCStubBase5Stub1Ev
2418 +// _ZN14nsXPTCStubBase6Stub12Ev
2419 +// _ZN14nsXPTCStubBase7Stub123Ev
2420 +// _ZN14nsXPTCStubBase8Stub1234Ev
2421 +// etc.
2422 +// Use assembler directives to get the names right...
2423 +
2424 +# define STUB_ENTRY(n) \
2425 +__asm__ ( \
2426 + ".section \".toc\",\"aw\" \n\t" \
2427 + ".section \".text\" \n\t" \
2428 + ".align 2 \n\t" \
2429 + ".if "#n" < 10 \n\t" \
2430 + ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
2431 + ".section \".opd\",\"aw\" \n\t" \
2432 + ".align 3 \n\t" \
2433 +"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
2434 + ".quad ._ZN14nsXPTCStubBase5Stub"#n"Ev,.TOC.@tocbase \n\t" \
2435 + ".previous \n\t" \
2436 + ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \
2437 +"._ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
2438 + \
2439 + ".elseif "#n" < 100 \n\t" \
2440 + ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
2441 + ".section \".opd\",\"aw\" \n\t" \
2442 + ".align 3 \n\t" \
2443 +"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
2444 + ".quad ._ZN14nsXPTCStubBase6Stub"#n"Ev,.TOC.@tocbase \n\t" \
2445 + ".previous \n\t" \
2446 + ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \
2447 +"._ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
2448 + \
2449 + ".elseif "#n" < 1000 \n\t" \
2450 + ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
2451 + ".section \".opd\",\"aw\" \n\t" \
2452 + ".align 3 \n\t" \
2453 +"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
2454 + ".quad ._ZN14nsXPTCStubBase7Stub"#n"Ev,.TOC.@tocbase \n\t" \
2455 + ".previous \n\t" \
2456 + ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \
2457 +"._ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
2458 + \
2459 + ".else \n\t" \
2460 + ".err \"stub number "#n" >= 1000 not yet supported\"\n" \
2461 + ".endif \n\t" \
2462 + \
2463 + "li 11,"#n" \n\t" \
2464 + "b SharedStub \n" \
2465 +);
2466 +#endif
2467 +
2468 +#define SENTINEL_ENTRY(n) \
2469 +nsresult nsXPTCStubBase::Sentinel##n() \
2470 +{ \
2471 + NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
2472 + return NS_ERROR_NOT_IMPLEMENTED; \
2473 +}
2474 +
2475 +#include "xptcstubsdef.inc"
2476
2477
2478
2479 1.1 src/patchsets/mozilla-firefox/2.0.0.17/033_firefox-2.0_ppc_powerpc.patch
2480
2481 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/033_firefox-2.0_ppc_powerpc.patch?rev=1.1&view=markup
2482 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/033_firefox-2.0_ppc_powerpc.patch?rev=1.1&content-type=text/plain
2483
2484 Index: 033_firefox-2.0_ppc_powerpc.patch
2485 ===================================================================
2486 --- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2007-03-05 13:46:38.000000000 +0100
2487 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2007-03-05 13:47:30.000000000 +0100
2488 @@ -288,12 +288,12 @@
2489 #
2490 # Linux/PPC
2491 #
2492 -ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc)
2493 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
2494 CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
2495 ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
2496 AS := $(CC) -c -x assembler-with-cpp
2497 endif
2498 -ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc64)
2499 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
2500 CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
2501 ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
2502 AS := $(CC) -c -x assembler-with-cpp
2503
2504
2505
2506 1.1 src/patchsets/mozilla-firefox/2.0.0.17/040_firefox-2.0_arm.patch
2507
2508 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/040_firefox-2.0_arm.patch?rev=1.1&view=markup
2509 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/040_firefox-2.0_arm.patch?rev=1.1&content-type=text/plain
2510
2511 Index: 040_firefox-2.0_arm.patch
2512 ===================================================================
2513 diff -ur mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp
2514 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp 2008-09-25 10:58:54.000000000 +0200
2515 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_arm.cpp 2008-09-25 11:05:25.000000000 +0200
2516 @@ -212,7 +212,7 @@
2517 "add sp, sp, r4 \n\t" /* restore stack pointer */
2518 "mov %0, r0 \n\t" /* the result... */
2519 : "=r" (result)
2520 - : "r" (&my_params)
2521 + : "r" (&my_params), "m" (my_params)
2522 : "r0", "r1", "r2", "r3", "r4", "ip", "lr", "sp"
2523 );
2524
2525 diff -ur mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp
2526 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2008-09-25 10:58:54.000000000 +0200
2527 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2008-09-25 11:04:51.000000000 +0200
2528 @@ -57,7 +57,8 @@
2529 #endif
2530
2531 /* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol. */
2532 -static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch")
2533 +static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch")
2534 +__attribute__((used))
2535 DONT_DROP_OR_WARN;
2536
2537 static nsresult
2538
2539
2540
2541 1.1 src/patchsets/mozilla-firefox/2.0.0.17/050_respect-host-variable.patch
2542
2543 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/050_respect-host-variable.patch?rev=1.1&view=markup
2544 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/050_respect-host-variable.patch?rev=1.1&content-type=text/plain
2545
2546 Index: 050_respect-host-variable.patch
2547 ===================================================================
2548 # https://bugs.gentoo.org/show_bug.cgi?id=168893
2549
2550 --- mozilla/configure.in.old 2007-03-02 23:28:27.000000000 +0200
2551 +++ mozilla/configure.in 2007-03-02 23:29:23.000000000 +0200
2552 @@ -825,7 +825,6 @@
2553 OS_TARGET="${target_os}"
2554 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
2555 OS_RELEASE=
2556 - OS_TEST="${target_cpu}"
2557 case "${target_os}" in
2558 linux*) OS_ARCH=Linux ;;
2559 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
2560 @@ -837,8 +836,10 @@
2561 OS_TARGET=`uname -s`
2562 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
2563 OS_RELEASE=`uname -r`
2564 - OS_TEST=`uname -m`
2565 fi
2566 +
2567 +OS_TEST="${target_cpu}"
2568 +
2569 _COMPILER_PREFIX=
2570
2571 HOST_OS_ARCH=`echo $host_os | sed -e 's|/|_|g'`
2572
2573
2574
2575 1.1 src/patchsets/mozilla-firefox/2.0.0.17/055_firefox-2.0_gfbsd-pthreads.patch
2576
2577 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&view=markup
2578 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&content-type=text/plain
2579
2580 Index: 055_firefox-2.0_gfbsd-pthreads.patch
2581 ===================================================================
2582 # https://bugs.gentoo.org/show_bug.cgi?id=169825
2583
2584 --- mozilla/config/rules.mk.orig Thu Sep 14 14:07:03 2006
2585 +++ mozilla/config/rules.mk Wed Oct 18 11:00:09 2006
2586 @@ -442,9 +442,7 @@
2587 endif
2588
2589 ifeq ($(OS_ARCH),FreeBSD)
2590 -ifdef IS_COMPONENT
2591 -EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
2592 -endif
2593 +EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc
2594 endif
2595
2596 ifeq ($(OS_ARCH),NetBSD)
2597 --- mozilla/configure.in.orig 2007-02-06 02:37:37 -0300
2598 +++ mozilla/configure.in 2007-03-07 15:35:41 -0300
2599 @@ -2667,7 +2667,7 @@
2600 *-hpux11.*)
2601 ;;
2602 *)
2603 - AC_CHECK_LIB(c_r, gethostbyname_r)
2604 + AC_SEARCH_LIBS([gethostbyname_r], [c_r])
2605 ;;
2606 esac
2607 AC_CHECK_LIB(m, atan)
2608 --- mozilla/configure.in.orig 2007-02-06 02:37:37 -0300
2609 +++ mozilla/configure.in 2007-03-07 13:59:53 -0300
2610 @@ -2839,11 +2839,12 @@
2611 *-*-freebsd*)
2612 AC_DEFINE(_REENTRANT)
2613 AC_DEFINE(_THREAD_SAFE)
2614 - dnl -pthread links in -lc_r, so don't specify it explicitly.
2615 - if test "$ac_cv_have_dash_pthread" = "yes"; then
2616 - _PTHREAD_LDFLAGS="-pthread"
2617 + dnl use the environment PTHREAD_LIBS
2618 + if test -n "$PTHREAD_LIBS"; then
2619 + _PTHREAD_LDFLAGS="$PTHREAD_LIBS"
2620 else
2621 - _PTHREAD_LDFLAGS="-lc_r"
2622 + _PTHREAD_LDFLAGS="-lpthread"
2623 fi
2624 + LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
2625 ;;
2626
2627
2628
2629 1.1 src/patchsets/mozilla-firefox/2.0.0.17/060_embed-typeaheadfind-1.patch
2630
2631 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/060_embed-typeaheadfind-1.patch?rev=1.1&view=markup
2632 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/060_embed-typeaheadfind-1.patch?rev=1.1&content-type=text/plain
2633
2634 Index: 060_embed-typeaheadfind-1.patch
2635 ===================================================================
2636 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=273524
2637
2638 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/Makefile.in mozilla/extensions/typeaheadfind/Makefile.in
2639 --- mozilla.orig/extensions/typeaheadfind/Makefile.in 2005-03-26 00:12:02.000000000 -0500
2640 +++ mozilla/extensions/typeaheadfind/Makefile.in 2005-03-26 11:39:29.000000000 -0500
2641 @@ -31,7 +31,7 @@
2642
2643 include $(DEPTH)/config/autoconf.mk
2644
2645 -MODULE = typeaheadfind
2646 +MODULE = typeaheadfindsea
2647 DIRS = public src resources
2648
2649 include $(topsrcdir)/config/rules.mk
2650 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/Makefile.in mozilla/extensions/typeaheadfind/public/Makefile.in
2651 --- mozilla.orig/extensions/typeaheadfind/public/Makefile.in 2005-03-26 00:12:02.000000000 -0500
2652 +++ mozilla/extensions/typeaheadfind/public/Makefile.in 2005-03-26 11:39:29.000000000 -0500
2653 @@ -31,11 +31,11 @@
2654
2655 include $(DEPTH)/config/autoconf.mk
2656
2657 -MODULE=typeaheadfind
2658 -XPIDL_MODULE=typeaheadfind
2659 +MODULE=typeaheadfindsea
2660 +XPIDL_MODULE=typeaheadfindsea
2661 GRE_MODULE = 1
2662
2663 -XPIDLSRCS= ./nsITypeAheadFind.idl \
2664 +XPIDLSRCS= ./nsITypeAheadFindSea.idl \
2665 $(NULL)
2666
2667
2668 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFind.idl mozilla/extensions/typeaheadfind/public/nsITypeAheadFind.idl
2669 --- mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFind.idl 2005-03-26 00:12:02.000000000 -0500
2670 +++ mozilla/extensions/typeaheadfind/public/nsITypeAheadFind.idl 1969-12-31 19:00:00.000000000 -0500
2671 @@ -1,88 +0,0 @@
2672 -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2673 -/* ***** BEGIN LICENSE BLOCK *****
2674 - * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2675 - *
2676 - * The contents of this file are subject to the Mozilla Public License Version
2677 - * 1.1 (the "License"); you may not use this file except in compliance with
2678 - * the License. You may obtain a copy of the License at
2679 - * http://www.mozilla.org/MPL/
2680 - *
2681 - * Software distributed under the License is distributed on an "AS IS" basis,
2682 - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2683 - * for the specific language governing rights and limitations under the
2684 - * License.
2685 - *
2686 - * The Original Code is mozilla.org code.
2687 - *
2688 - * The Initial Developer of the Original Code is
2689 - * Netscape Communications Corporation.
2690 - * Portions created by the Initial Developer are Copyright (C) 1998
2691 - * the Initial Developer. All Rights Reserved.
2692 - *
2693 - * Contributor(s):
2694 - * Original Author: Aaron Leventhal (aaronl@××××××××.com)
2695 - *
2696 - * Alternatively, the contents of this file may be used under the terms of
2697 - * either the GNU General Public License Version 2 or later (the "GPL"), or
2698 - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2699 - * in which case the provisions of the GPL or the LGPL are applicable instead
2700 - * of those above. If you wish to allow use of your version of this file only
2701 - * under the terms of either the GPL or the LGPL, and not to allow others to
2702 - * use your version of this file under the terms of the MPL, indicate your
2703 - * decision by deleting the provisions above and replace them with the notice
2704 - * and other provisions required by the GPL or the LGPL. If you do not delete
2705 - * the provisions above, a recipient may use your version of this file under
2706 - * the terms of any one of the MPL, the GPL or the LGPL.
2707 - *
2708 - * ***** END LICENSE BLOCK ***** */
2709 -
2710 -#include "nsISupports.idl"
2711 -#include "domstubs.idl"
2712 -#include "nsISupportsPrimitives.idl"
2713 -
2714 -%{ C++
2715 - #include "nsIDOMEvent.h"
2716 -
2717 - #define NS_TYPEAHEADFIND_CID \
2718 - {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}}
2719 -
2720 - #define NS_TYPEAHEADFIND_CONTRACTID "@mozilla.org/typeaheadfind;1"
2721 -%}
2722 -
2723 -interface nsIDOMEvent;
2724 -
2725 -[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)]
2726 -interface nsITypeAheadFind : nsISupports
2727 -{
2728 - /** Is type ahead find mode currently on? */
2729 - readonly attribute boolean isActive;
2730 -
2731 - /** Manually start type ahead find mode */
2732 - void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly);
2733 -
2734 - /** Manually cancel type ahead find mode */
2735 - void cancelFind();
2736 -
2737 - /**
2738 - * Will find as you type start automatically if the user
2739 - * types with the focus on page content other than a textfield or select?
2740 - * If autostart is off, the startNewFind() method can be used to enact
2741 - * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText.
2742 - */
2743 - void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn);
2744 - boolean getAutoStart(in nsIDOMWindow aWindow);
2745 -
2746 - /**
2747 - * Find next recurrence if typeaheadfind was the last used find,
2748 - * as opposed to regular find. Returns false in nsISupportsPRBool if we
2749 - * don't handle the request.
2750 - */
2751 - void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports);
2752 -
2753 - /*
2754 - * Go back and remove one character from find string
2755 - * Returns true if backspace used
2756 - */
2757 - boolean backOneChar();
2758 -};
2759 -
2760 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl mozilla/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl
2761 --- mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl 1969-12-31 19:00:00.000000000 -0500
2762 +++ mozilla/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl 2005-03-26 11:39:29.000000000 -0500
2763 @@ -0,0 +1,88 @@
2764 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2765 +/* ***** BEGIN LICENSE BLOCK *****
2766 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2767 + *
2768 + * The contents of this file are subject to the Mozilla Public License Version
2769 + * 1.1 (the "License"); you may not use this file except in compliance with
2770 + * the License. You may obtain a copy of the License at
2771 + * http://www.mozilla.org/MPL/
2772 + *
2773 + * Software distributed under the License is distributed on an "AS IS" basis,
2774 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2775 + * for the specific language governing rights and limitations under the
2776 + * License.
2777 + *
2778 + * The Original Code is mozilla.org code.
2779 + *
2780 + * The Initial Developer of the Original Code is
2781 + * Netscape Communications Corporation.
2782 + * Portions created by the Initial Developer are Copyright (C) 1998
2783 + * the Initial Developer. All Rights Reserved.
2784 + *
2785 + * Contributor(s):
2786 + * Original Author: Aaron Leventhal (aaronl@××××××××.com)
2787 + *
2788 + * Alternatively, the contents of this file may be used under the terms of
2789 + * either the GNU General Public License Version 2 or later (the "GPL"), or
2790 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2791 + * in which case the provisions of the GPL or the LGPL are applicable instead
2792 + * of those above. If you wish to allow use of your version of this file only
2793 + * under the terms of either the GPL or the LGPL, and not to allow others to
2794 + * use your version of this file under the terms of the MPL, indicate your
2795 + * decision by deleting the provisions above and replace them with the notice
2796 + * and other provisions required by the GPL or the LGPL. If you do not delete
2797 + * the provisions above, a recipient may use your version of this file under
2798 + * the terms of any one of the MPL, the GPL or the LGPL.
2799 + *
2800 + * ***** END LICENSE BLOCK ***** */
2801 +
2802 +#include "nsISupports.idl"
2803 +#include "domstubs.idl"
2804 +#include "nsISupportsPrimitives.idl"
2805 +
2806 +%{ C++
2807 + #include "nsIDOMEvent.h"
2808 +
2809 + #define NS_TYPEAHEADFINDSEA_CID \
2810 + {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}}
2811 +
2812 + #define NS_TYPEAHEADFINDSEA_CONTRACTID "@mozilla.org/typeaheadfindsea;1"
2813 +%}
2814 +
2815 +interface nsIDOMEvent;
2816 +
2817 +[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)]
2818 +interface nsITypeAheadFindSea : nsISupports
2819 +{
2820 + /** Is type ahead find mode currently on? */
2821 + readonly attribute boolean isActive;
2822 +
2823 + /** Manually start type ahead find mode */
2824 + void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly);
2825 +
2826 + /** Manually cancel type ahead find mode */
2827 + void cancelFind();
2828 +
2829 + /**
2830 + * Will find as you type start automatically if the user
2831 + * types with the focus on page content other than a textfield or select?
2832 + * If autostart is off, the startNewFind() method can be used to enact
2833 + * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText.
2834 + */
2835 + void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn);
2836 + boolean getAutoStart(in nsIDOMWindow aWindow);
2837 +
2838 + /**
2839 + * Find next recurrence if typeaheadfindsea was the last used find,
2840 + * as opposed to regular find. Returns false in nsISupportsPRBool if we
2841 + * don't handle the request.
2842 + */
2843 + void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports);
2844 +
2845 + /*
2846 + * Go back and remove one character from find string
2847 + * Returns true if backspace used
2848 + */
2849 + boolean backOneChar();
2850 +};
2851 +
2852 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js mozilla/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js
2853 --- mozilla.orig/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js 2005-03-26 00:12:02.000000000 -0500
2854 +++ mozilla/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js 2005-03-26 11:39:29.000000000 -0500
2855 @@ -36,7 +36,7 @@
2856 *
2857 * ***** END LICENSE BLOCK ***** */
2858
2859 -pref("accessibility.typeaheadfind", true);
2860 -pref("accessibility.typeaheadfind.linksonly", true);
2861 -pref("accessibility.typeaheadfind.startlinksonly", false);
2862 -pref("accessibility.typeaheadfind.timeout", 5000);
2863 +pref("accessibility.typeaheadfindsea", true);
2864 +pref("accessibility.typeaheadfindsea.linksonly", true);
2865 +pref("accessibility.typeaheadfindsea.startlinksonly", false);
2866 +pref("accessibility.typeaheadfindsea.timeout", 5000);
2867 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/jar.mn mozilla/extensions/typeaheadfind/resources/jar.mn
2868 --- mozilla.orig/extensions/typeaheadfind/resources/jar.mn 2005-03-26 00:12:02.000000000 -0500
2869 +++ mozilla/extensions/typeaheadfind/resources/jar.mn 2005-03-26 11:39:29.000000000 -0500
2870 @@ -1,5 +1,5 @@
2871 en-US.jar:
2872 - locale/en-US/global/typeaheadfind.properties (locale/en-US/typeaheadfind.properties)
2873 + locale/en-US/global/typeaheadfindsea.properties (locale/en-US/typeaheadfindsea.properties)
2874
2875 toolkit.jar:
2876 content/global/notfound.wav (content/notfound.wav)
2877 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties
2878 --- mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties 2005-03-26 00:12:02.000000000 -0500
2879 +++ mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties 1969-12-31 19:00:00.000000000 -0500
2880 @@ -1,13 +0,0 @@
2881 -openparen = (
2882 -closeparen = )
2883 -textfound = Text found: "
2884 -textnotfound = Text not found: "
2885 -linkfound = Link found: "
2886 -linknotfound = Link not found: "
2887 -closequote = "
2888 -stopfind = Find stopped.
2889 -starttextfind = Starting -- find text as you type
2890 -startlinkfind = Starting -- find links as you type
2891 -repeated = repeated
2892 -nextmatch = - next match
2893 -prevmatch = - previous match
2894 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties
2895 --- mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties 1969-12-31 19:00:00.000000000 -0500
2896 +++ mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties 2005-03-26 11:39:29.000000000 -0500
2897 @@ -0,0 +1,13 @@
2898 +openparen = (
2899 +closeparen = )
2900 +textfound = Text found: "
2901 +textnotfound = Text not found: "
2902 +linkfound = Link found: "
2903 +linknotfound = Link not found: "
2904 +closequote = "
2905 +stopfind = Find stopped.
2906 +starttextfind = Starting -- find text as you type
2907 +startlinkfind = Starting -- find links as you type
2908 +repeated = repeated
2909 +nextmatch = - next match
2910 +prevmatch = - previous match
2911 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/Makefile.in mozilla/extensions/typeaheadfind/src/Makefile.in
2912 --- mozilla.orig/extensions/typeaheadfind/src/Makefile.in 2005-03-26 00:12:02.000000000 -0500
2913 +++ mozilla/extensions/typeaheadfind/src/Makefile.in 2005-03-26 11:39:29.000000000 -0500
2914 @@ -31,15 +31,15 @@
2915
2916 include $(DEPTH)/config/autoconf.mk
2917
2918 -MODULE = typeaheadfind
2919 -LIBRARY_NAME = typeaheadfind
2920 +MODULE = typeaheadfindsea
2921 +LIBRARY_NAME = typeaheadfindsea
2922 ifneq ($(OS_ARCH),WINNT)
2923 -SHORT_LIBNAME = typahead
2924 +SHORT_LIBNAME = typaheadsea
2925 endif
2926 GRE_MODULE = 1
2927 MOZILLA_INTERNAL_API = 1
2928
2929 -PACKAGE_FILE = typeaheadfind.pkg
2930 +PACKAGE_FILE = typeaheadfindsea.pkg
2931
2932 REQUIRES = appcomps \
2933 embedcomponents \
2934 @@ -66,7 +66,7 @@
2935
2936 EXPORT_LIBRARY = 1
2937 IS_COMPONENT = 1
2938 -MODULE_NAME = nsTypeAheadFind
2939 +MODULE_NAME = nsTypeAheadFindSea
2940
2941 CPPSRCS = \
2942 nsTypeAheadFind.cpp \
2943 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.cpp mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp
2944 --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.cpp 2005-03-26 00:12:02.000000000 -0500
2945 +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp 2005-03-26 11:39:29.000000000 -0500
2946 @@ -114,8 +114,8 @@
2947 ////////////////////////////////////////////////////////////////////////
2948
2949
2950 -NS_INTERFACE_MAP_BEGIN(nsTypeAheadFind)
2951 - NS_INTERFACE_MAP_ENTRY(nsITypeAheadFind)
2952 +NS_INTERFACE_MAP_BEGIN(nsTypeAheadFindSea)
2953 + NS_INTERFACE_MAP_ENTRY(nsITypeAheadFindSea)
2954 NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
2955 NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
2956 NS_INTERFACE_MAP_ENTRY(nsIScrollPositionListener)
2957 @@ -128,8 +128,8 @@
2958 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMKeyListener)
2959 NS_INTERFACE_MAP_END
2960
2961 -NS_IMPL_ADDREF(nsTypeAheadFind)
2962 -NS_IMPL_RELEASE(nsTypeAheadFind)
2963 +NS_IMPL_ADDREF(nsTypeAheadFindSea)
2964 +NS_IMPL_RELEASE(nsTypeAheadFindSea)
2965
2966 static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
2967 static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
2968 @@ -138,11 +138,11 @@
2969
2970 #define NS_FIND_CONTRACTID "@mozilla.org/embedcomp/rangefind;1"
2971
2972 -nsTypeAheadFind* nsTypeAheadFind::sInstance = nsnull;
2973 -PRInt32 nsTypeAheadFind::sAccelKey = -1; // magic value of -1 when unitialized
2974 +nsTypeAheadFindSea* nsTypeAheadFindSea::sInstance = nsnull;
2975 +PRInt32 nsTypeAheadFindSea::sAccelKey = -1; // magic value of -1 when unitialized
2976
2977
2978 -nsTypeAheadFind::nsTypeAheadFind():
2979 +nsTypeAheadFindSea::nsTypeAheadFindSea():
2980 mIsFindAllowedInWindow(PR_FALSE), mAutoStartPref(PR_FALSE),
2981 mLinksOnlyPref(PR_FALSE), mStartLinksOnlyPref(PR_FALSE),
2982 mLinksOnly(PR_FALSE), mIsTypeAheadOn(PR_FALSE), mCaretBrowsingOn(PR_FALSE),
2983 @@ -161,25 +161,25 @@
2984 static PRInt32 gInstanceCount;
2985 ++gInstanceCount;
2986 NS_ASSERTION(gInstanceCount == 1,
2987 - "There should be only 1 instance of nsTypeAheadFind!");
2988 + "There should be only 1 instance of nsTypeAheadFindSea!");
2989 #endif
2990 }
2991
2992
2993 -nsTypeAheadFind::~nsTypeAheadFind()
2994 +nsTypeAheadFindSea::~nsTypeAheadFindSea()
2995 {
2996 RemoveDocListeners();
2997 mTimer = nsnull;
2998
2999 nsCOMPtr<nsIPrefBranch2> prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID));
3000 if (prefInternal) {
3001 - prefInternal->RemoveObserver("accessibility.typeaheadfind", this);
3002 + prefInternal->RemoveObserver("accessibility.typeaheadfindsea", this);
3003 prefInternal->RemoveObserver("accessibility.browsewithcaret", this);
3004 }
3005 }
3006
3007 nsresult
3008 -nsTypeAheadFind::Init()
3009 +nsTypeAheadFindSea::Init()
3010 {
3011 nsresult rv = NS_NewISupportsArray(getter_AddRefs(mManualFindWindows));
3012 NS_ENSURE_SUCCESS(rv, rv);
3013 @@ -196,7 +196,7 @@
3014 }
3015
3016 // ----------- Listen to prefs ------------------
3017 - rv = prefInternal->AddObserver("accessibility.typeaheadfind", this, PR_FALSE);
3018 + rv = prefInternal->AddObserver("accessibility.typeaheadfindsea", this, PR_FALSE);
3019 NS_ENSURE_SUCCESS(rv, rv);
3020
3021 rv = prefInternal->AddObserver("accessibility.browsewithcaret", this, PR_FALSE);
3022 @@ -217,11 +217,11 @@
3023 return rv;
3024 }
3025
3026 -nsTypeAheadFind *
3027 -nsTypeAheadFind::GetInstance()
3028 +nsTypeAheadFindSea *
3029 +nsTypeAheadFindSea::GetInstance()
3030 {
3031 if (!sInstance) {
3032 - sInstance = new nsTypeAheadFind();
3033 + sInstance = new nsTypeAheadFindSea();
3034 if (!sInstance)
3035 return nsnull;
3036
3037 @@ -241,14 +241,14 @@
3038
3039
3040 void
3041 -nsTypeAheadFind::ReleaseInstance()
3042 +nsTypeAheadFindSea::ReleaseInstance()
3043 {
3044 NS_IF_RELEASE(sInstance);
3045 }
3046
3047
3048 void
3049 -nsTypeAheadFind::Shutdown()
3050 +nsTypeAheadFindSea::Shutdown()
3051 {
3052 // Application shutdown
3053 mTimer = nsnull;
3054 @@ -264,14 +264,14 @@
3055 // ------- Pref Callbacks (2) ---------------
3056
3057 nsresult
3058 -nsTypeAheadFind::PrefsReset()
3059 +nsTypeAheadFindSea::PrefsReset()
3060 {
3061 nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
3062 NS_ENSURE_TRUE(prefBranch, NS_ERROR_FAILURE);
3063
3064 PRBool wasTypeAheadOn = mIsTypeAheadOn;
3065
3066 - prefBranch->GetBoolPref("accessibility.typeaheadfind", &mIsTypeAheadOn);
3067 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea", &mIsTypeAheadOn);
3068
3069 if (mIsTypeAheadOn != wasTypeAheadOn) {
3070 if (!mIsTypeAheadOn) {
3071 @@ -291,7 +291,7 @@
3072 do_GetService(kStringBundleServiceCID);
3073
3074 if (stringBundleService)
3075 - stringBundleService->CreateBundle(TYPEAHEADFIND_BUNDLE_URL,
3076 + stringBundleService->CreateBundle(TYPEAHEADFINDSEA_BUNDLE_URL,
3077 getter_AddRefs(mStringBundle));
3078
3079 // Observe find again commands. We'll handle them if we were the last find
3080 @@ -306,34 +306,34 @@
3081 }
3082
3083 PRBool oldAutoStartPref = mAutoStartPref;
3084 - prefBranch->GetBoolPref("accessibility.typeaheadfind.autostart",
3085 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.autostart",
3086 &mAutoStartPref);
3087 if (mAutoStartPref != oldAutoStartPref) {
3088 ResetGlobalAutoStart(mAutoStartPref);
3089 }
3090
3091 - prefBranch->GetBoolPref("accessibility.typeaheadfind.linksonly",
3092 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.linksonly",
3093 &mLinksOnlyPref);
3094
3095 - prefBranch->GetBoolPref("accessibility.typeaheadfind.startlinksonly",
3096 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.startlinksonly",
3097 &mStartLinksOnlyPref);
3098
3099 PRBool isSoundEnabled = PR_TRUE;
3100 - prefBranch->GetBoolPref("accessibility.typeaheadfind.enablesound",
3101 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.enablesound",
3102 &isSoundEnabled);
3103 nsXPIDLCString soundStr;
3104 if (isSoundEnabled) {
3105 - prefBranch->GetCharPref("accessibility.typeaheadfind.soundURL",
3106 + prefBranch->GetCharPref("accessibility.typeaheadfindsea.soundURL",
3107 getter_Copies(soundStr));
3108 }
3109 mNotFoundSoundURL = soundStr;
3110
3111 PRBool isTimeoutEnabled = PR_FALSE;
3112 - prefBranch->GetBoolPref("accessibility.typeaheadfind.enabletimeout",
3113 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.enabletimeout",
3114 &isTimeoutEnabled);
3115 PRInt32 timeoutLength = 0;
3116 if (isTimeoutEnabled) {
3117 - prefBranch->GetIntPref("accessibility.typeaheadfind.timeout",
3118 + prefBranch->GetIntPref("accessibility.typeaheadfindsea.timeout",
3119 &timeoutLength);
3120 }
3121 mTimeoutLength = timeoutLength;
3122 @@ -349,7 +349,7 @@
3123 // ------- nsITimer Methods (1) ---------------
3124
3125 NS_IMETHODIMP
3126 -nsTypeAheadFind::Notify(nsITimer *timer)
3127 +nsTypeAheadFindSea::Notify(nsITimer *timer)
3128 {
3129 CancelFind();
3130 return NS_OK;
3131 @@ -358,7 +358,7 @@
3132 // ----------- nsIObserver Methods (1) -------------------
3133
3134 NS_IMETHODIMP
3135 -nsTypeAheadFind::Observe(nsISupports *aSubject, const char *aTopic,
3136 +nsTypeAheadFindSea::Observe(nsISupports *aSubject, const char *aTopic,
3137 const PRUnichar *aData)
3138 {
3139 PRBool isOpening;
3140 @@ -476,7 +476,7 @@
3141
3142
3143 nsresult
3144 -nsTypeAheadFind::UseInWindow(nsIDOMWindow *aDOMWin)
3145 +nsTypeAheadFindSea::UseInWindow(nsIDOMWindow *aDOMWin)
3146 {
3147 NS_ENSURE_ARG_POINTER(aDOMWin);
3148
3149 @@ -529,7 +529,7 @@
3150 // ------- nsIDOMEventListener Methods (1) ---------------
3151
3152 NS_IMETHODIMP
3153 -nsTypeAheadFind::HandleEvent(nsIDOMEvent* aEvent)
3154 +nsTypeAheadFindSea::HandleEvent(nsIDOMEvent* aEvent)
3155 {
3156 nsAutoString eventType;
3157 aEvent->GetType(eventType);
3158 @@ -589,21 +589,21 @@
3159 // ------- nsIDOMKeyListener Methods (3) ---------------
3160
3161 NS_IMETHODIMP
3162 -nsTypeAheadFind::KeyDown(nsIDOMEvent* aEvent)
3163 +nsTypeAheadFindSea::KeyDown(nsIDOMEvent* aEvent)
3164 {
3165 return NS_OK;
3166 }
3167
3168
3169 NS_IMETHODIMP
3170 -nsTypeAheadFind::KeyUp(nsIDOMEvent* aEvent)
3171 +nsTypeAheadFindSea::KeyUp(nsIDOMEvent* aEvent)
3172 {
3173 return NS_OK;
3174 }
3175
3176
3177 NS_IMETHODIMP
3178 -nsTypeAheadFind::KeyPress(nsIDOMEvent* aEvent)
3179 +nsTypeAheadFindSea::KeyPress(nsIDOMEvent* aEvent)
3180 {
3181 if (!mIsTypeAheadOn || mIsMenuBarActive || mIsMenuPopupActive) {
3182 return NS_OK;
3183 @@ -733,7 +733,7 @@
3184
3185
3186 NS_IMETHODIMP
3187 -nsTypeAheadFind::BackOneChar(PRBool *aIsBackspaceUsed)
3188 +nsTypeAheadFindSea::BackOneChar(PRBool *aIsBackspaceUsed)
3189 {
3190 if (!mFocusedDocSelection) {
3191 *aIsBackspaceUsed = PR_FALSE;
3192 @@ -863,7 +863,7 @@
3193
3194
3195 nsresult
3196 -nsTypeAheadFind::HandleChar(PRUnichar aChar)
3197 +nsTypeAheadFindSea::HandleChar(PRUnichar aChar)
3198 {
3199 // Add a printable char to mTypeAheadBuffer, then search for buffer contents
3200
3201 @@ -1039,7 +1039,7 @@
3202
3203
3204 void
3205 -nsTypeAheadFind::SaveFind()
3206 +nsTypeAheadFindSea::SaveFind()
3207 {
3208 // Store find string for find-next
3209 mFindNextBuffer = mTypeAheadBuffer;
3210 @@ -1060,14 +1060,14 @@
3211 mFindService->SetSearchString(mFindNextBuffer);
3212 }
3213
3214 - // --- If accessibility.typeaheadfind.timeout is set,
3215 + // --- If accessibility.typeaheadfindsea.timeout is set,
3216 // cancel find after specified # milliseconds ---
3217 StartTimeout();
3218 }
3219
3220
3221 void
3222 -nsTypeAheadFind::PlayNotFoundSound()
3223 +nsTypeAheadFindSea::PlayNotFoundSound()
3224 {
3225 if (mNotFoundSoundURL.IsEmpty()) // no sound
3226 return;
3227 @@ -1097,7 +1097,7 @@
3228
3229
3230 NS_IMETHODIMP
3231 -nsTypeAheadFind::HandleText(nsIDOMEvent* aTextEvent)
3232 +nsTypeAheadFindSea::HandleText(nsIDOMEvent* aTextEvent)
3233 {
3234 // This is called multiple times in the middle of an
3235 // IME composition
3236 @@ -1145,7 +1145,7 @@
3237
3238
3239 NS_IMETHODIMP
3240 -nsTypeAheadFind::HandleStartComposition(nsIDOMEvent* aCompositionEvent)
3241 +nsTypeAheadFindSea::HandleStartComposition(nsIDOMEvent* aCompositionEvent)
3242 {
3243 // This is called once at the start of an IME composition
3244
3245 @@ -1167,7 +1167,7 @@
3246
3247
3248 NS_IMETHODIMP
3249 -nsTypeAheadFind::HandleEndComposition(nsIDOMEvent* aCompositionEvent)
3250 +nsTypeAheadFindSea::HandleEndComposition(nsIDOMEvent* aCompositionEvent)
3251 {
3252 // This is called once at the end of an IME composition
3253
3254 @@ -1198,28 +1198,28 @@
3255
3256
3257 NS_IMETHODIMP
3258 -nsTypeAheadFind::HandleQueryComposition(nsIDOMEvent* aCompositionEvent)
3259 +nsTypeAheadFindSea::HandleQueryComposition(nsIDOMEvent* aCompositionEvent)
3260 {
3261 return NS_OK;
3262 }
3263
3264
3265 NS_IMETHODIMP
3266 -nsTypeAheadFind::HandleQueryReconversion(nsIDOMEvent* aCompositionEvent)
3267 +nsTypeAheadFindSea::HandleQueryReconversion(nsIDOMEvent* aCompositionEvent)
3268 {
3269 return NS_OK;
3270 }
3271
3272
3273 NS_IMETHODIMP
3274 -nsTypeAheadFind::HandleQueryCaretRect(nsIDOMEvent* aCompositionEvent)
3275 +nsTypeAheadFindSea::HandleQueryCaretRect(nsIDOMEvent* aCompositionEvent)
3276 {
3277 return NS_OK;
3278 }
3279
3280
3281 nsresult
3282 -nsTypeAheadFind::FindItNow(nsIPresShell *aPresShell,
3283 +nsTypeAheadFindSea::FindItNow(nsIPresShell *aPresShell,
3284 PRBool aIsRepeatingSameChar, PRBool aIsLinksOnly,
3285 PRBool aIsFirstVisiblePreferred)
3286 {
3287 @@ -1241,7 +1241,7 @@
3288
3289 nsCOMPtr<nsISupports> startingContainer = presContext->GetContainer();
3290 nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(startingContainer));
3291 - NS_ASSERTION(treeItem, "Bug 175321 Crashes with Type Ahead Find [@ nsTypeAheadFind::FindItNow]");
3292 + NS_ASSERTION(treeItem, "Bug 175321 Crashes with Type Ahead Find [@ nsTypeAheadFindSea::FindItNow]");
3293 if (!treeItem) {
3294 return NS_ERROR_FAILURE;
3295 }
3296 @@ -1465,7 +1465,7 @@
3297
3298
3299 nsresult
3300 -nsTypeAheadFind::GetSearchContainers(nsISupports *aContainer,
3301 +nsTypeAheadFindSea::GetSearchContainers(nsISupports *aContainer,
3302 PRBool aIsRepeatingSameChar,
3303 PRBool aIsFirstVisiblePreferred,
3304 PRBool aCanUseDocSelection,
3305 @@ -1573,7 +1573,7 @@
3306
3307
3308 void
3309 -nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
3310 +nsTypeAheadFindSea::RangeStartsInsideLink(nsIDOMRange *aRange,
3311 nsIPresShell *aPresShell,
3312 PRBool *aIsInsideLink,
3313 PRBool *aIsStartingLink)
3314 @@ -1680,7 +1680,7 @@
3315
3316
3317 NS_IMETHODIMP
3318 -nsTypeAheadFind::ScrollPositionWillChange(nsIScrollableView *aView,
3319 +nsTypeAheadFindSea::ScrollPositionWillChange(nsIScrollableView *aView,
3320 nscoord aX, nscoord aY)
3321 {
3322 return NS_OK;
3323 @@ -1688,7 +1688,7 @@
3324
3325
3326 NS_IMETHODIMP
3327 -nsTypeAheadFind::ScrollPositionDidChange(nsIScrollableView *aScrollableView,
3328 +nsTypeAheadFindSea::ScrollPositionDidChange(nsIScrollableView *aScrollableView,
3329 nscoord aX, nscoord aY)
3330 {
3331 if (!mIsFindingText)
3332 @@ -1699,7 +1699,7 @@
3333
3334
3335 NS_IMETHODIMP
3336 -nsTypeAheadFind::NotifySelectionChanged(nsIDOMDocument *aDoc,
3337 +nsTypeAheadFindSea::NotifySelectionChanged(nsIDOMDocument *aDoc,
3338 nsISelection *aSel, PRInt16 aReason)
3339 {
3340 if (!mIsFindingText) {
3341 @@ -1716,10 +1716,10 @@
3342 }
3343
3344
3345 -// ---------------- nsITypeAheadFind --------------------
3346 +// ---------------- nsITypeAheadFindSea --------------------
3347
3348 NS_IMETHODIMP
3349 -nsTypeAheadFind::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aCallerWindowSupports)
3350 +nsTypeAheadFindSea::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aCallerWindowSupports)
3351 {
3352 NS_ENSURE_TRUE(aCallerWindowSupports, NS_ERROR_FAILURE);
3353
3354 @@ -1731,7 +1731,7 @@
3355 return NS_OK;
3356 }
3357
3358 - // Compare the top level content pres shell of typeaheadfind
3359 + // Compare the top level content pres shell of typeaheadfindsea
3360 // with the top level content pres shell window where find next is happening
3361 // If they're different, exit so that webbrowswerfind can handle FindNext()
3362
3363 @@ -1764,7 +1764,7 @@
3364 NS_ENSURE_TRUE(callerPresShell, NS_OK);
3365
3366 if (callerPresShell != typeAheadPresShell) {
3367 - // This means typeaheadfind is active in a different window or doc
3368 + // This means typeaheadfindsea is active in a different window or doc
3369 // So it's not appropriate to find next for the current window
3370 mFindNextBuffer.Truncate();
3371 return NS_OK;
3372 @@ -1782,7 +1782,7 @@
3373 webBrowserFind->GetSearchString(getter_Copies(webBrowserFindString));
3374 if (!webBrowserFindString.Equals(mFindNextBuffer)) {
3375 // If they're not equal, then the find dialog was used last,
3376 - // not typeaheadfind. Typeaheadfind applies to the last find,
3377 + // not typeaheadfindsea. Typeaheadfind applies to the last find,
3378 // so we should let nsIWebBrowserFind::FindNext() do it.
3379 mFindNextBuffer.Truncate();
3380 return NS_OK;
3381 @@ -1832,7 +1832,7 @@
3382
3383
3384 NS_IMETHODIMP
3385 -nsTypeAheadFind::GetIsActive(PRBool *aIsActive)
3386 +nsTypeAheadFindSea::GetIsActive(PRBool *aIsActive)
3387 {
3388 *aIsActive = mLinksOnlyManuallySet || !mTypeAheadBuffer.IsEmpty();
3389
3390 @@ -1845,7 +1845,7 @@
3391 */
3392
3393 NS_IMETHODIMP
3394 -nsTypeAheadFind::StartNewFind(nsIDOMWindow *aWindow, PRBool aLinksOnly)
3395 +nsTypeAheadFindSea::StartNewFind(nsIDOMWindow *aWindow, PRBool aLinksOnly)
3396 {
3397 if (!mFind || !mIsTypeAheadOn || !aWindow)
3398 return NS_ERROR_FAILURE; // Type Ahead Find not correctly initialized
3399 @@ -1878,7 +1878,7 @@
3400 }
3401
3402 void
3403 -nsTypeAheadFind::ResetGlobalAutoStart(PRBool aAutoStart)
3404 +nsTypeAheadFindSea::ResetGlobalAutoStart(PRBool aAutoStart)
3405 {
3406 // Enumerate through the current top level windows
3407 // and either attach or remove window listeners
3408 @@ -1916,7 +1916,7 @@
3409
3410
3411 NS_IMETHODIMP
3412 -nsTypeAheadFind::SetAutoStart(nsIDOMWindow *aDOMWin, PRBool aAutoStartOn)
3413 +nsTypeAheadFindSea::SetAutoStart(nsIDOMWindow *aDOMWin, PRBool aAutoStartOn)
3414 {
3415 if (!aDOMWin) {
3416 return NS_ERROR_FAILURE;
3417 @@ -1946,7 +1946,7 @@
3418
3419
3420 NS_IMETHODIMP
3421 -nsTypeAheadFind::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn)
3422 +nsTypeAheadFindSea::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn)
3423 {
3424 *aIsAutoStartOn = PR_FALSE;
3425
3426 @@ -2014,7 +2014,7 @@
3427
3428
3429 NS_IMETHODIMP
3430 -nsTypeAheadFind::CancelFind()
3431 +nsTypeAheadFindSea::CancelFind()
3432 {
3433 // Stop current find if:
3434 // 1. Escape pressed
3435 @@ -2070,7 +2070,7 @@
3436 // ------- Helper Methods ---------------
3437
3438 void
3439 -nsTypeAheadFind::GetTopContentPresShell(nsIDocShellTreeItem *aDocShellTreeItem,
3440 +nsTypeAheadFindSea::GetTopContentPresShell(nsIDocShellTreeItem *aDocShellTreeItem,
3441 nsIPresShell **aPresShell)
3442 {
3443 *aPresShell = nsnull;
3444 @@ -2086,7 +2086,7 @@
3445 }
3446
3447 void
3448 -nsTypeAheadFind::GetStartWindow(nsIDOMWindow *aWindow, nsIDOMWindow **aStartWindow)
3449 +nsTypeAheadFindSea::GetStartWindow(nsIDOMWindow *aWindow, nsIDOMWindow **aStartWindow)
3450 {
3451 // Return the root ancestor content window of aWindow
3452
3453 @@ -2118,7 +2118,7 @@
3454 }
3455
3456 nsresult
3457 -nsTypeAheadFind::GetWebBrowserFind(nsIDOMWindow *aWin,
3458 +nsTypeAheadFindSea::GetWebBrowserFind(nsIDOMWindow *aWin,
3459 nsIWebBrowserFind **aWebBrowserFind)
3460 {
3461 NS_ENSURE_ARG_POINTER(aWin);
3462 @@ -2143,7 +2143,7 @@
3463
3464
3465 void
3466 -nsTypeAheadFind::StartTimeout()
3467 +nsTypeAheadFindSea::StartTimeout()
3468 {
3469 if (mTimeoutLength) {
3470 if (!mTimer) {
3471 @@ -2159,7 +2159,7 @@
3472 }
3473
3474 void
3475 -nsTypeAheadFind::SetSelectionLook(nsIPresShell *aPresShell,
3476 +nsTypeAheadFindSea::SetSelectionLook(nsIPresShell *aPresShell,
3477 PRBool aChangeColor,
3478 PRBool aEnabled)
3479 {
3480 @@ -2167,8 +2167,8 @@
3481 return;
3482
3483 // Show caret when type ahead find is on
3484 - // Also paint selection bright (typeaheadfind on) or normal
3485 - // (typeaheadfind off)
3486 + // Also paint selection bright (typeaheadfindsea on) or normal
3487 + // (typeaheadfindsea off)
3488
3489 if (aChangeColor) {
3490 mFocusedDocSelCon->SetDisplaySelection(nsISelectionController::SELECTION_ATTENTION);
3491 @@ -2211,7 +2211,7 @@
3492
3493
3494 void
3495 -nsTypeAheadFind::RemoveDocListeners()
3496 +nsTypeAheadFindSea::RemoveDocListeners()
3497 {
3498 nsCOMPtr<nsIPresShell> presShell(GetPresShell());
3499 nsIViewManager* vm = nsnull;
3500 @@ -2245,7 +2245,7 @@
3501
3502
3503 void
3504 -nsTypeAheadFind::AttachDocListeners(nsIPresShell *aPresShell)
3505 +nsTypeAheadFindSea::AttachDocListeners(nsIPresShell *aPresShell)
3506 {
3507 if (!aPresShell) {
3508 return;
3509 @@ -2275,7 +2275,7 @@
3510
3511
3512 void
3513 -nsTypeAheadFind::RemoveWindowListeners(nsIDOMWindow *aDOMWin)
3514 +nsTypeAheadFindSea::RemoveWindowListeners(nsIDOMWindow *aDOMWin)
3515 {
3516 nsCOMPtr<nsIDOMEventTarget> chromeEventHandler;
3517 GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler));
3518 @@ -2332,7 +2332,7 @@
3519
3520
3521 void
3522 -nsTypeAheadFind::AttachWindowListeners(nsIDOMWindow *aDOMWin)
3523 +nsTypeAheadFindSea::AttachWindowListeners(nsIDOMWindow *aDOMWin)
3524 {
3525 nsCOMPtr<nsIDOMEventTarget> chromeEventHandler;
3526 GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler));
3527 @@ -2385,7 +2385,7 @@
3528
3529
3530 void
3531 -nsTypeAheadFind::GetChromeEventHandler(nsIDOMWindow *aDOMWin,
3532 +nsTypeAheadFindSea::GetChromeEventHandler(nsIDOMWindow *aDOMWin,
3533 nsIDOMEventTarget **aChromeTarget)
3534 {
3535 nsCOMPtr<nsPIDOMWindow> privateDOMWindow(do_QueryInterface(aDOMWin));
3536 @@ -2401,7 +2401,7 @@
3537 }
3538
3539 PRBool
3540 -nsTypeAheadFind::IsTargetContentOkay(nsIContent *aContent)
3541 +nsTypeAheadFindSea::IsTargetContentOkay(nsIContent *aContent)
3542 {
3543 if (!aContent) {
3544 return PR_FALSE;
3545 @@ -2439,7 +2439,7 @@
3546
3547
3548 nsresult
3549 -nsTypeAheadFind::GetTargetIfTypeAheadOkay(nsIDOMEvent *aEvent,
3550 +nsTypeAheadFindSea::GetTargetIfTypeAheadOkay(nsIDOMEvent *aEvent,
3551 nsIContent **aTargetContent,
3552 nsIPresShell **aTargetPresShell)
3553 {
3554 @@ -2522,7 +2522,7 @@
3555
3556
3557 void
3558 -nsTypeAheadFind::GetSelection(nsIPresShell *aPresShell,
3559 +nsTypeAheadFindSea::GetSelection(nsIPresShell *aPresShell,
3560 nsISelectionController **aSelCon,
3561 nsISelection **aDOMSel)
3562 {
3563 @@ -2544,7 +2544,7 @@
3564
3565
3566 PRBool
3567 -nsTypeAheadFind::IsRangeVisible(nsIPresShell *aPresShell,
3568 +nsTypeAheadFindSea::IsRangeVisible(nsIPresShell *aPresShell,
3569 nsPresContext *aPresContext,
3570 nsIDOMRange *aRange, PRBool aMustBeInViewPort,
3571 PRBool aGetTopVisibleLeaf,
3572 @@ -2698,7 +2698,7 @@
3573
3574
3575 nsresult
3576 -nsTypeAheadFind::GetTranslatedString(const nsAString& aKey,
3577 +nsTypeAheadFindSea::GetTranslatedString(const nsAString& aKey,
3578 nsAString& aStringOut)
3579 {
3580 nsXPIDLString xsValue;
3581 @@ -2716,7 +2716,7 @@
3582
3583
3584 void
3585 -nsTypeAheadFind::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent,
3586 +nsTypeAheadFindSea::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent,
3587 PRBool aClearStatus, const PRUnichar *aText)
3588 {
3589 // pres shell -> pres context -> container -> tree item ->
3590 @@ -2863,7 +2863,7 @@
3591 // Make sure we're not focused on a text field, listbox
3592 // or other form control that needs typeahead keystrokes
3593 if (focusedContent) {
3594 - *aResult = nsTypeAheadFind::IsTargetContentOkay(focusedContent);
3595 + *aResult = nsTypeAheadFindSea::IsTargetContentOkay(focusedContent);
3596 return NS_OK;
3597 }
3598
3599 @@ -2928,8 +2928,8 @@
3600 EnsureContentWindow(domWinInternal, getter_AddRefs(startContentWin));
3601 NS_ENSURE_TRUE(startContentWin, NS_ERROR_FAILURE);
3602
3603 - nsCOMPtr<nsITypeAheadFind> typeAhead =
3604 - do_GetService(NS_TYPEAHEADFIND_CONTRACTID);
3605 + nsCOMPtr<nsITypeAheadFindSea> typeAhead =
3606 + do_GetService(NS_TYPEAHEADFINDSEA_CONTRACTID);
3607 NS_ENSURE_TRUE(typeAhead, NS_ERROR_FAILURE);
3608
3609 return typeAhead->StartNewFind(startContentWin, isLinkSearch);
3610 @@ -3013,7 +3013,7 @@
3611 }
3612
3613 already_AddRefed<nsIPresShell>
3614 -nsTypeAheadFind::GetPresShell()
3615 +nsTypeAheadFindSea::GetPresShell()
3616 {
3617 if (!mFocusedWeakShell)
3618 return nsnull;
3619 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.h mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.h
3620 --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.h 2005-03-26 00:12:02.000000000 -0500
3621 +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.h 2005-03-26 11:39:29.000000000 -0500
3622 @@ -62,13 +62,13 @@
3623 #include "nsIDOMRange.h"
3624 #include "nsIDOMWindow.h"
3625 #include "nsIDocShellTreeItem.h"
3626 -#include "nsITypeAheadFind.h"
3627 +#include "nsITypeAheadFindSea.h"
3628 #include "nsIStringBundle.h"
3629 #include "nsISupportsArray.h"
3630 #include "nsISound.h"
3631
3632 -#define TYPEAHEADFIND_BUNDLE_URL \
3633 - "chrome://global/locale/typeaheadfind.properties"
3634 +#define TYPEAHEADFINDSEA_BUNDLE_URL \
3635 + "chrome://global/locale/typeaheadfindsea.properties"
3636 #define TYPEAHEADFIND_NOTFOUND_WAV_URL \
3637 "chrome://global/content/notfound.wav"
3638
3639 @@ -82,7 +82,7 @@
3640
3641 const int kMaxBadCharsBeforeCancel = 3;
3642
3643 -class nsTypeAheadFind : public nsITypeAheadFind,
3644 +class nsTypeAheadFindSea : public nsITypeAheadFindSea,
3645 public nsIDOMKeyListener,
3646 public nsIDOMTextListener,
3647 public nsIDOMCompositionListener,
3648 @@ -93,13 +93,13 @@
3649 public nsSupportsWeakReference
3650 {
3651 public:
3652 - nsTypeAheadFind();
3653 - virtual ~nsTypeAheadFind();
3654 + nsTypeAheadFindSea();
3655 + virtual ~nsTypeAheadFindSea();
3656
3657 - NS_DEFINE_STATIC_CID_ACCESSOR(NS_TYPEAHEADFIND_CID);
3658 + NS_DEFINE_STATIC_CID_ACCESSOR(NS_TYPEAHEADFINDSEA_CID);
3659
3660 NS_DECL_ISUPPORTS
3661 - NS_DECL_NSITYPEAHEADFIND
3662 + NS_DECL_NSITYPEAHEADFINDSEA
3663 NS_DECL_NSIOBSERVER
3664 NS_DECL_NSIDOMEVENTLISTENER
3665 NS_DECL_NSISELECTIONLISTENER
3666 @@ -127,7 +127,7 @@
3667 // ----- nsITimerCallback -----------------------------
3668 NS_DECL_NSITIMERCALLBACK
3669
3670 - static nsTypeAheadFind *GetInstance();
3671 + static nsTypeAheadFindSea *GetInstance();
3672 static void ReleaseInstance(void);
3673 static PRBool IsTargetContentOkay(nsIContent *aContent);
3674
3675 @@ -185,7 +185,7 @@
3676 nsresult GetTranslatedString(const nsAString& aKey, nsAString& aStringOut);
3677
3678 // Used by GetInstance and ReleaseInstance
3679 - static nsTypeAheadFind *sInstance;
3680 + static nsTypeAheadFindSea *sInstance;
3681
3682 // Current find state
3683 nsString mTypeAheadBuffer;
3684 @@ -196,7 +196,7 @@
3685
3686 // PRBool's are used instead of PRPackedBool's where the address of the
3687 // boolean variable is getting passed into a method. For example:
3688 - // GetBoolPref("accessibility.typeaheadfind.linksonly", &mLinksOnlyPref);
3689 + // GetBoolPref("accessibility.typeaheadfindsea.linksonly", &mLinksOnlyPref);
3690 PRBool mIsFindAllowedInWindow;
3691 PRBool mAutoStartPref;
3692 PRBool mLinksOnlyPref;
3693 @@ -251,7 +251,7 @@
3694 nsCOMPtr<nsIDOMWindow> mFocusedWindow;
3695 nsCOMPtr<nsIWeakReference> mFocusedWeakShell;
3696
3697 - // Windows where typeaheadfind doesn't auto start as the user types
3698 + // Windows where typeaheadfindsea doesn't auto start as the user types
3699 nsCOMPtr<nsISupportsArray> mManualFindWindows;
3700 };
3701
3702 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp mozilla/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp
3703 --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp 2005-03-26 00:12:02.000000000 -0500
3704 +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp 2005-03-26 11:39:40.000000000 -0500
3705 @@ -55,7 +55,7 @@
3706
3707 // This function is called at component registration time
3708 static NS_METHOD
3709 -nsTypeAheadFindRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath,
3710 +nsTypeAheadFindSeaRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath,
3711 const char *registryLocation,
3712 const char *componentType,
3713 const nsModuleComponentInfo *info)
3714 @@ -64,7 +64,7 @@
3715 // an application component. This makes sure that we're
3716 // initialized on application startup.
3717
3718 - // Register nsTypeAheadFind to be instantiated on startup.
3719 + // Register nsTypeAheadFindSea to be instantiated on startup.
3720 // XXX This is needed on linux, but for some reason not needed on win32.
3721 nsresult rv;
3722 nsCOMPtr<nsICategoryManager> categoryManager =
3723 @@ -74,7 +74,7 @@
3724 rv = categoryManager->AddCategoryEntry(APPSTARTUP_CATEGORY,
3725 - "Type Ahead Find",
3726 + "Type Ahead Find Sea",
3727 "service,"
3728 - NS_TYPEAHEADFIND_CONTRACTID,
3729 + NS_TYPEAHEADFINDSEA_CONTRACTID,
3730 PR_TRUE, PR_TRUE, nsnull);
3731 }
3732
3733 @@ -82,22 +82,22 @@
3734 }
3735
3736
3737 -NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsTypeAheadFind,
3738 - nsTypeAheadFind::GetInstance)
3739 +NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsTypeAheadFindSea,
3740 + nsTypeAheadFindSea::GetInstance)
3741
3742 static void PR_CALLBACK
3743 -TypeAheadFindModuleDtor(nsIModule* self)
3744 +TypeAheadFindSeaModuleDtor(nsIModule* self)
3745 {
3746 - nsTypeAheadFind::ReleaseInstance();
3747 + nsTypeAheadFindSea::ReleaseInstance();
3748 }
3749
3750 static const nsModuleComponentInfo components[] =
3751 {
3752 - { "TypeAheadFind Component", NS_TYPEAHEADFIND_CID,
3753 - NS_TYPEAHEADFIND_CONTRACTID, nsTypeAheadFindConstructor,
3754 - nsTypeAheadFindRegistrationProc, nsnull // Unregistration proc
3755 + { "TypeAheadFindSea Component", NS_TYPEAHEADFINDSEA_CID,
3756 + NS_TYPEAHEADFINDSEA_CONTRACTID, nsTypeAheadFindSeaConstructor,
3757 + nsTypeAheadFindSeaRegistrationProc, nsnull // Unregistration proc
3758 }
3759 };
3760
3761 -NS_IMPL_NSGETMODULE_WITH_DTOR(nsTypeAheadFind, components,
3762 - TypeAheadFindModuleDtor)
3763 +NS_IMPL_NSGETMODULE_WITH_DTOR(nsTypeAheadFindSea, components,
3764 + TypeAheadFindSeaModuleDtor)
3765 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/typeaheadfind.pkg mozilla/extensions/typeaheadfind/src/typeaheadfind.pkg
3766 --- mozilla.orig/extensions/typeaheadfind/src/typeaheadfind.pkg 2005-03-26 00:12:02.000000000 -0500
3767 +++ mozilla/extensions/typeaheadfind/src/typeaheadfind.pkg 1969-12-31 19:00:00.000000000 -0500
3768 @@ -1,9 +0,0 @@
3769 -# why not ship this with GRE/embedding, if we're building it?
3770 -
3771 -[xpfe-browser browser]
3772 -#if SHARED_LIBRARY
3773 -dist/bin/components/@SHARED_LIBRARY@
3774 -#else
3775 -!staticcomp @LIBRARY@ @MODULE_NAME@
3776 -#endif
3777 -!xpt dist/bin/components/typeaheadfind.xpt
3778 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/typeaheadfindsea.pkg mozilla/extensions/typeaheadfind/src/typeaheadfindsea.pkg
3779 --- mozilla.orig/extensions/typeaheadfind/src/typeaheadfindsea.pkg 1969-12-31 19:00:00.000000000 -0500
3780 +++ mozilla/extensions/typeaheadfind/src/typeaheadfindsea.pkg 2005-03-26 11:39:29.000000000 -0500
3781 @@ -0,0 +1,9 @@
3782 +# why not ship this with GRE/embedding, if we're building it?
3783 +
3784 +[xpfe-browser browser]
3785 +#if SHARED_LIBRARY
3786 +dist/bin/components/@SHARED_LIBRARY@
3787 +#else
3788 +!staticcomp @LIBRARY@ @MODULE_NAME@
3789 +#endif
3790 +!xpt dist/bin/components/typeaheadfindsea.xpt
3791
3792
3793
3794 1.1 src/patchsets/mozilla-firefox/2.0.0.17/063_firefox-rpath-3.patch
3795
3796 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/063_firefox-rpath-3.patch?rev=1.1&view=markup
3797 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/063_firefox-rpath-3.patch?rev=1.1&content-type=text/plain
3798
3799 Index: 063_firefox-rpath-3.patch
3800 ===================================================================
3801 # Gentoo http://bugs.gentoo.org/show_bug.cgi?id=100597
3802
3803 --- mozilla/config/rules.mk.orig 2006-07-07 06:13:36.000000000 +0200
3804 +++ mozilla/config/rules.mk 2006-07-19 13:22:04.000000000 +0200
3805 @@ -510,7 +510,12 @@
3806 #
3807 ifeq ($(OS_ARCH),Linux)
3808 ifdef IS_COMPONENT
3809 +DSO_LDOPTS += -Wl,-rpath,'$$ORIGIN:$$ORIGIN/..'
3810 +OS_LDFLAGS += -Wl,-rpath,'$$ORIGIN:$$ORIGIN/..'
3811 EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
3812 +else
3813 +DSO_LDOPTS += -Wl,-rpath,'$$ORIGIN'
3814 +OS_LDFLAGS += -Wl,-rpath,'$$ORIGIN'
3815 endif
3816 endif
3817
3818
3819
3820
3821 1.1 src/patchsets/mozilla-firefox/2.0.0.17/064_firefox-nsplugins-v2.patch
3822
3823 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/064_firefox-nsplugins-v2.patch?rev=1.1&view=markup
3824 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/064_firefox-nsplugins-v2.patch?rev=1.1&content-type=text/plain
3825
3826 Index: 064_firefox-nsplugins-v2.patch
3827 ===================================================================
3828 # Gentoo's Add a search path for plugins. by agriffis
3829
3830 --- mozilla/xpcom/io/nsAppFileLocationProvider.cpp.orig 2006-07-16 22:38:44.000000000 +0200
3831 +++ mozilla/xpcom/io/nsAppFileLocationProvider.cpp 2006-07-16 22:39:41.000000000 +0200
3832 @@ -215,6 +215,14 @@
3833 if (NS_SUCCEEDED(rv))
3834 rv = localFile->AppendRelativeNativePath(PLUGINS_DIR_NAME);
3835 }
3836 + else if (nsCRT::strcmp(prop, GENTOO_NSPLUGINS_DIR) == 0)
3837 + {
3838 + rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSPLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
3839 + }
3840 + else if (nsCRT::strcmp(prop, GENTOO_NSBROWSER_PLUGINS_DIR) == 0)
3841 + {
3842 + rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSBROWSER_PLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
3843 + }
3844 #if defined(XP_MAC) || defined(XP_MACOSX)
3845 else if (nsCRT::strcmp(prop, NS_MACOSX_USER_PLUGIN_DIR) == 0)
3846 {
3847 @@ -617,7 +625,7 @@
3848
3849 *_retval = new nsAppDirectoryEnumerator(this, keys);
3850 #else
3851 - static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
3852 + static const char* keys[] = { nsnull, GENTOO_NSPLUGINS_DIR, GENTOO_NSBROWSER_PLUGINS_DIR, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
3853 if (!keys[0] && !(keys[0] = PR_GetEnv("MOZ_PLUGIN_PATH"))) {
3854 static const char nullstr = 0;
3855 keys[0] = &nullstr;
3856
3857
3858
3859 1.1 src/patchsets/mozilla-firefox/2.0.0.17/090_xul-gcc4.3.patch
3860
3861 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/090_xul-gcc4.3.patch?rev=1.1&view=markup
3862 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/090_xul-gcc4.3.patch?rev=1.1&content-type=text/plain
3863
3864 Index: 090_xul-gcc4.3.patch
3865 ===================================================================
3866 http://lists.opensuse.org/opensuse-commit/2007-11/msg00823.html
3867
3868 diff -Naur mozilla-orig/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.h mozilla/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.h
3869 --- mozilla-orig/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.h 2006-05-20 11:20:48.000000000 -0600
3870 +++ mozilla/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.h 2008-01-06 22:13:39.000000000 -0600
3871 @@ -39,8 +39,10 @@
3872 #include "imgIEncoder.h"
3873 #ifdef MOZILLA_1_8_BRANCH
3874 #define imgIEncoder imgIEncoder_MOZILLA_1_8_BRANCH
3875 +#ifndef NS_DECL_IMGIENCODER
3876 #define NS_DECL_IMGIENCODER NS_DECL_IMGIENCODER_MOZILLA_1_8_BRANCH
3877 #endif
3878 +#endif
3879
3880 // needed for JPEG library
3881 #include <stdio.h>
3882 @@ -69,6 +71,14 @@
3883
3884 nsJPEGEncoder();
3885
3886 + NS_IMETHOD InitFromData(const PRUint8* aData,
3887 + PRUint32 aLength, // (unused, req'd by JS)
3888 + PRUint32 aWidth,
3889 + PRUint32 aHeight,
3890 + PRUint32 aStride,
3891 + PRUint32 aInputFormat,
3892 + const nsAString& aOutputOptions);
3893 +
3894 private:
3895 ~nsJPEGEncoder();
3896
3897 diff -Naur mozilla-orig/modules/libpr0n/encoders/png/nsPNGEncoder.h mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.h
3898 --- mozilla-orig/modules/libpr0n/encoders/png/nsPNGEncoder.h 2006-05-20 11:20:49.000000000 -0600
3899 +++ mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.h 2008-01-06 22:11:36.000000000 -0600
3900 @@ -38,8 +38,10 @@
3901 #include "imgIEncoder.h"
3902 #ifdef MOZILLA_1_8_BRANCH
3903 #define imgIEncoder imgIEncoder_MOZILLA_1_8_BRANCH
3904 +#ifndef NS_DECL_IMGIENCODER
3905 #define NS_DECL_IMGIENCODER NS_DECL_IMGIENCODER_MOZILLA_1_8_BRANCH
3906 #endif
3907 +#endif
3908
3909 #include <png.h>
3910
3911 @@ -63,6 +65,14 @@
3912
3913 nsPNGEncoder();
3914
3915 + NS_IMETHOD InitFromData(const PRUint8* aData,
3916 + PRUint32 aLength, // (unused, req'd by JS)
3917 + PRUint32 aWidth,
3918 + PRUint32 aHeight,
3919 + PRUint32 aStride,
3920 + PRUint32 aInputFormat,
3921 + const nsAString& aOutputOptions);
3922 +
3923 private:
3924 ~nsPNGEncoder();
3925
3926 diff -Naur mozilla-orig/modules/libpr0n/public/imgIEncoder.idl mozilla/modules/libpr0n/public/imgIEncoder.idl
3927 --- mozilla-orig/modules/libpr0n/public/imgIEncoder.idl 2006-05-20 11:20:49.000000000 -0600
3928 +++ mozilla/modules/libpr0n/public/imgIEncoder.idl 2008-01-06 22:15:40.000000000 -0600
3929 @@ -96,6 +96,6 @@
3930 [scriptable, uuid(CCC5B3AD-3E67-4e3d-97E1-B06B2E96FEF8)]
3931 interface imgIEncoder : nsISupports
3932 {
3933 - void encodeClipboardImage(in nsIClipboardImage aClipboardImage, out nsIFile aImageFile);
3934 + /* void encodeClipboardImage(in nsIClipboardImage aClipboardImage, out nsIFile aImageFile); */
3935 };
3936
3937
3938
3939
3940 1.1 src/patchsets/mozilla-firefox/2.0.0.17/401_firefox-1.5-theme-change.patch
3941
3942 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/401_firefox-1.5-theme-change.patch?rev=1.1&view=markup
3943 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/401_firefox-1.5-theme-change.patch?rev=1.1&content-type=text/plain
3944
3945 Index: 401_firefox-1.5-theme-change.patch
3946 ===================================================================
3947 Index: layout/base/nsPresContext.cpp
3948 ===================================================================
3949 RCS file: /cvsroot/mozilla/layout/base/nsPresContext.cpp,v
3950 retrieving revision 3.288.12.2.4.1
3951 diff -d -u -p -r3.288.12.2.4.1 nsPresContext.cpp
3952 --- layout/base/nsPresContext.cpp 21 Apr 2006 23:30:50 -0000 3.288.12.2.4.1
3953 +++ layout/base/nsPresContext.cpp 26 Sep 2006 19:26:40 -0000
3954 @@ -73,6 +73,9 @@
3955 #include "nsIDOMDocument.h"
3956 #include "nsAutoPtr.h"
3957 #include "nsEventStateManager.h"
3958 +#include "nsIEventQueue.h"
3959 +#include "nsIEventQueueService.h"
3960 +
3961 #ifdef IBMBIDI
3962 #include "nsBidiPresUtils.h"
3963 #endif // IBMBIDI
3964 @@ -267,6 +270,7 @@ nsPresContext::~nsPresContext()
3965 NS_IF_RELEASE(mDeviceContext);
3966 NS_IF_RELEASE(mLookAndFeel);
3967 NS_IF_RELEASE(mLangGroup);
3968 + NS_IF_RELEASE(mEventQueueService);
3969 }
3970
3971 NS_IMPL_ISUPPORTS2(nsPresContext, nsPresContext, nsIObserver)
3972 @@ -285,6 +289,17 @@ static const char* const kGenericFont[]
3973 ".fantasy."
3974 };
3975
3976 +// Set to true when LookAndFeelChanged needs to be called. This is used
3977 +// because the look and feel is a service, so there's no need to notify it from
3978 +// more than one prescontext.
3979 +static PRBool sLookAndFeelChanged;
3980 +
3981 +// Set to true when ThemeChanged needs to be called on mTheme. This is used
3982 +// because mTheme is a service, so there's no need to notify it from more than
3983 +// one prescontext.
3984 +static PRBool sThemeChanged;
3985 +
3986 +
3987 void
3988 nsPresContext::GetFontPreferences()
3989 {
3990 @@ -709,6 +724,9 @@ nsPresContext::Init(nsIDeviceContext* aD
3991 this);
3992 #endif
3993
3994 + rv = CallGetService(NS_EVENTQUEUESERVICE_CONTRACTID, &mEventQueueService);
3995 + NS_ENSURE_SUCCESS(rv, rv);
3996 +
3997 // Initialize our state from the user preferences
3998 GetUserPreferences();
3999
4000 @@ -1180,33 +1198,126 @@ nsPresContext::GetTheme()
4001 void
4002 nsPresContext::ThemeChanged()
4003 {
4004 + if (!mPendingThemeChanged) {
4005 + sLookAndFeelChanged = PR_TRUE;
4006 + sThemeChanged = PR_TRUE;
4007 +
4008 + nsCOMPtr<nsIEventQueue> eventQ;
4009 + mEventQueueService->
4010 + GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
4011 + getter_AddRefs(eventQ));
4012 + if (!eventQ) {
4013 + return;
4014 + }
4015 +
4016 + PLEvent* evt = new PLEvent();
4017 + if (!evt) {
4018 + return;
4019 + }
4020 +
4021 + PL_InitEvent(evt, this, nsPresContext::ThemeChangedInternal,
4022 + nsPresContext::DestroyThemeChangeEvt);
4023 +
4024 + // After this point, event destruction will release |this|
4025 + NS_ADDREF_THIS();
4026 +
4027 + nsresult rv = eventQ->PostEvent(evt);
4028 + if (NS_FAILED(rv)) {
4029 + PL_DestroyEvent(evt);
4030 + } else {
4031 + mPendingThemeChanged = PR_TRUE;
4032 + }
4033 + }
4034 +}
4035 +
4036 +void* PR_CALLBACK
4037 +nsPresContext::ThemeChangedInternal(PLEvent *aEvent)
4038 +{
4039 + nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
4040 +
4041 + pc->mPendingThemeChanged = PR_FALSE;
4042 +
4043 // Tell the theme that it changed, so it can flush any handles to stale theme
4044 // data.
4045 - if (mTheme)
4046 - mTheme->ThemeChanged();
4047 + if (pc->mTheme && sThemeChanged) {
4048 + pc->mTheme->ThemeChanged();
4049 + sThemeChanged = PR_FALSE;
4050 + }
4051
4052 // Clear all cached nsILookAndFeel colors.
4053 - if (mLookAndFeel)
4054 - mLookAndFeel->LookAndFeelChanged();
4055 + if (pc->mLookAndFeel && sLookAndFeelChanged) {
4056 + pc->mLookAndFeel->LookAndFeelChanged();
4057 + sLookAndFeelChanged = PR_FALSE;
4058 + }
4059
4060 // We have to clear style data because the assumption of style rule
4061 // immutability has been violated since any style rule that uses
4062 // system colors or fonts (and probably -moz-appearance as well) has
4063 // changed.
4064 - nsPresContext::ClearStyleDataAndReflow();
4065 + pc->ClearStyleDataAndReflow();
4066 +
4067 + return nsnull;
4068 +}
4069 +
4070 +
4071 +void PR_CALLBACK
4072 +nsPresContext::DestroyThemeChangeEvt(PLEvent* aEvent)
4073 +{
4074 + nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
4075 + NS_RELEASE(pc);
4076 + delete aEvent;
4077 }
4078
4079 void
4080 nsPresContext::SysColorChanged()
4081 {
4082 - if (mLookAndFeel) {
4083 + if (!mPendingSysColorChanged) {
4084 + sLookAndFeelChanged = PR_TRUE;
4085 +
4086 + nsCOMPtr<nsIEventQueue> eventQ;
4087 + mEventQueueService->
4088 + GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
4089 + getter_AddRefs(eventQ));
4090 + if (!eventQ) {
4091 + return;
4092 + }
4093 +
4094 + PLEvent* evt = new PLEvent();
4095 + if (!evt) {
4096 + return;
4097 + }
4098 +
4099 + PL_InitEvent(evt, this, nsPresContext::SysColorChangedInternal,
4100 + nsPresContext::DestroySysColorChangeEvt);
4101 +
4102 + // After this point, event destruction will release |this|
4103 + NS_ADDREF_THIS();
4104 +
4105 + nsresult rv = eventQ->PostEvent(evt);
4106 + if (NS_FAILED(rv)) {
4107 + PL_DestroyEvent(evt);
4108 + } else {
4109 + mPendingSysColorChanged = PR_TRUE;
4110 + }
4111 + }
4112 +}
4113 +
4114 +void* PR_CALLBACK
4115 +nsPresContext::SysColorChangedInternal(PLEvent *aEvent)
4116 +{
4117 + nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
4118 +
4119 + pc->mPendingSysColorChanged = PR_FALSE;
4120 +
4121 + if (pc->mLookAndFeel && sLookAndFeelChanged) {
4122 // Don't use the cached values for the system colors
4123 - mLookAndFeel->LookAndFeelChanged();
4124 + pc->mLookAndFeel->LookAndFeelChanged();
4125 + sLookAndFeelChanged = PR_FALSE;
4126 }
4127 -
4128 +
4129 // Reset default background and foreground colors for the document since
4130 // they may be using system colors
4131 - GetDocumentColorPreferences();
4132 + pc->GetDocumentColorPreferences();
4133
4134 // Clear out all of the style data since it may contain RGB values
4135 // which originated from system colors.
4136 @@ -1222,7 +1333,17 @@ nsPresContext::SysColorChanged()
4137 // data without reflowing/updating views will lead to incorrect change hints
4138 // later, because when generating change hints, any style structs which have
4139 // been cleared and not reread are assumed to not be used at all.
4140 - ClearStyleDataAndReflow();
4141 + pc->ClearStyleDataAndReflow();
4142 +
4143 + return nsnull;
4144 +}
4145 +
4146 +void PR_CALLBACK
4147 +nsPresContext::DestroySysColorChangeEvt(PLEvent* aEvent)
4148 +{
4149 + nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
4150 + NS_RELEASE(pc);
4151 + delete aEvent;
4152 }
4153
4154 void
4155 Index: layout/base/nsPresContext.h
4156 ===================================================================
4157 RCS file: /cvsroot/mozilla/layout/base/nsPresContext.h,v
4158 retrieving revision 3.150.4.2
4159 diff -d -u -p -r3.150.4.2 nsPresContext.h
4160 --- layout/base/nsPresContext.h 29 Aug 2005 16:15:39 -0000 3.150.4.2
4161 +++ layout/base/nsPresContext.h 26 Sep 2006 19:26:40 -0000
4162 @@ -56,6 +56,7 @@
4163 #include "nsCRT.h"
4164 #include "nsIPrintSettings.h"
4165 #include "nsPropertyTable.h"
4166 +#include "plevent.h"
4167 #ifdef IBMBIDI
4168 class nsBidiPresUtils;
4169 #endif // IBMBIDI
4170 @@ -76,6 +77,7 @@ class nsIAtom;
4171 class nsIEventStateManager;
4172 class nsIURI;
4173 class nsILookAndFeel;
4174 +class nsIEventQueueService;
4175 class nsICSSPseudoComparator;
4176 class nsIAtom;
4177 struct nsStyleStruct;
4178 @@ -627,6 +629,14 @@ public:
4179 const nscoord* GetBorderWidthTable() { return mBorderWidthTable; }
4180
4181 protected:
4182 + static NS_HIDDEN_(void*) PR_CALLBACK ThemeChangedInternal(PLEvent* aEvent);
4183 + static NS_HIDDEN_(void*) PR_CALLBACK SysColorChangedInternal(PLEvent* aEvent);
4184 + static NS_HIDDEN_(void) PR_CALLBACK DestroyThemeChangeEvt(PLEvent* aEvent);
4185 + static NS_HIDDEN_(void) PR_CALLBACK DestroySysColorChangeEvt(PLEvent* aEvent);
4186 +
4187 + friend void* PR_CALLBACK ThemeChangedInternal(PLEvent* aEvent);
4188 + friend void* PR_CALLBACK SysColorChangedInternal(PLEvent* aEvent);
4189 +
4190 NS_HIDDEN_(void) SetImgAnimations(nsIContent *aParent, PRUint16 aMode);
4191 NS_HIDDEN_(void) GetDocumentColorPreferences();
4192
4193 @@ -654,6 +664,7 @@ protected:
4194 // from gfx back to layout.
4195 nsIEventStateManager* mEventManager; // [STRONG]
4196 nsILookAndFeel* mLookAndFeel; // [STRONG]
4197 + nsIEventQueueService *mEventQueueService; // [STRONG]
4198 nsIAtom* mMedium; // initialized by subclass ctors;
4199 // weak pointer to static atom
4200
4201 @@ -724,6 +735,8 @@ protected:
4202 unsigned mCanPaginatedScroll : 1;
4203 unsigned mDoScaledTwips : 1;
4204 unsigned mEnableJapaneseTransform : 1;
4205 + unsigned mPendingSysColorChanged : 1;
4206 + unsigned mPendingThemeChanged : 1;
4207 #ifdef IBMBIDI
4208 unsigned mIsVisual : 1;
4209 unsigned mIsBidiSystem : 1;
4210
4211
4212
4213 1.1 src/patchsets/mozilla-firefox/2.0.0.17/402_firefox-2.0-pango-cursor.patch
4214
4215 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/402_firefox-2.0-pango-cursor.patch?rev=1.1&view=markup
4216 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/402_firefox-2.0-pango-cursor.patch?rev=1.1&content-type=text/plain
4217
4218 Index: 402_firefox-2.0-pango-cursor.patch
4219 ===================================================================
4220 # Upstream bug #335810
4221
4222 Index: mozilla/gfx/src/gtk/nsFontMetricsPango.cpp
4223 ===================================================================
4224 RCS file: /cvsroot/mozilla/gfx/src/gtk/nsFontMetricsPango.cpp,v
4225 retrieving revision 1.24
4226 diff -d -u -p -6 -r1.24 nsFontMetricsPango.cpp
4227 --- mozilla/gfx/src/gtk/nsFontMetricsPango.cpp 25 Aug 2006 01:02:34 -0000 1.24
4228 +++ mozilla/gfx/src/gtk/nsFontMetricsPango.cpp 6 Sep 2006 07:01:49 -0000
4229 @@ -948,13 +948,12 @@ nsFontMetricsPango::GetClusterInfo(const
4230 PRInt32
4231 nsFontMetricsPango::GetPosition(const PRUnichar *aText, PRUint32 aLength,
4232 nsPoint aPt)
4233 {
4234 int trailing = 0;
4235 int inx = 0;
4236 - gboolean found = FALSE;
4237 const gchar *curChar;
4238 PRInt32 retval = 0;
4239
4240 float f = mDeviceContext->AppUnitsToDevUnits();
4241
4242 PangoLayout *layout = pango_layout_new(mPangoContext);
4243 @@ -974,28 +973,18 @@ nsFontMetricsPango::GetPosition(const PR
4244 }
4245
4246 // Set up the pango layout
4247 pango_layout_set_text(layout, text, strlen(text));
4248 FixupSpaceWidths(layout, text);
4249
4250 - found = pango_layout_xy_to_index(layout, localX, localY,
4251 - &inx, &trailing);
4252 + pango_layout_xy_to_index(layout, localX, localY,
4253 + &inx, &trailing);
4254
4255 // Convert the index back to the utf-16 index
4256 curChar = text;
4257
4258 - // Jump to the end if it's not found.
4259 - if (!found) {
4260 - if (inx == 0)
4261 - retval = 0;
4262 - else if (trailing)
4263 - retval = aLength;
4264 -
4265 - goto loser;
4266 - }
4267 -
4268 for (PRUint32 curOffset=0; curOffset < aLength;
4269 curOffset++, curChar = g_utf8_find_next_char(curChar, NULL)) {
4270
4271 // Check for a match before checking for a surrogate pair
4272 if (curChar - text == inx) {
4273 retval = curOffset;
4274
4275
4276
4277 1.1 src/patchsets/mozilla-firefox/2.0.0.17/803_fbsd-3.patch
4278
4279 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/803_fbsd-3.patch?rev=1.1&view=markup
4280 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/mozilla-firefox/2.0.0.17/803_fbsd-3.patch?rev=1.1&content-type=text/plain
4281
4282 Index: 803_fbsd-3.patch
4283 ===================================================================
4284 --- a/config/rules.mk 2007-07-03 17:39:53 +0100
4285 +++ b/config/rules.mk 2007-07-03 17:41:50 +0100
4286 @@ -462,6 +462,8 @@
4287 endif
4288
4289 ifeq ($(OS_ARCH),FreeBSD)
4290 +DSO_LDOPTS += -Wl,-rpath,'$(mozappdir)'
4291 +OS_LDFLAGS += -Wl,-rpath,'$(mozappdir)'
4292 EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc
4293 endif