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