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/xulrunner/1.8.1.19: 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_xulrunner-gentoo-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 110_components_no_exec.patch 110_icons.patch 110_no_chrome_list.patch 115_jni.patch 115_pyxpcom_deadcode.patch 120_about:plugins.patch 125_gnome_helpers_with_params.patch 125_xpidl.patch 125_xrender_bug_workaround.patch 130_embedding_tests.patch 130_killAll.patch 131_system_bz2.patch 135_gtkmozembed_change_toplevel.patch 135_pango_null_char.patch 135_zip_cache.patch 160_config_in stall.patch 160_j s_binary.patch 160_pyxpcom.patch 160_xpcomstub.patch 161_javaxpcom.patch 165_mouse_buttons.patch 165_native_uconv.patch 180_libxpcom_hack.patch 180_no_examples.patch 180_no_sys_profile.patch 181_sonames.patch 182_locale.patch 182_prefs.patch 185_installer.patch 185_no_register.patch 185_sidebar.patch 185_useragent.patch 185_xpcomglue.patch 300_firefox-1.5-makeopts.patch 401_firefox-1.5-theme-change.patch 402_firefox-2.0-pango-cursor.patch 501_firefox-2.0-gtk-cursors.patch 502_xulrunner-2.0-window-blur.patch 600_python_dynamic.patch 610_xpcom_sample.patch 801_fbsd-1.patch 802_fbsd-2.patch 803_fbsd-3.patch 811_fbsd7-1.patch
Date: Sun, 25 Jan 2009 18:06:41
Message-Id: E1LR9NB-0000g5-Qm@stork.gentoo.org
1 armin76 09/01/25 18:06:17
2
3 Added: 001_firefox-arm.patch 002_firefox-libdeps.patch
4 003_unaligned.patch 004_mozilla-hppa.patch
5 005_mozilla-firefox-1.5-ia64.patch
6 006_mips-asm.patch
7 007_mozilla-firefox-1.5-asneeded.patch
8 008_xulrunner-gentoo-pkgconfig-1.patch
9 010_visibility-gcc-4.2.patch
10 016_firefox-nss-3.12-asneeded.patch
11 032_firefox-2.0_ppc64-1.patch
12 033_firefox-2.0_ppc_powerpc.patch
13 050_respect-host-variable.patch
14 055_firefox-2.0_gfbsd-pthreads.patch
15 060_embed-typeaheadfind-1.patch
16 063_firefox-rpath-3.patch
17 064_firefox-nsplugins-v2.patch 090_xul-gcc4.3.patch
18 110_components_no_exec.patch 110_icons.patch
19 110_no_chrome_list.patch 115_jni.patch
20 115_pyxpcom_deadcode.patch 120_about:plugins.patch
21 125_gnome_helpers_with_params.patch 125_xpidl.patch
22 125_xrender_bug_workaround.patch
23 130_embedding_tests.patch 130_killAll.patch
24 131_system_bz2.patch
25 135_gtkmozembed_change_toplevel.patch
26 135_pango_null_char.patch 135_zip_cache.patch
27 160_config_install.patch 160_js_binary.patch
28 160_pyxpcom.patch 160_xpcomstub.patch
29 161_javaxpcom.patch 165_mouse_buttons.patch
30 165_native_uconv.patch 180_libxpcom_hack.patch
31 180_no_examples.patch 180_no_sys_profile.patch
32 181_sonames.patch 182_locale.patch 182_prefs.patch
33 185_installer.patch 185_no_register.patch
34 185_sidebar.patch 185_useragent.patch
35 185_xpcomglue.patch 300_firefox-1.5-makeopts.patch
36 401_firefox-1.5-theme-change.patch
37 402_firefox-2.0-pango-cursor.patch
38 501_firefox-2.0-gtk-cursors.patch
39 502_xulrunner-2.0-window-blur.patch
40 600_python_dynamic.patch 610_xpcom_sample.patch
41 801_fbsd-1.patch 802_fbsd-2.patch 803_fbsd-3.patch
42 811_fbsd7-1.patch
43 Log:
44 Add new patchset, with a new patch from aballier to work on fbsd7
45
46 Revision Changes Path
47 1.1 src/patchsets/xulrunner/1.8.1.19/001_firefox-arm.patch
48
49 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/001_firefox-arm.patch?rev=1.1&view=markup
50 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/001_firefox-arm.patch?rev=1.1&content-type=text/plain
51
52 Index: 001_firefox-arm.patch
53 ===================================================================
54 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=336183
55
56 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2006-05-17 02:02:51.000000000 -0400
57 +++ mozilla-16052006/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2006-05-17 01:17:16.000000000 -0400
58 @@ -39,18 +39,31 @@
59 /* Implement shared vtbl methods. */
60
61 #include "xptcprivate.h"
62
63 #if !defined(LINUX) || !defined(__arm__)
64 #error "This code is for Linux ARM only. Please check if it works for you, too.\nDepends strongly on gcc behaviour."
65 #endif
66
67 +#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
68 +/* This tells gcc3.4+ not to optimize away symbols.
69 + * @see http://gcc.gnu.org/gcc-3.4/changes.html
70 + */
71 +#define DONT_DROP_OR_WARN __attribute__((used))
72 +#else
73 +/* This tells older gccs not to warn about unused vairables.
74 + * @see http://docs.freebsd.org/info/gcc/gcc.info.Variable_Attributes.html
75 + */
76 +#define DONT_DROP_OR_WARN __attribute__((unused))
77 +#endif
78 +
79 /* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol. */
80 -static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch");
81 +static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch")
82 +DONT_DROP_OR_WARN;
83
84 static nsresult
85 PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
86 {
87 #define PARAM_BUFFER_COUNT 16
88
89 nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
90 nsXPTCMiniVariant* dispatchParams = NULL;
91
92
93
94 1.1 src/patchsets/xulrunner/1.8.1.19/002_firefox-libdeps.patch
95
96 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/002_firefox-libdeps.patch?rev=1.1&view=markup
97 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/002_firefox-libdeps.patch?rev=1.1&content-type=text/plain
98
99 Index: 002_firefox-libdeps.patch
100 ===================================================================
101 # Linking issue with pango
102 #
103 # https://bugzilla.mozilla.org/show_bug.cgi?id=344821
104
105 --- mozilla/layout/build/Makefile.in.orig 2006-07-16 00:24:51.000000000 +1000
106 +++ mozilla/layout/build/Makefile.in 2006-07-16 00:35:51.000000000 +1000
107 @@ -213,6 +213,12 @@
108 $(NULL)
109 endif
110
111 +ifdef MOZ_ENABLE_CANVAS
112 +ifdef MOZ_ENABLE_XFT
113 +EXTRA_DSO_LDOPTS += $(MOZ_XFT_LIBS)
114 +endif
115 +endif
116 +
117 ifdef NS_TRACE_MALLOC
118 EXTRA_DSO_LIBS += tracemalloc
119 endif
120
121
122
123 1.1 src/patchsets/xulrunner/1.8.1.19/003_unaligned.patch
124
125 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/003_unaligned.patch?rev=1.1&view=markup
126 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/003_unaligned.patch?rev=1.1&content-type=text/plain
127
128 Index: 003_unaligned.patch
129 ===================================================================
130 # Upstream: https://bugzilla.mozilla.org/show_bug.cgi?id=161826
131 # Fix unaligned access
132 diff -ur mozilla.orig/intl/unicharutil/util/nsUnicharUtils.cpp mozilla/intl/unicharutil/util/nsUnicharUtils.cpp
133 --- mozilla.orig/intl/unicharutil/util/nsUnicharUtils.cpp 2007-12-29 12:43:10.000000000 +0000
134 +++ mozilla/intl/unicharutil/util/nsUnicharUtils.cpp 2007-12-29 12:44:08.000000000 +0000
135 @@ -348,3 +348,15 @@
136 return result;
137 }
138
139 +void
140 +SetUnichar(void *ptr, PRUnichar aChar)
141 +{
142 +#if NEED_STRICT_ALIGNMENT
143 + *((char *) ptr) = *((char *) &aChar);
144 + *((char *) ptr + 1) = *((char *) &aChar + 1);
145 +#else
146 + *((PRUnichar *) ptr) = aChar;
147 +#endif
148 +}
149 +
150 +
151 diff -ur mozilla.orig/intl/unicharutil/util/nsUnicharUtils.h mozilla/intl/unicharutil/util/nsUnicharUtils.h
152 --- mozilla.orig/intl/unicharutil/util/nsUnicharUtils.h 2007-12-29 12:43:10.000000000 +0000
153 +++ mozilla/intl/unicharutil/util/nsUnicharUtils.h 2007-12-29 12:44:31.000000000 +0000
154 @@ -82,6 +82,10 @@
155 PRUnichar ToUpperCase(PRUnichar);
156 PRUnichar ToLowerCase(PRUnichar);
157
158 +#define NEED_STRICT_ALIGNMENT defined(__sparc__) || defined(__alpha__) || defined(__mips__)
159 +
160 +void SetUnichar(void *, PRUnichar);
161 +
162 inline PRBool IsUpperCase(PRUnichar c) {
163 return ToLowerCase(c) != c;
164 }
165 diff -ur mozilla.orig/layout/generic/nsTextFrame.cpp mozilla/layout/generic/nsTextFrame.cpp
166 --- mozilla.orig/layout/generic/nsTextFrame.cpp 2007-12-29 12:43:02.000000000 +0000
167 +++ mozilla/layout/generic/nsTextFrame.cpp 2007-12-29 12:46:16.000000000 +0000
168 @@ -5123,18 +5123,27 @@
169 };
170
171 // Transforms characters in place from ascii to Unicode
172 -static void
173 +static PRUnichar *
174 TransformTextToUnicode(char* aText, PRInt32 aNumChars)
175 {
176 // Go backwards over the characters and convert them.
177 unsigned char* cp1 = (unsigned char*)aText + aNumChars - 1;
178 - PRUnichar* cp2 = (PRUnichar*)aText + (aNumChars - 1);
179 + PRUnichar* cp2;
180 + PRUnichar* ret;
181 +
182 + if ((unsigned long) aText & 0x1)
183 + cp2 = ((PRUnichar*)(aText + 1));
184 + else
185 + cp2 = (PRUnichar*)aText;
186
187 - while (aNumChars-- > 0) {
188 - // XXX: If you crash here then you may see the issue described
189 - // in http://bugzilla.mozilla.org/show_bug.cgi?id=36146#c44
190 - *cp2-- = PRUnichar(*cp1--);
191 - }
192 + ret = cp2;
193 +
194 + cp2 += (aNumChars - 1);
195 +
196 + while (aNumChars-- > 0)
197 + SetUnichar(cp2--, PRUnichar(*cp1--));
198 +
199 + return ret;
200 }
201
202 PRUint32
203 @@ -5702,7 +5711,7 @@
204 // The text transform buffer contains ascii characters, so
205 // transform it to Unicode
206 NS_ASSERTION(wordBufLen >= PRUint32(lastWordLen), "no room to transform in place");
207 - TransformTextToUnicode((char*)lastWordPtr, lastWordLen);
208 + pWordBuf = TransformTextToUnicode((char*)lastWordPtr, lastWordLen);
209 }
210
211 // Look ahead in the text-run and compute the final word
212 @@ -6232,7 +6241,7 @@
213 for (; aBuffer < end; aBuffer++) {
214 PRUnichar ch = *aBuffer;
215 if (ch == ' ') {
216 - *aBuffer = CH_NBSP;
217 + SetUnichar(aBuffer, CH_NBSP);
218 }
219 }
220 }
221
222
223
224 1.1 src/patchsets/xulrunner/1.8.1.19/004_mozilla-hppa.patch
225
226 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/004_mozilla-hppa.patch?rev=1.1&view=markup
227 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/004_mozilla-hppa.patch?rev=1.1&content-type=text/plain
228
229 Index: 004_mozilla-hppa.patch
230 ===================================================================
231 # Original patch just cleaned up, Author on original patch was Randolph Chung (tausq@××××××.org)
232 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=287150
233
234 Index: xpcom/reflect/xptcall/src/md/unix/Makefile.in
235 ===================================================================
236 RCS file: /cvsroot/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in,v
237 retrieving revision 1.92
238 diff -u -B -u -8 -p -r1.92 Makefile.in
239 --- xpcom/reflect/xptcall/src/md/unix/Makefile.in 14 Dec 2006 19:13:43 -0000 1.92
240 +++ xpcom/reflect/xptcall/src/md/unix/Makefile.in 3 Jan 2007 18:20:44 -0000
241 @@ -185,16 +185,29 @@ CPPSRCS := xptcinvoke_ipf32.cpp xptcstu
242 ASFILES := xptcstubs_asm_ipf32.s xptcinvoke_asm_ipf32.s
243 endif
244
245 # #18875 Building the CPP's (CXX) optimized causes a crash
246 CXXFLAGS := $(filter-out $(MOZ_OPTIMIZE_FLAGS), $(CXXFLAGS))
247 endif
248 endif
249
250 +#
251 +# Linux/HPPA/gcc
252 +#
253 +ifeq ($(OS_ARCH),Linux)
254 +ifneq (,$(filter hppa2.0 hppa1.1,$(OS_TEST)))
255 +#ifeq ($(CC),gcc) # Do not check for gcc since there is only this compiler on linux for hppa
256 +CPPSRCS := xptcinvoke_pa32.cpp xptcstubs_pa32.cpp
257 +ASFILES := xptcstubs_asm_parisc_linux.s xptcinvoke_asm_parisc_linux.s
258 +#endif
259 +endif
260 +endif
261 +
262 +
263 ######################################################################
264 # M68k
265 ######################################################################
266 #
267 # NetBSD/m68k
268 #
269 ifeq ($(OS_ARCH),NetBSD)
270 ifneq (,$(filter amiga atari hp300 mac68k mvme68k next68k sun3 sun3x x68k,$(OS_TEST)))
271 Index: xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
272 ===================================================================
273 RCS file: xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
274 diff -N xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
275 --- /dev/null 1 Jan 1970 00:00:00 -0000
276 +++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s 3 Jan 2007 18:20:44 -0000
277 @@ -0,0 +1,102 @@
278 +
279 + .LEVEL 1.1
280 + .text
281 + .align 4
282 +
283 +framesz:
284 + .equ 128
285 +
286 +.globl XPTC_InvokeByIndex
287 + .type XPTC_InvokeByIndex, @function
288 +
289 +
290 +XPTC_InvokeByIndex:
291 + .PROC
292 + .CALLINFO FRAME=72, CALLER,SAVE_RP, SAVE_SP, ENTRY_GR=3
293 + .ENTRY
294 +
295 + ; frame marker takes 48 bytes,
296 + ; register spill area takes 8 bytes,
297 + ; local stack area takes 72 bytes result in 128 bytes total
298 +
299 + STW %rp,-20(%sp)
300 + STW,MA %r3,128(%sp)
301 +
302 + LDO -framesz(%r30),%r28
303 + STW %r28,-4(%r30) ; save previous sp
304 + STW %r19,-32(%r30)
305 +
306 + STW %r26,-36-framesz(%r30) ; save argument registers in
307 + STW %r25,-40-framesz(%r30) ; in PREVIOUS frame
308 + STW %r24,-44-framesz(%r30) ;
309 + STW %r23,-48-framesz(%r30) ;
310 +
311 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26;out=28
312 + BL invoke_count_bytes,%r31
313 + COPY %r31,%r2
314 +
315 + CMPIB,>= 0,%r28, .+76
316 + COPY %r30,%r3 ; copy stack ptr to saved stack ptr
317 + ADD %r30,%r28,%r30 ; extend stack frame
318 + LDW -4(%r3),%r28 ; move frame
319 + STW %r28,-4(%r30)
320 + LDW -8(%r3),%r28
321 + STW %r28,-8(%r30)
322 + LDW -12(%r3),%r28
323 + STW %r28,-12(%r30)
324 + LDW -16(%r3),%r28
325 + STW %r28,-16(%r30)
326 + LDW -20(%r3),%r28
327 + STW %r28,-20(%r30)
328 + LDW -24(%r3),%r28
329 + STW %r28,-24(%r30)
330 + LDW -28(%r3),%r28
331 + STW %r28,-28(%r30)
332 + LDW -32(%r3),%r28
333 + STW %r28,-32(%r30)
334 +
335 + LDO -40(%r30),%r26 ; load copy address
336 + LDW -44-framesz(%r3),%r25 ; load rest of 2 arguments
337 + LDW -48-framesz(%r3),%r24 ;
338 +
339 + LDW -32(%r30),%r19 ; shared lib call destroys r19; reload
340 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26
341 + BL invoke_copy_to_stack,%r31
342 + COPY %r31,%r2
343 +
344 + LDO -48(%r30),%r20
345 + EXTRW,U,= %r28,31,1,%r22
346 + FLDD 0(%r20),%fr7 ; load double arg 1
347 + EXTRW,U,= %r28,30,1,%r22
348 + FLDW 8(%r20),%fr5L ; load float arg 1
349 + EXTRW,U,= %r28,29,1,%r22
350 + FLDW 4(%r20),%fr6L ; load float arg 2
351 + EXTRW,U,= %r28,28,1,%r22
352 + FLDW 0(%r20),%fr7L ; load float arg 3
353 +
354 + LDW -36-framesz(%r3),%r26 ; load ptr to 'that'
355 + LDW -40(%r30),%r25 ; load the rest of dispatch argument registers
356 + LDW -44(%r30),%r24
357 + LDW -48(%r30),%r23
358 +
359 + LDW -36-framesz(%r3),%r20 ; load vtable addr
360 + LDW -40-framesz(%r3),%r28 ; load index
361 + LDW 0(%r20),%r20 ; follow vtable
362 + SH2ADDL %r28,%r20,%r28 ; add 4*index to vtable entry
363 + LDW 0(%r28),%r22 ; load vtable entry
364 +
365 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=22-26;out=28;
366 + BL $$dyncall,%r31
367 + COPY %r31,%r2
368 +
369 + LDW -32(%r30),%r19
370 + COPY %r3,%r30 ; restore saved stack ptr
371 +
372 + LDW -148(%sp),%rp
373 + LDWM -128(%sp),%r3
374 + BV,N (%rp)
375 + NOP
376 + .EXIT
377 + .PROCEND ;in=23,24,25,26;
378 + .SIZE XPTC_InvokeByIndex, .-XPTC_InvokeByIndex
379 +
380 Index: xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
381 ===================================================================
382 RCS file: xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
383 diff -N xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
384 --- /dev/null 1 Jan 1970 00:00:00 -0000
385 +++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s 3 Jan 2007 18:20:44 -0000
386 @@ -0,0 +1,66 @@
387 + .LEVEL 1.1
388 + .TEXT
389 + .ALIGN 4
390 +
391 +curframesz:
392 + .EQU 128
393 +
394 +
395 +; SharedStub has stack size of 128 bytes
396 +
397 +lastframesz:
398 + .EQU 64
399 +
400 +; the StubN C++ function has a small stack size of 64 bytes
401 +
402 +
403 +.globl SharedStub
404 + .type SharedStub, @function
405 +
406 +SharedStub:
407 + .PROC
408 + .CALLINFO CALLER,FRAME=80,SAVE_RP
409 +
410 + .ENTRY
411 + STW %rp,-20(%sp)
412 + LDO 128(%sp),%sp
413 +
414 + STW %r19,-32(%r30)
415 + STW %r26,-36-curframesz(%r30) ; save arg0 in previous frame
416 +
417 + LDO -80(%r30),%r28
418 + FSTD,MA %fr5,8(%r28) ; save darg0
419 + FSTD,MA %fr7,8(%r28) ; save darg1
420 + FSTW,MA %fr4L,4(%r28) ; save farg0
421 + FSTW,MA %fr5L,4(%r28) ; save farg1
422 + FSTW,MA %fr6L,4(%r28) ; save farg2
423 + FSTW,MA %fr7L,4(%r28) ; save farg3
424 +
425 + ; Former value of register 26 is already properly saved by StubN,
426 + ; but register 25-23 are not because of the arguments mismatch
427 + STW %r25,-40-curframesz-lastframesz(%r30) ; save r25
428 + STW %r24,-44-curframesz-lastframesz(%r30) ; save r24
429 + STW %r23,-48-curframesz-lastframesz(%r30) ; save r23
430 + COPY %r26,%r25 ; method index is arg1
431 + LDW -36-curframesz-lastframesz(%r30),%r26 ; self is arg0
432 + LDO -40-curframesz-lastframesz(%r30),%r24 ; normal args is arg2
433 + LDO -80(%r30),%r23 ; floating args is arg3
434 +
435 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=23-26;out=28;
436 + BL PrepareAndDispatch, %r31
437 + COPY %r31,%r2
438 +
439 + LDW -32(%r30),%r19
440 +
441 + LDW -148(%sp),%rp
442 + LDO -128(%sp),%sp
443 +
444 +
445 + BV,N (%rp)
446 + NOP
447 + NOP
448 +
449 + .EXIT
450 + .PROCEND ;in=26;out=28;
451 +
452 + .SIZE SharedStub, .-SharedStub
453
454
455
456 1.1 src/patchsets/xulrunner/1.8.1.19/005_mozilla-firefox-1.5-ia64.patch
457
458 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/005_mozilla-firefox-1.5-ia64.patch?rev=1.1&view=markup
459 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/005_mozilla-firefox-1.5-ia64.patch?rev=1.1&content-type=text/plain
460
461 Index: 005_mozilla-firefox-1.5-ia64.patch
462 ===================================================================
463 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=289394
464
465 --- mozilla.orig/extensions/transformiix/source/base/Double.cpp
466 +++ mozilla/extensions/transformiix/source/base/Double.cpp
467 @@ -75,14 +75,7 @@
468 #define CPU_IS_ARM
469 #endif
470
471 -#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
472 -/**
473 - * This version of the macros is safe for the alias optimizations
474 - * that gcc does, but uses gcc-specific extensions.
475 - */
476 -
477 typedef union txdpun {
478 - PRFloat64 d;
479 struct {
480 #if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
481 PRUint32 lo, hi;
482 @@ -90,8 +83,14 @@
483 PRUint32 hi, lo;
484 #endif
485 } s;
486 + PRFloat64 d;
487 } txdpun;
488
489 +#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
490 +/**
491 + * This version of the macros is safe for the alias optimizations
492 + * that gcc does, but uses gcc-specific extensions.
493 + */
494 #define TX_DOUBLE_HI32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.hi; }))
495 #define TX_DOUBLE_LO32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.lo; }))
496
497 @@ -117,20 +116,20 @@
498
499 //-- Initialize Double related constants
500 #ifdef IS_BIG_ENDIAN
501 -const PRUint32 nanMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK,
502 - 0xffffffff};
503 -const PRUint32 infMask[2] = {TX_DOUBLE_HI32_EXPMASK, 0};
504 -const PRUint32 negInfMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0};
505 +const txdpun nanMask = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK,
506 + 0xffffffff};
507 +const txdpun infMask = {TX_DOUBLE_HI32_EXPMASK, 0};
508 +const txdpun negInfMask = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0};
509 #else
510 -const PRUint32 nanMask[2] = {0xffffffff,
511 - TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK};
512 -const PRUint32 infMask[2] = {0, TX_DOUBLE_HI32_EXPMASK};
513 -const PRUint32 negInfMask[2] = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT};
514 +const txdpun nanMask = {0xffffffff,
515 + TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK};
516 +const txdpun infMask = {0, TX_DOUBLE_HI32_EXPMASK};
517 +const txdpun negInfMask = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT};
518 #endif
519
520 -const double Double::NaN = *((double*)nanMask);
521 -const double Double::POSITIVE_INFINITY = *((double*)infMask);
522 -const double Double::NEGATIVE_INFINITY = *((double*)negInfMask);
523 +const double Double::NaN = nanMask.d;
524 +const double Double::POSITIVE_INFINITY = infMask.d;
525 +const double Double::NEGATIVE_INFINITY = negInfMask.d;
526
527 /*
528 * Determines whether the given double represents positive or negative
529 --- mozilla.orig/js/src/fdlibm/fdlibm.h
530
531
532
533 1.1 src/patchsets/xulrunner/1.8.1.19/006_mips-asm.patch
534
535 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/006_mips-asm.patch?rev=1.1&view=markup
536 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/006_mips-asm.patch?rev=1.1&content-type=text/plain
537
538 Index: 006_mips-asm.patch
539 ===================================================================
540 Upstream Bug: http://bugzilla.mozilla.org/show_bug.cgi?id=258429
541
542 This patch is required to fix build issues with Mozilla on MIPS architectures.
543 The out-of-the-box code is coded to build on a PlayStation 2 game console, which
544 is a highly specialised MIPS machine based around the Toshiba TX5900. This CPU
545 is very non-standard, causing problems with generic MIPS machines like Silicon
546 Graphics workstations.
547
548 The following patch fixes the assembly language routines for generic MIPS
549 machines. In the case where it is being compiled for a PlayStation 2, the older
550 PS2-specific implementation is used instead. (Some work needs to be done to
551 accurately detect the PS2, however.
552
553 diff -urN mozilla.old/xpcom/reflect/xptcall/src/md/unix/Makefile.in mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
554 --- mozilla.old/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-28 15:29:22 +1000
555 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2007-01-17 15:36:43 +1000
556 @@ -224,16 +224,28 @@
557 endif
558 endif
559
560 +#
561 +# Linux/MIPS
562 +#
563 ifeq ($(OS_ARCH),Linux)
564 -ifneq (,$(findstring mips, $(OS_TEST)))
565 -CPPSRCS := xptcinvoke_mips.cpp xptcstubs_mips.cpp
566 -ASFILES := xptcinvoke_asm_mips.s xptcstubs_asm_mips.s
567 -#xptcstubs_mips.cpp
568 -# xptcstubs_asm_mips.s
569 +
570 +# PlayStation2 Linux
571 +ifneq (,$(findstring mipsEE, $(OS_TEST)))
572 +CPPSRCS := xptcinvoke_ps2mips.cpp xptcstubs_ps2mips.cpp
573 +ASFILES := xptcinvoke_asm_ps2mips.s xptcstubs_asm_ps2mips.s
574 ifdef GNU_CC
575 ASFLAGS += $(INCLUDES) -x assembler-with-cpp -D__GNUC__
576 endif
577 +else
578 +
579 +endif
580 +# Generic 32-bit Linux
581 +ifneq (,$(findstring mips, $(OS_TEST)))
582 +CPPSRCS := xptcinvoke_mips.cpp xptcstubs_mips.cpp
583 +ASFILES := xptcinvoke_asm_mips.s xptcstubs_asm_mips.s
584 +AS := $(CC) $(CFLAGS) $(INCLUDES) -c -x assembler-with-cpp
585 endif
586 +
587 endif
588
589 ######################################################################
590 @@ -378,14 +390,24 @@
591 INCLUDES += -I$(srcdir)/../..
592
593 ifeq ($(OS_ARCH),Linux)
594 +
595 +# PlayStation 2 Linux
596 +ifneq (,$(findstring mipsEE, $(OS_TEST)))
597 +xptcstubs_asm_ps2mips.o: xptcstubs_asm_ps2mips.s.m4 $(PUBLIC)/xptcstubsdef.inc
598 + m4 $(INCLUDES) $< > ./xptcstubs_asm_ps2mips.s && \
599 + $(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) ./xptcstubs_asm_ps2mips.s
600 + $(RM) -f ./xptcstubs_asm_ps2mips.s
601 +else
602 +
603 +# Generic Linux
604 ifneq (,$(findstring mips, $(OS_TEST)))
605 -xptcstubs_asm_mips.o: xptcstubs_asm_mips.s.m4 $(PUBLIC)/xptcstubsdef.inc
606 - m4 $(INCLUDES) $< > ./xptcstubs_asm_mips.s && \
607 - $(AS) -o $@ $(ASFLAGS) $(AS_DASH_C_FLAG) ./xptcstubs_asm_mips.s
608 - $(RM) -f ./xptcstubs_asm_mips.s
609 +xptcstubs_asm_mips.o: xptcstubs_asm_mips.s $(PUBLIC)/xptcstubsdef.inc
610 + $(AS) -o $@ $<
611 endif
612 endif
613
614 +endif
615 +
616 ifeq ($(OS_ARCH),Darwin)
617 xptcstubs_asm_ppc_darwin.o: xptcstubs_asm_ppc_darwin.s.m4 $(PUBLIC)/xptcstubsdef.inc Makefile
618 gm4 $(INCLUDES) $< > ./xptcstubs_asm_ppc_darwin.s && \
619 diff -urN mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s
620 --- mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s 2001-10-11 17:19:01 +1000
621 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_mips.s 2007-01-17 15:33:47 +1000
622 @@ -21,6 +21,7 @@
623 * Contributor(s):
624 * Brendan Eich <brendan@×××××××.org>
625 * Stuart Parmenter <pavlov@××××××××.com>
626 + * Thiemo Seufer <seufer@×××××××××××××××××××××.de>
627 */
628
629 /* This code is for MIPS using the O32 ABI. */
630 @@ -28,139 +29,123 @@
631 #include <sys/regdef.h>
632 #include <sys/asm.h>
633
634 -.text
635 -.globl invoke_count_words
636 -.globl invoke_copy_to_stack
637 -
638 -# We need a variable number of words allocated from the stack for copies of
639 -# the params, and this space must come between the high frame (where ra, gp,
640 -# and s0 are saved) and the low frame (where a0-a3 are saved by the callee
641 -# functions we invoke).
642 -
643 -LOCALSZ=4 # s0, s1, ra, gp
644 -NARGSAVE=4 # a0, a1, a2, a3
645 -HIFRAMESZ=(LOCALSZ*SZREG)
646 -LOFRAMESZ=(NARGSAVE*SZREG)
647 -FRAMESZ=(HIFRAMESZ+LOFRAMESZ+ALSZ)&ALMASK
648 -
649 -# XXX these 2*SZREG, etc. are very magic -- we *know* that ALSZ&ALMASK cause
650 -# FRAMESZ to be 0 mod 8, in this case to be 16 and not 12.
651 -RAOFF=FRAMESZ - (2*SZREG)
652 -GPOFF=FRAMESZ - (3*SZREG)
653 -S0OFF=FRAMESZ - (4*SZREG)
654 -S1OFF=FRAMESZ - (5*SZREG)
655 -
656 -# These are not magic -- they are just our argsave slots in the caller frame.
657 -A0OFF=FRAMESZ
658 -A1OFF=FRAMESZ + (1*SZREG)
659 -A2OFF=FRAMESZ + (2*SZREG)
660 -A3OFF=FRAMESZ + (3*SZREG)
661 -
662 - #
663 - # _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
664 - # a0 a1 a2 a3
665 -
666 -NESTED(_XPTC_InvokeByIndex, FRAMESZ, ra)
667 -
668 - .set noreorder
669 - .cpload t9
670 - .set reorder
671 -
672 +# NARGSAVE is the argument space in the callers frame, including extra
673 +# 'shadowed' space for the argument registers. The minimum of 4
674 +# argument slots is sometimes predefined in the header files.
675 +#ifndef NARGSAVE
676 +#define NARGSAVE 4
677 +#endif
678 +
679 +#define LOCALSZ 3 /* gp, fp, ra */
680 +#define FRAMESZ ((((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK)
681 +
682 +#define RAOFF (FRAMESZ - (1*SZREG))
683 +#define FPOFF (FRAMESZ - (2*SZREG))
684 +#define GPOFF (FRAMESZ - (3*SZREG))
685 +
686 +#define A0OFF (FRAMESZ + (0*SZREG))
687 +#define A1OFF (FRAMESZ + (1*SZREG))
688 +#define A2OFF (FRAMESZ + (2*SZREG))
689 +#define A3OFF (FRAMESZ + (3*SZREG))
690 +
691 + .text
692 +
693 +#
694 +# _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
695 +# a0 a1 a2 a3
696 +
697 + .globl _XPTC_InvokeByIndex
698 + .align 2
699 + .type _XPTC_InvokeByIndex,@function
700 + .ent _XPTC_InvokeByIndex,0
701 + .frame fp, FRAMESZ, ra
702 +_XPTC_InvokeByIndex:
703 + SETUP_GP
704 subu sp, FRAMESZ
705
706 - # specify the save register mask -- XXX do we want the a0-a3 here, given
707 - # our "split" frame where the args are saved below a dynamicly allocated
708 - # region under the high frame?
709 - #
710 - # 10010000000000010000000011110000
711 - .mask 0x900100F0, -((NARGSAVE+LOCALSZ)*SZREG)
712 -
713 - # thou shalt not use .cprestore if yer frame has variable size...
714 - # .cprestore GPOFF
715 -
716 - REG_S ra, RAOFF(sp)
717 -
718 - # this happens automatically with .cprestore, but we cannot use that op...
719 - REG_S gp, GPOFF(sp)
720 - REG_S s0, S0OFF(sp)
721 - REG_S s1, S1OFF(sp)
722 -
723 - REG_S a0, A0OFF(sp)
724 - REG_S a1, A1OFF(sp)
725 - REG_S a2, A2OFF(sp)
726 - REG_S a3, A3OFF(sp)
727 + # specify the save register mask for gp, fp, ra, a3 - a0
728 + .mask 0xD00000F0, RAOFF-FRAMESZ
729
730 - # invoke_count_words(paramCount, params)
731 - move a0, a2
732 - move a1, a3
733 + sw ra, RAOFF(sp)
734 + sw fp, FPOFF(sp)
735
736 - jal invoke_count_words
737 - lw gp, GPOFF(sp)
738 + # we can't use .cprestore in a variable stack frame
739 + sw gp, GPOFF(sp)
740
741 - # save the old sp so we can pop the param area and any "low frame"
742 - # needed as an argsave area below the param block for callees that
743 - # we invoke.
744 - move s0, sp
745 -
746 - REG_L a1, A2OFF(sp) # a1 = paramCount
747 - REG_L a2, A3OFF(sp) # a2 = params
748 -
749 - # we define a word as 4 bytes, period end of story!
750 - sll v0, 2 # 4 bytes * result of invoke_copy_words
751 - subu v0, LOFRAMESZ # but we take back the argsave area built into
752 - # our stack frame -- SWEET!
753 - subu sp, sp, v0 # make room
754 - move a0, sp # a0 = param stack address
755 - move s1, a0 # save it for later -- it should be safe here
756 -
757 - # the old sp is still saved in s0, but we now need another argsave
758 - # area ("low frame") for the invoke_copy_to_stack call.
759 - subu sp, sp, LOFRAMESZ
760 + sw a0, A0OFF(sp)
761 + sw a1, A1OFF(sp)
762 + sw a2, A2OFF(sp)
763 + sw a3, A3OFF(sp)
764 +
765 + # save bottom of fixed frame
766 + move fp, sp
767 +
768 + # extern "C" uint32
769 + # invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s);
770 + la t9, invoke_count_words
771 + move a0, a2
772 + move a1, a3
773 + jalr t9
774 + lw gp, GPOFF(fp)
775
776 - # copy the param into the stack areas
777 + # allocate variable stack, with a size of:
778 + # wordsize (of 4 bytes) * result (already aligned to dword)
779 + # but a minimum of 16 byte
780 + sll v0, 2
781 + slt t0, v0, 16
782 + beqz t0, 1f
783 + li v0, 16
784 +1: subu sp, v0
785 +
786 + # let a0 point to the bottom of the variable stack, allocate
787 + # another fixed stack for:
788 + # extern "C" void
789 # invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
790 - # nsXPTCVariant* s)
791 - jal invoke_copy_to_stack
792 - lw gp, GPOFF(s0)
793 -
794 - move sp, s0 # get orig sp back, popping params and argsave
795 -
796 - REG_L a0, A0OFF(sp) # a0 = set "that" to be "this"
797 - REG_L a1, A1OFF(sp) # a1 = methodIndex
798 -
799 - # t1 = methodIndex * 4
800 - # (use shift instead of mult)
801 - sll t1, a1, 2
802 -
803 - # calculate the function we need to jump to,
804 - # which must then be saved in t9
805 + # nsXPTCVariant* s);
806 + la t9, invoke_copy_to_stack
807 + move a0, sp
808 + lw a1, A2OFF(fp)
809 + lw a2, A3OFF(fp)
810 + subu sp, 16
811 + jalr t9
812 + lw gp, GPOFF(fp)
813 +
814 + # back to the variable stack frame
815 + addu sp, 16
816 +
817 + # calculate the function we need to jump to, which must then be
818 + # stored in t9
819 + lw a0, A0OFF(fp) # a0 = set "that" to be "this"
820 + lw t0, A1OFF(fp) # a1 = methodIndex
821 lw t9, 0(a0)
822 - addu t9, t9, t1
823 - lw t9, 8(t9)
824 -
825 - # a1..a3 and f13..f14 should now be set to what
826 - # invoke_copy_to_stack told us. skip a0 and f12
827 - # because that is the "this" pointer
828 -
829 - REG_L a1, 1*SZREG(s1)
830 - REG_L a2, 2*SZREG(s1)
831 - REG_L a3, 3*SZREG(s1)
832 -
833 - l.d $f13, 8(s1)
834 - l.d $f14, 16(s1)
835 -
836 - # Create the stack pointer for the function, which must have 4 words
837 - # of space for callee-saved args. invoke_count_words allocated space
838 - # for a0 starting at s1, so we just move s1 into sp.
839 - move sp, s1
840 + # t0 = methodIndex << PTRLOG
841 + sll t0, t0, PTRLOG
842 + addu t9, t0
843 +#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
844 + lw t9, (t9)
845 +#else /* not G++ V3 ABI */
846 + lw t9, 2*PTRSIZE(t9)
847 +#endif /* G++ V3 ABI */
848 +
849 + # Set a1-a3 to what invoke_copy_to_stack told us. a0 is already
850 + # the "this" pointer. We don't have to care about floating
851 + # point arguments, the non-FP "this" pointer as first argument
852 + # means they'll never be used.
853 + lw a1, 1*SZREG(sp)
854 + lw a2, 2*SZREG(sp)
855 + lw a3, 3*SZREG(sp)
856 +
857 + jalr t9
858 + # Micro-optimization: There's no gp usage below this point, so
859 + # we don't reload.
860 + # lw gp, GPOFF(fp)
861
862 - jalr ra, t9
863 - lw gp, GPOFF(s0)
864 + # leave variable stack frame
865 + move sp, fp
866
867 - move sp, s0
868 + lw ra, RAOFF(sp)
869 + lw fp, FPOFF(sp)
870
871 - REG_L ra, RAOFF(sp)
872 - REG_L s0, S0OFF(sp)
873 - addu sp, FRAMESZ
874 + addiu sp, FRAMESZ
875 j ra
876 -.end _XPTC_InvokeByIndex
877 +END(_XPTC_InvokeByIndex)
878 diff -urN mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s
879 --- mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s 1970-01-01 10:00:00 +1000
880 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ps2mips.s 2007-01-17 15:18:27 +1000
881 @@ -0,0 +1,166 @@
882 +/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
883 + * Version: MPL 1.1
884 + *
885 + * The contents of this file are subject to the Mozilla Public License Version
886 + * 1.1 (the "License"); you may not use this file except in compliance with
887 + * the License. You may obtain a copy of the License at
888 + * http://www.mozilla.org/MPL/
889 + *
890 + * Software distributed under the License is distributed on an "AS IS" basis,
891 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
892 + * for the specific language governing rights and limitations under the
893 + * License.
894 + *
895 + * The Original Code is mozilla.org code.
896 + *
897 + * The Initial Developer of the Original Code is
898 + * Netscape Communications Corp, Inc.
899 + * Portions created by the Initial Developer are Copyright (C) 2001
900 + * the Initial Developer. All Rights Reserved.
901 + *
902 + * Contributor(s):
903 + * Brendan Eich <brendan@×××××××.org>
904 + * Stuart Parmenter <pavlov@××××××××.com>
905 + */
906 +
907 +/* This code is for MIPS using the O32 ABI. */
908 +
909 +#include <sys/regdef.h>
910 +#include <sys/asm.h>
911 +
912 +.text
913 +.globl invoke_count_words
914 +.globl invoke_copy_to_stack
915 +
916 +# We need a variable number of words allocated from the stack for copies of
917 +# the params, and this space must come between the high frame (where ra, gp,
918 +# and s0 are saved) and the low frame (where a0-a3 are saved by the callee
919 +# functions we invoke).
920 +
921 +LOCALSZ=4 # s0, s1, ra, gp
922 +NARGSAVE=4 # a0, a1, a2, a3
923 +HIFRAMESZ=(LOCALSZ*SZREG)
924 +LOFRAMESZ=(NARGSAVE*SZREG)
925 +FRAMESZ=(HIFRAMESZ+LOFRAMESZ+ALSZ)&ALMASK
926 +
927 +# XXX these 2*SZREG, etc. are very magic -- we *know* that ALSZ&ALMASK cause
928 +# FRAMESZ to be 0 mod 8, in this case to be 16 and not 12.
929 +RAOFF=FRAMESZ - (2*SZREG)
930 +GPOFF=FRAMESZ - (3*SZREG)
931 +S0OFF=FRAMESZ - (4*SZREG)
932 +S1OFF=FRAMESZ - (5*SZREG)
933 +
934 +# These are not magic -- they are just our argsave slots in the caller frame.
935 +A0OFF=FRAMESZ
936 +A1OFF=FRAMESZ + (1*SZREG)
937 +A2OFF=FRAMESZ + (2*SZREG)
938 +A3OFF=FRAMESZ + (3*SZREG)
939 +
940 + #
941 + # _XPTC_InvokeByIndex(that, methodIndex, paramCount, params)
942 + # a0 a1 a2 a3
943 +
944 +NESTED(_XPTC_InvokeByIndex, FRAMESZ, ra)
945 +
946 + .set noreorder
947 + .cpload t9
948 + .set reorder
949 +
950 + subu sp, FRAMESZ
951 +
952 + # specify the save register mask -- XXX do we want the a0-a3 here, given
953 + # our "split" frame where the args are saved below a dynamicly allocated
954 + # region under the high frame?
955 + #
956 + # 10010000000000010000000011110000
957 + .mask 0x900100F0, -((NARGSAVE+LOCALSZ)*SZREG)
958 +
959 + # thou shalt not use .cprestore if yer frame has variable size...
960 + # .cprestore GPOFF
961 +
962 + REG_S ra, RAOFF(sp)
963 +
964 + # this happens automatically with .cprestore, but we cannot use that op...
965 + REG_S gp, GPOFF(sp)
966 + REG_S s0, S0OFF(sp)
967 + REG_S s1, S1OFF(sp)
968 +
969 + REG_S a0, A0OFF(sp)
970 + REG_S a1, A1OFF(sp)
971 + REG_S a2, A2OFF(sp)
972 + REG_S a3, A3OFF(sp)
973 +
974 + # invoke_count_words(paramCount, params)
975 + move a0, a2
976 + move a1, a3
977 +
978 + jal invoke_count_words
979 + lw gp, GPOFF(sp)
980 +
981 + # save the old sp so we can pop the param area and any "low frame"
982 + # needed as an argsave area below the param block for callees that
983 + # we invoke.
984 + move s0, sp
985 +
986 + REG_L a1, A2OFF(sp) # a1 = paramCount
987 + REG_L a2, A3OFF(sp) # a2 = params
988 +
989 + # we define a word as 4 bytes, period end of story!
990 + sll v0, 2 # 4 bytes * result of invoke_copy_words
991 + subu v0, LOFRAMESZ # but we take back the argsave area built into
992 + # our stack frame -- SWEET!
993 + subu sp, sp, v0 # make room
994 + move a0, sp # a0 = param stack address
995 + move s1, a0 # save it for later -- it should be safe here
996 +
997 + # the old sp is still saved in s0, but we now need another argsave
998 + # area ("low frame") for the invoke_copy_to_stack call.
999 + subu sp, sp, LOFRAMESZ
1000 +
1001 + # copy the param into the stack areas
1002 + # invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
1003 + # nsXPTCVariant* s)
1004 + jal invoke_copy_to_stack
1005 + lw gp, GPOFF(s0)
1006 +
1007 + move sp, s0 # get orig sp back, popping params and argsave
1008 +
1009 + REG_L a0, A0OFF(sp) # a0 = set "that" to be "this"
1010 + REG_L a1, A1OFF(sp) # a1 = methodIndex
1011 +
1012 + # t1 = methodIndex * 4
1013 + # (use shift instead of mult)
1014 + sll t1, a1, 2
1015 +
1016 + # calculate the function we need to jump to,
1017 + # which must then be saved in t9
1018 + lw t9, 0(a0)
1019 + addu t9, t9, t1
1020 + lw t9, 8(t9)
1021 +
1022 + # a1..a3 and f13..f14 should now be set to what
1023 + # invoke_copy_to_stack told us. skip a0 and f12
1024 + # because that is the "this" pointer
1025 +
1026 + REG_L a1, 1*SZREG(s1)
1027 + REG_L a2, 2*SZREG(s1)
1028 + REG_L a3, 3*SZREG(s1)
1029 +
1030 + l.d $f13, 8(s1)
1031 + l.d $f14, 16(s1)
1032 +
1033 + # Create the stack pointer for the function, which must have 4 words
1034 + # of space for callee-saved args. invoke_count_words allocated space
1035 + # for a0 starting at s1, so we just move s1 into sp.
1036 + move sp, s1
1037 +
1038 + jalr ra, t9
1039 + lw gp, GPOFF(s0)
1040 +
1041 + move sp, s0
1042 +
1043 + REG_L ra, RAOFF(sp)
1044 + REG_L s0, S0OFF(sp)
1045 + addu sp, FRAMESZ
1046 + j ra
1047 +.end _XPTC_InvokeByIndex
1048 diff -urN mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp
1049 --- mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp 2004-04-19 00:18:18 +1000
1050 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_mips.cpp 2007-01-17 15:33:47 +1000
1051 @@ -24,6 +24,7 @@
1052 * Contributor(s):
1053 * Stuart Parmenter <pavlov@××××××××.com>
1054 * Brendan Eich <brendan@×××××××.org>
1055 + * Thiemo Seufer <seufer@×××××××××××××××××××××.de>
1056 *
1057 * Alternatively, the contents of this file may be used under the terms of
1058 * either of the GNU General Public License Version 2 or later (the "GPL"),
1059 @@ -52,10 +53,8 @@
1060 // Count a word for a0 even though it's never stored or loaded
1061 // We do this only for alignment of register pairs.
1062 PRUint32 result = 1;
1063 - for (PRUint32 i = 0; i < paramCount; i++, s++)
1064 + for (PRUint32 i = 0; i < paramCount; i++, result++, s++)
1065 {
1066 - result++;
1067 -
1068 if (s->IsPtrData())
1069 continue;
1070
1071 @@ -68,6 +67,9 @@
1072 result++;
1073 result++;
1074 break;
1075 +
1076 + default:
1077 + break;
1078 }
1079 }
1080 return (result + 1) & ~(PRUint32)1;
1081 @@ -88,8 +90,6 @@
1082 continue;
1083 }
1084
1085 - *((void**)d) = s->val.p;
1086 -
1087 switch(s->type)
1088 {
1089 case nsXPTType::T_I64 :
1090 @@ -104,6 +104,9 @@
1091 if ((PRWord)d & 4) d++;
1092 *((double*) d) = s->val.d; d++;
1093 break;
1094 + default:
1095 + *((void**)d) = s->val.p;
1096 + break;
1097 }
1098 }
1099 }
1100 @@ -118,5 +121,4 @@
1101 PRUint32 paramCount, nsXPTCVariant* params)
1102 {
1103 return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
1104 -}
1105 -
1106 +}
1107 diff -urN mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp
1108 --- mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp 1970-01-01 10:00:00 +1000
1109 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ps2mips.cpp 2007-01-17 15:17:59 +1000
1110 @@ -0,0 +1,122 @@
1111 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1112 + * Version: MPL 1.1
1113 + *
1114 + * ***** BEGIN LICENSE BLOCK *****
1115 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1116 + *
1117 + * The contents of this file are subject to the Mozilla Public License Version
1118 + * 1.1 (the "License"); you may not use this file except in compliance with
1119 + * the License. You may obtain a copy of the License at
1120 + * http://www.mozilla.org/MPL/
1121 + *
1122 + * Software distributed under the License is distributed on an "AS IS" basis,
1123 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1124 + * for the specific language governing rights and limitations under the
1125 + * License.
1126 + *
1127 + * The Original Code is mozilla.org code.
1128 + *
1129 + * The Initial Developer of the Original Code is
1130 + * Netscape Communications Corp, Inc.
1131 + * Portions created by the Initial Developer are Copyright (C) 2001
1132 + * the Initial Developer. All Rights Reserved.
1133 + *
1134 + * Contributor(s):
1135 + * Stuart Parmenter <pavlov@××××××××.com>
1136 + * Brendan Eich <brendan@×××××××.org>
1137 + *
1138 + * Alternatively, the contents of this file may be used under the terms of
1139 + * either of the GNU General Public License Version 2 or later (the "GPL"),
1140 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1141 + * in which case the provisions of the GPL or the LGPL are applicable instead
1142 + * of those above. If you wish to allow use of your version of this file only
1143 + * under the terms of either the GPL or the LGPL, and not to allow others to
1144 + * use your version of this file under the terms of the MPL, indicate your
1145 + * decision by deleting the provisions above and replace them with the notice
1146 + * and other provisions required by the GPL or the LGPL. If you do not delete
1147 + * the provisions above, a recipient may use your version of this file under
1148 + * the terms of any one of the MPL, the GPL or the LGPL.
1149 + *
1150 + * ***** END LICENSE BLOCK ***** */
1151 +
1152 +/* This code is for MIPS using the O32 ABI. */
1153 +
1154 +/* Platform specific code to invoke XPCOM methods on native objects */
1155 +
1156 +#include "xptcprivate.h"
1157 +
1158 +
1159 +extern "C" uint32
1160 +invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
1161 +{
1162 + // Count a word for a0 even though it's never stored or loaded
1163 + // We do this only for alignment of register pairs.
1164 + PRUint32 result = 1;
1165 + for (PRUint32 i = 0; i < paramCount; i++, s++)
1166 + {
1167 + result++;
1168 +
1169 + if (s->IsPtrData())
1170 + continue;
1171 +
1172 + switch(s->type)
1173 + {
1174 + case nsXPTType::T_I64 :
1175 + case nsXPTType::T_U64 :
1176 + case nsXPTType::T_DOUBLE :
1177 + if (result & 1)
1178 + result++;
1179 + result++;
1180 + break;
1181 + }
1182 + }
1183 + return (result + 1) & ~(PRUint32)1;
1184 +}
1185 +
1186 +extern "C" void
1187 +invoke_copy_to_stack(PRUint32* d, PRUint32 paramCount,
1188 + nsXPTCVariant* s)
1189 +{
1190 + // Skip the unused a0 slot, which we keep only for register pair alignment.
1191 + d++;
1192 +
1193 + for (PRUint32 i = 0; i < paramCount; i++, d++, s++)
1194 + {
1195 + if (s->IsPtrData())
1196 + {
1197 + *((void**)d) = s->ptr;
1198 + continue;
1199 + }
1200 +
1201 + *((void**)d) = s->val.p;
1202 +
1203 + switch(s->type)
1204 + {
1205 + case nsXPTType::T_I64 :
1206 + if ((PRWord)d & 4) d++;
1207 + *((PRInt64*) d) = s->val.i64; d++;
1208 + break;
1209 + case nsXPTType::T_U64 :
1210 + if ((PRWord)d & 4) d++;
1211 + *((PRUint64*) d) = s->val.u64; d++;
1212 + break;
1213 + case nsXPTType::T_DOUBLE :
1214 + if ((PRWord)d & 4) d++;
1215 + *((double*) d) = s->val.d; d++;
1216 + break;
1217 + }
1218 + }
1219 +}
1220 +
1221 +extern "C" nsresult _XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
1222 + PRUint32 paramCount,
1223 + nsXPTCVariant* params);
1224 +
1225 +extern "C"
1226 +XPTC_PUBLIC_API(nsresult)
1227 +XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
1228 + PRUint32 paramCount, nsXPTCVariant* params)
1229 +{
1230 + return _XPTC_InvokeByIndex(that, methodIndex, paramCount, params);
1231 +}
1232 +
1233 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
1234 --- mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s 1970-01-01 10:00:00 +1000
1235 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_mips.s 2007-01-17 15:33:47 +1000
1236 @@ -0,0 +1,142 @@
1237 +/* -*- Mode: asm; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1238 + * Version: MPL 1.1
1239 + *
1240 + * The contents of this file are subject to the Mozilla Public License Version
1241 + * 1.1 (the "License"); you may not use this file except in compliance with
1242 + * the License. You may obtain a copy of the License at
1243 + * http://www.mozilla.org/MPL/
1244 + *
1245 + * Software distributed under the License is distributed on an "AS IS" basis,
1246 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1247 + * for the specific language governing rights and limitations under the
1248 + * License.
1249 + *
1250 + * The Original Code is mozilla.org code.
1251 + *
1252 + * The Initial Developer of the Original Code is
1253 + * Netscape Communications Corp, Inc.
1254 + * Portions created by the Initial Developer are Copyright (C) 2001
1255 + * the Initial Developer. All Rights Reserved.
1256 + *
1257 + * Contributor(s):
1258 + * Stuart Parmenter <pavlov@××××××××.com>
1259 + * Chris Waterson <waterson@××××××××.com>
1260 + * Thiemo Seufer <seufer@×××××××××××××××××××××.de>
1261 + */
1262 +
1263 +/* This code is for MIPS using the O32 ABI. */
1264 +
1265 +#include <sys/regdef.h>
1266 +#include <sys/asm.h>
1267 +
1268 +# NARGSAVE is the argument space in the callers frame, including extra
1269 +# 'shadowed' space for the argument registers. The minimum of 4
1270 +# argument slots is sometimes predefined in the header files.
1271 +#ifndef NARGSAVE
1272 +#define NARGSAVE 4
1273 +#endif
1274 +
1275 +#define LOCALSZ 2 /* gp, ra */
1276 +#define FRAMESZ ((((NARGSAVE+LOCALSZ)*SZREG)+ALSZ)&ALMASK)
1277 +
1278 +#define RAOFF (FRAMESZ - (1*SZREG))
1279 +#define GPOFF (FRAMESZ - (2*SZREG))
1280 +
1281 +#define A0OFF (FRAMESZ + (0*SZREG))
1282 +#define A1OFF (FRAMESZ + (1*SZREG))
1283 +#define A2OFF (FRAMESZ + (2*SZREG))
1284 +#define A3OFF (FRAMESZ + (3*SZREG))
1285 +
1286 + .text
1287 +
1288 +#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
1289 +#define STUB_ENTRY(x) \
1290 + .if x < 10; \
1291 + .globl _ZN14nsXPTCStubBase5Stub ##x ##Ev; \
1292 + .type _ZN14nsXPTCStubBase5Stub ##x ##Ev,@function; \
1293 + .aent _ZN14nsXPTCStubBase5Stub ##x ##Ev,0; \
1294 +_ZN14nsXPTCStubBase5Stub ##x ##Ev:; \
1295 + SETUP_GP; \
1296 + li t0,x; \
1297 + b sharedstub; \
1298 + .elseif x < 100; \
1299 + .globl _ZN14nsXPTCStubBase6Stub ##x ##Ev; \
1300 + .type _ZN14nsXPTCStubBase6Stub ##x ##Ev,@function; \
1301 + .aent _ZN14nsXPTCStubBase6Stub ##x ##Ev,0; \
1302 +_ZN14nsXPTCStubBase6Stub ##x ##Ev:; \
1303 + SETUP_GP; \
1304 + li t0,x; \
1305 + b sharedstub; \
1306 + .elseif x < 1000; \
1307 + .globl _ZN14nsXPTCStubBase7Stub ##x ##Ev; \
1308 + .type _ZN14nsXPTCStubBase7Stub ##x ##Ev,@function; \
1309 + .aent _ZN14nsXPTCStubBase7Stub ##x ##Ev,0; \
1310 +_ZN14nsXPTCStubBase7Stub ##x ##Ev:; \
1311 + SETUP_GP; \
1312 + li t0,x; \
1313 + b sharedstub; \
1314 + .else; \
1315 + .err; \
1316 + .endif
1317 +#else /* not G++ V3 ABI */
1318 +#define STUB_ENTRY(x) \
1319 + .globl Stub ##x ##__14nsXPTCStubBase; \
1320 + .type Stub ##x ##__14nsXPTCStubBase,@function; \
1321 + .aent Stub ##x ##__14nsXPTCStubBase,0; \
1322 +Stub ##x ##__14nsXPTCStubBase:; \
1323 + SETUP_GP; \
1324 + li t0,x; \
1325 + b sharedstub
1326 +#endif /* G++ V3 ABI */
1327 +
1328 +# SENTINEL_ENTRY is handled in the cpp file.
1329 +#define SENTINEL_ENTRY(x)
1330 +
1331 +#
1332 +# open a dummy frame for the function entries
1333 +#
1334 + .align 2
1335 + .type dummy,@function
1336 + .ent dummy, 0
1337 + .frame sp, FRAMESZ, ra
1338 +dummy:
1339 + SETUP_GP
1340 +
1341 +#include "xptcstubsdef.inc"
1342 +
1343 +sharedstub:
1344 + subu sp, FRAMESZ
1345 +
1346 + # specify the save register mask for gp, ra, a0-a3
1347 + .mask 0x900000F0, RAOFF-FRAMESZ
1348 +
1349 + sw ra, RAOFF(sp)
1350 + SAVE_GP(GPOFF)
1351 +
1352 + # Micro-optimization: a0 is already loaded, and its slot gets
1353 + # ignored by PrepareAndDispatch, so no need to save it here.
1354 + # sw a0, A0OFF(sp)
1355 + sw a1, A1OFF(sp)
1356 + sw a2, A2OFF(sp)
1357 + sw a3, A3OFF(sp)
1358 +
1359 + la t9, PrepareAndDispatch
1360 +
1361 + # t0 is methodIndex
1362 + move a1, t0
1363 + # have a2 point to the begin of the argument space on stack
1364 + addiu a2, sp, FRAMESZ
1365 +
1366 + # PrepareAndDispatch(that, methodIndex, args)
1367 + jalr t9
1368 +
1369 + # Micro-optimization: Using jalr explicitly has the side-effect
1370 + # of not triggering .cprestore. This is ok because we have no
1371 + # gp reference below this point. It also allows better
1372 + # instruction sscheduling.
1373 + # lw gp, GPOFF(fp)
1374 +
1375 + lw ra, RAOFF(sp)
1376 + addiu sp, FRAMESZ
1377 + j ra
1378 + END(dummy)
1379 diff -urN mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp
1380 --- mozilla.old/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp 1970-01-01 10:00:00 +1000
1381 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ps2mips.cpp 2007-01-17 15:18:43 +1000
1382 @@ -0,0 +1,131 @@
1383 +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
1384 + * Version: MPL 1.1
1385 + *
1386 + * ***** BEGIN LICENSE BLOCK *****
1387 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1388 + *
1389 + * The contents of this file are subject to the Mozilla Public License Version
1390 + * 1.1 (the "License"); you may not use this file except in compliance with
1391 + * the License. You may obtain a copy of the License at
1392 + * http://www.mozilla.org/MPL/
1393 + *
1394 + * Software distributed under the License is distributed on an "AS IS" basis,
1395 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1396 + * for the specific language governing rights and limitations under the
1397 + * License.
1398 + *
1399 + * The Original Code is mozilla.org code.
1400 + *
1401 + * The Initial Developer of the Original Code is
1402 + * Netscape Communications Corp, Inc.
1403 + * Portions created by the Initial Developer are Copyright (C) 2001
1404 + * the Initial Developer. All Rights Reserved.
1405 + *
1406 + * Contributor(s):
1407 + * Stuart Parmenter <pavlov@××××××××.com>
1408 + *
1409 + * Alternatively, the contents of this file may be used under the terms of
1410 + * either of the GNU General Public License Version 2 or later (the "GPL"),
1411 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1412 + * in which case the provisions of the GPL or the LGPL are applicable instead
1413 + * of those above. If you wish to allow use of your version of this file only
1414 + * under the terms of either the GPL or the LGPL, and not to allow others to
1415 + * use your version of this file under the terms of the MPL, indicate your
1416 + * decision by deleting the provisions above and replace them with the notice
1417 + * and other provisions required by the GPL or the LGPL. If you do not delete
1418 + * the provisions above, a recipient may use your version of this file under
1419 + * the terms of any one of the MPL, the GPL or the LGPL.
1420 + *
1421 + * ***** END LICENSE BLOCK ***** */
1422 +
1423 +#include "xptcprivate.h"
1424 +
1425 +/*
1426 + * This is for MIPS O32 ABI
1427 + * Args contains a0-3 and then the stack.
1428 + * Because a0 is 'this', we want to skip it
1429 + */
1430 +extern "C" nsresult
1431 +PrepareAndDispatch(nsXPTCStubBase* self, PRUint32 methodIndex, PRUint32* args)
1432 +{
1433 + args++; // always skip over a0
1434 +
1435 +#define PARAM_BUFFER_COUNT 16
1436 +
1437 + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
1438 + nsXPTCMiniVariant* dispatchParams = NULL;
1439 + nsIInterfaceInfo* iface_info = NULL;
1440 + const nsXPTMethodInfo* info;
1441 + PRUint8 paramCount;
1442 + PRUint8 i;
1443 + nsresult result = NS_ERROR_FAILURE;
1444 +
1445 + NS_ASSERTION(self,"no self");
1446 +
1447 + self->GetInterfaceInfo(&iface_info);
1448 + NS_ASSERTION(iface_info,"no interface info");
1449 +
1450 + iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
1451 + NS_ASSERTION(info,"no interface info");
1452 +
1453 + paramCount = info->GetParamCount();
1454 +
1455 + // setup variant array pointer
1456 + if(paramCount > PARAM_BUFFER_COUNT)
1457 + dispatchParams = new nsXPTCMiniVariant[paramCount];
1458 + else
1459 + dispatchParams = paramBuffer;
1460 + NS_ASSERTION(dispatchParams,"no place for params");
1461 +
1462 + PRUint32* ap = args;
1463 + for(i = 0; i < paramCount; i++, ap++)
1464 + {
1465 + const nsXPTParamInfo& param = info->GetParam(i);
1466 + const nsXPTType& type = param.GetType();
1467 + nsXPTCMiniVariant* dp = &dispatchParams[i];
1468 +
1469 + if(param.IsOut() || !type.IsArithmetic())
1470 + {
1471 + dp->val.p = (void*) *ap;
1472 + continue;
1473 + }
1474 +
1475 + dp->val.p = (void*) *ap;
1476 +
1477 + switch(type)
1478 + {
1479 + case nsXPTType::T_I64 :
1480 + if ((PRWord)ap & 4) ap++;
1481 + dp->val.i64 = *((PRInt64*) ap); ap++;
1482 + break;
1483 + case nsXPTType::T_U64 :
1484 + if ((PRWord)ap & 4) ap++;
1485 + dp->val.u64 = *((PRInt64*) ap); ap++;
1486 + break;
1487 + case nsXPTType::T_DOUBLE:
1488 + if ((PRWord)ap & 4) ap++;
1489 + dp->val.d = *((double*) ap); ap++;
1490 + break;
1491 + }
1492 + }
1493 +
1494 + result = self->CallMethod((PRUint16)methodIndex, info, dispatchParams);
1495 +
1496 + NS_RELEASE(iface_info);
1497 +
1498 + if(dispatchParams != paramBuffer)
1499 + delete [] dispatchParams;
1500 +
1501 + return result;
1502 +}
1503 +
1504 +#define STUB_ENTRY(n) // done in the .s file
1505 +
1506 +#define SENTINEL_ENTRY(n) \
1507 +nsresult nsXPTCStubBase::Sentinel##n() \
1508 +{ \
1509 + NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
1510 + return NS_ERROR_NOT_IMPLEMENTED; \
1511 +}
1512 +
1513 +#include "xptcstubsdef.inc"
1514
1515
1516
1517 1.1 src/patchsets/xulrunner/1.8.1.19/007_mozilla-firefox-1.5-asneeded.patch
1518
1519 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/007_mozilla-firefox-1.5-asneeded.patch?rev=1.1&view=markup
1520 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/007_mozilla-firefox-1.5-asneeded.patch?rev=1.1&content-type=text/plain
1521
1522 Index: 007_mozilla-firefox-1.5-asneeded.patch
1523 ===================================================================
1524 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=311236
1525
1526 --- mozilla/embedding/browser/gtk/tests/Makefile.in.orig 2005-02-04 00:01:41.000000000 +0100
1527 +++ mozilla/embedding/browser/gtk/tests/Makefile.in 2006-04-28 05:21:10.000000000 +0200
1528 @@ -75,6 +75,8 @@
1529 endif
1530 endif
1531
1532 +OS_LDFLAGS += -Wl,-rpath-link,'$(DEPTH)/dist/bin'
1533 +
1534 ifdef MOZ_ENABLE_GTK
1535 LIBS += \
1536 -lgtkembedmoz \
1537
1538
1539
1540 1.1 src/patchsets/xulrunner/1.8.1.19/008_xulrunner-gentoo-pkgconfig-1.patch
1541
1542 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/008_xulrunner-gentoo-pkgconfig-1.patch?rev=1.1&view=markup
1543 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/008_xulrunner-gentoo-pkgconfig-1.patch?rev=1.1&content-type=text/plain
1544
1545 Index: 008_xulrunner-gentoo-pkgconfig-1.patch
1546 ===================================================================
1547 --- mozilla/config/autoconf.mk.in 2005-08-17 19:17:17.000000000 +0200
1548 +++ mozilla/config/autoconf.mk.in 2005-11-17 14:23:11.000000000 +0100
1549 @@ -54,13 +54,13 @@
1550 prefix = @prefix@
1551 exec_prefix = @exec_prefix@
1552 bindir = @bindir@
1553 -includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
1554 +includedir = $(mozappdir)/include
1555 libdir = @libdir@
1556 datadir = @datadir@
1557 mandir = @mandir@
1558 -idldir = @datadir@/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
1559 +idldir = $(mozappdir)/idl
1560
1561 -mozappdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
1562 +mozappdir = $(libdir)/$(MOZ_APP_NAME)
1563 mredir = $(libdir)/mre/mre-$(MOZ_APP_VERSION)
1564 mrelibdir = $(mredir)/lib
1565
1566 --- mozilla/build/unix/Makefile.in 2005-07-07 20:24:39.000000000 +0200
1567 +++ mozilla/build/unix/Makefile.in 2005-11-17 21:41:47.000000000 +0100
1568 @@ -61,6 +61,19 @@
1569 NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version)
1570 endif
1571
1572 +# Hack to make sure that mozilla-nss.pc has the proper nss dependencies
1573 +ifdef MOZ_NATIVE_NSS
1574 +FULL_NSS_CFLAGS=$(shell $(NSS_CONFIG) --cflags)
1575 +FULL_NSS_LIBS=$(shell $(NSS_CONFIG) --libs)
1576 +NSS_NAME=nss
1577 +NSS_VERSION=$(shell $(NSS_CONFIG) --version)
1578 +else
1579 +FULL_NSS_CFLAGS=-I$(includedir)/nss
1580 +FULL_NSS_LIBS=-L$(mozappdir)/nss -lnss3 -lsmime3 -lssl3 -lsoftokn3
1581 +NSS_NAME=$(MOZ_APP_NAME)-nss
1582 +NSS_VERSION=$(MOZ_APP_VERSION)
1583 +endif
1584 +
1585 ifdef MOZ_ENABLE_GTK
1586 SUPERWIN_LIBS=-lgtksuperwin
1587 endif
1588 @@ -82,7 +82,8 @@
1589 -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
1590 -e "s|%DEFS%|$(_DEFS)|" \
1591 -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
1592 - -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@
1593 + -e 's|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|' \
1594 + -e 's|\(echo -L.*\)\($$\)|\1 -Wl,-R$(mozappdir)\2|' > $@
1595
1596 $(MOZ_APP_NAME)-%.pc : mozilla-%.pc.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
1597 cat $< | sed \
1598 @@ -99,7 +112,12 @@
1599 -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
1600 -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
1601 -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
1602 - -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" > $@
1603 + -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \
1604 + -e "s|%FULL_NSS_LIBS%|$(FULL_NSS_LIBS)|" \
1605 + -e "s|%FULL_NSS_CFLAGS%|$(FULL_NSS_CFLAGS)|" \
1606 + -e "s|%NSS_NAME%|$(NSS_NAME)|" \
1607 + -e "s|%NSS_VERSION%|$(NSS_VERSION)|" \
1608 + -e "s|\(^Libs: -L.*\)|\1 -Wl,-R\$$\{libdir}|" > $@
1609
1610 libs:: $(MOZ_APP_NAME)-config
1611 chmod 755 $<
1612 --- mozilla/build/unix/mozilla-js.pc.in.orig 2005-07-05 23:21:52.000000000 +0000
1613 +++ mozilla/build/unix/mozilla-js.pc.in 2006-01-15 10:03:00.000000000 +0000
1614 @@ -6,6 +6,6 @@
1615 Name: JavaScript
1616 Description: The Mozilla JavaScript Library
1617 Version: %MOZILLA_VERSION%
1618 -Requires: %NSPR_NAME% >= %NSPR_VERSION%
1619 +Requires: %MOZ_APP_NAME%-%NSPR_NAME% >= %NSPR_VERSION%
1620 Libs: -L${libdir} -lmozjs
1621 Cflags: -I${includedir}/js -DXP_UNIX
1622 --- mozilla/build/unix/mozilla-nspr.pc.in.orig 2005-07-05 23:21:52.000000000 +0000
1623 +++ mozilla/build/unix/mozilla-nspr.pc.in 2006-01-15 10:01:16.000000000 +0000
1624 @@ -1,12 +1,5 @@
1625 -prefix=%prefix%
1626 -exec_prefix=%exec_prefix%
1627 -libdir=%libdir%
1628 -includedir=%includedir%
1629 -
1630 Name: NSPR
1631 Description: The Netscape Portable Runtime
1632 Version: %NSPR_VERSION%
1633 -Libs: %FULL_NSPR_LIBS%
1634 -Cflags: %FULL_NSPR_CFLAGS%
1635 -
1636 +Requires: %NSPR_NAME% >= %NSPR_VERSION%
1637
1638 --- mozilla/build/unix/mozilla-xpcom.pc.in.orig 2005-07-05 23:21:52.000000000 +0000
1639 +++ mozilla/build/unix/mozilla-xpcom.pc.in 2006-01-15 10:02:34.000000000 +0000
1640 @@ -7,6 +7,6 @@
1641 Name: XPCOM
1642 Description: The Mozilla Cross Platform Component Library
1643 Version: %MOZILLA_VERSION%
1644 -Requires: %NSPR_NAME% >= %NSPR_VERSION%
1645 +Requires: %MOZ_APP_NAME%-%NSPR_NAME% >= %NSPR_VERSION%
1646 Libs: -L${libdir} -lxpcom
1647 Cflags: -I${includedir} -I${includedir}/xpcom -I${includedir}/string
1648 --- mozilla/build/unix/mozilla-nss.pc.in.orig 2005-07-05 23:21:52.000000000 +0000
1649 +++ mozilla/build/unix/mozilla-nss.pc.in 2006-01-15 10:26:13.000000000 +0000
1650 @@ -1,11 +1,4 @@
1651 -prefix=%prefix%
1652 -exec_prefix=%exec_prefix%
1653 -libdir=%libdir%
1654 -includedir=%includedir%
1655 -
1656 Name: NSS
1657 Description: Mozilla Network Security Services
1658 -Version: %MOZILLA_VERSION%
1659 -Requires: %NSPR_NAME% >= %NSPR_VERSION%
1660 -Libs: -L${libdir} -lnss3 -lsmime3 -lssl3 -lsoftokn3
1661 -Cflags: -I${includedir}/nss
1662 +Version: %NSS_VERSION%
1663 +Requires: %NSS_NAME% >= %NSS_VERSION%
1664
1665
1666
1667 1.1 src/patchsets/xulrunner/1.8.1.19/010_visibility-gcc-4.2.patch
1668
1669 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/010_visibility-gcc-4.2.patch?rev=1.1&view=markup
1670 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/010_visibility-gcc-4.2.patch?rev=1.1&content-type=text/plain
1671
1672 Index: 010_visibility-gcc-4.2.patch
1673 ===================================================================
1674 --- configure.in.orig 2007-10-12 20:39:27.000000000 +0200
1675 +++ configure.in 2007-10-12 20:40:49.000000000 +0200
1676 @@ -2657,8 +2657,7 @@
1677 ])
1678 if test "$ac_cv_have_visibility_builtin_bug" = "no" -a \
1679 "$ac_cv_have_visibility_class_bug" = "no"; then
1680 - VISIBILITY_FLAGS='-I$(DIST)/include/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
1681 - WRAP_SYSTEM_INCLUDES=1
1682 + VISIBILITY_FLAGS='-fvisibility=hidden'
1683 else
1684 VISIBILITY_FLAGS='-fvisibility=hidden'
1685 fi # have visibility pragma bug
1686
1687
1688
1689 1.1 src/patchsets/xulrunner/1.8.1.19/016_firefox-nss-3.12-asneeded.patch
1690
1691 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/016_firefox-nss-3.12-asneeded.patch?rev=1.1&view=markup
1692 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/016_firefox-nss-3.12-asneeded.patch?rev=1.1&content-type=text/plain
1693
1694 Index: 016_firefox-nss-3.12-asneeded.patch
1695 ===================================================================
1696 # Fix a FTBFS with system libnss (caused by bad linking order with libcrmf)
1697 # by Fabien Tassin <fta@×××××××××.org>
1698
1699 Index: seamonkey-1.1.4/configure.in
1700 ===================================================================
1701 --- seamonkey-1.1.4.orig/configure.in
1702 +++ seamonkey-1.1.4/configure.in
1703 @@ -3735,17 +3735,17 @@
1704 [ --with-system-nss Use system installed NSS],
1705 _USE_SYSTEM_NSS=1 )
1706
1707 if test -n "$_USE_SYSTEM_NSS"; then
1708 AM_PATH_NSS(3.0.0, [MOZ_NATIVE_NSS=1], [MOZ_NATIVE_NSS=])
1709 fi
1710
1711 if test -n "$MOZ_NATIVE_NSS"; then
1712 - NSS_LIBS="$NSS_LIBS -lcrmf"
1713 + NSS_LIBS=" -lcrmf $NSS_LIBS"
1714 else
1715 NSS_CFLAGS='-I$(DIST)/public/nss'
1716 NSS_DEP_LIBS='\\\
1717 $(DIST)/lib/$(LIB_PREFIX)crmf.$(LIB_SUFFIX) \\\
1718 $(DIST)/lib/$(DLL_PREFIX)smime'$NSS_VERSION'$(DLL_SUFFIX) \\\
1719 $(DIST)/lib/$(DLL_PREFIX)ssl'$NSS_VERSION'$(DLL_SUFFIX) \\\
1720 $(DIST)/lib/$(DLL_PREFIX)nss'$NSS_VERSION'$(DLL_SUFFIX) \\\
1721 $(DIST)/lib/$(DLL_PREFIX)softokn'$NSS_VERSION'$(DLL_SUFFIX)'
1722
1723
1724
1725
1726 1.1 src/patchsets/xulrunner/1.8.1.19/032_firefox-2.0_ppc64-1.patch
1727
1728 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/032_firefox-2.0_ppc64-1.patch?rev=1.1&view=markup
1729 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/032_firefox-2.0_ppc64-1.patch?rev=1.1&content-type=text/plain
1730
1731 Index: 032_firefox-2.0_ppc64-1.patch
1732 ===================================================================
1733 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=361415
1734
1735 unchanged:
1736 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-21 17:09:28.000000000 +0000
1737 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-20 10:13:38.000000000 +0000
1738 @@ -267,6 +267,11 @@
1739 ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
1740 AS := $(CC) -c -x assembler-with-cpp
1741 endif
1742 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc64)
1743 +CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
1744 +ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
1745 +AS := $(CC) -c -x assembler-with-cpp
1746 +endif
1747
1748 #
1749 # NetBSD/PPC
1750 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
1751 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-21 14:01:45.000000000 +0000
1752 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-22 10:43:26.000000000 +0000
1753 @@ -0,0 +1,154 @@
1754 +// -*- Mode: Asm -*-
1755 +//
1756 +// The contents of this file are subject to the Netscape Public
1757 +// License Version 1.1 (the "License"); you may not use this file
1758 +// except in compliance with the License. You may obtain a copy of
1759 +// the License at http://www.mozilla.org/NPL/
1760 +//
1761 +// Software distributed under the License is distributed on an "AS
1762 +// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
1763 +// implied. See the License for the specific language governing
1764 +// rights and limitations under the License.
1765 +//
1766 +// The Original Code is mozilla.org code.
1767 +//
1768 +// The Initial Developer of the Original Code is Netscape
1769 +// Communications Corporation. Portions created by Netscape are
1770 +// Copyright (C) 1999 Netscape Communications Corporation. All
1771 +// Rights Reserved.
1772 +//
1773 +// Contributor(s):
1774 +// dwmw2@×××××××××.org (David Woodhouse)
1775 +// Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
1776 +// beard@××××××××.com (Patrick Beard)
1777 +// waterson@××××××××.com (Chris Waterson)
1778 +//
1779 +
1780 +.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4
1781 +.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
1782 +.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
1783 +.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
1784 +.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
1785 +.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
1786 +.set r30,30; .set r31,31
1787 +.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
1788 +.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
1789 +.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
1790 +.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
1791 +.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
1792 +.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
1793 +.set f30,30; .set f31,31
1794 +
1795 +
1796 +//
1797 +// XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
1798 +// PRUint32 paramCount, nsXPTCVariant* params)
1799 +//
1800 +
1801 + .section ".toc","aw"
1802 + .section ".text"
1803 + .align 2
1804 + .globl XPTC_InvokeByIndex
1805 + .section ".opd","aw"
1806 + .align 3
1807 +XPTC_InvokeByIndex:
1808 + .quad .XPTC_InvokeByIndex,.TOC.@tocbase
1809 + .previous
1810 + .type XPTC_InvokeByIndex,@function
1811 +.XPTC_InvokeByIndex:
1812 + mflr 0
1813 + std 0,16(r1)
1814 +
1815 + std r29,-24(r1)
1816 + std r30,-16(r1)
1817 + std r31,-8(r1)
1818 +
1819 + mr r29,r3 // Save 'that' in r29
1820 + mr r30,r4 // Save 'methodIndex' in r30
1821 + mr r31,r1 // Save old frame
1822 +
1823 + // Allocate stack frame with space for params. Since at least the
1824 + // first 7 parameters (not including 'that') will be in registers,
1825 + // we don't actually need stack space for those. We must ensure
1826 + // that the stack remains 16-byte aligned.
1827 + //
1828 + // | ..128-byte stack frame.. | | 7 GP | 13 FP | 3 NV |
1829 + // | |(params)........| regs | regs | regs |
1830 + // (r1)...........(+112)....(+128)
1831 + // (-23*8).(-16*8).(-3*8)..(r31)
1832 +
1833 + // +stack frame, -unused stack params, +regs storage, +1 for alignment
1834 + addi r7,r5,((112/8)-7+7+13+3+1)
1835 + rldicr r7,r7,3,59 // multiply by 8 and mask with ~15
1836 + neg r7,r7
1837 + stdux r1,r1,r7
1838 +
1839 +
1840 + // Call invoke_copy_to_stack(PRUint64* gpregs, double* fpregs,
1841 + // PRUint32 paramCount, nsXPTCVariant* s,
1842 + // PRUint64* d))
1843 +
1844 + // r5, r6 are passed through intact (paramCount, params)
1845 + // r7 (d) has to be r1+112 -- where parameters are passed on the stack.
1846 + // r3, r4 are above that, easier to address from r31 than from r1
1847 +
1848 + subi r3,r31,(23*8) // r3 --> GPRS
1849 + subi r4,r31,(16*8) // r4 --> FPRS
1850 + addi r7,r1,112 // r7 --> params
1851 + bl invoke_copy_to_stack
1852 + nop
1853 +
1854 + // Set up to invoke function
1855 +
1856 + ld r9,0(r29) // vtable (r29 is 'that')
1857 + mr r3,r29 // self is first arg, obviously
1858 +
1859 + sldi r30,r30,3 // Find function descriptor
1860 + add r9,r9,r30
1861 + ld r9,0(r9)
1862 +
1863 + ld r0,0(r9) // Actual address from fd.
1864 + std r2,40(r1) // Save r2 (TOC pointer)
1865 +
1866 + mtctr 0
1867 + ld r11,16(r9) // Environment pointer from fd.
1868 + ld r2,8(r9) // TOC pointer from fd.
1869 +
1870 + // Load FP and GP registers as required
1871 + ld r4, -(23*8)(r31)
1872 + ld r5, -(22*8)(r31)
1873 + ld r6, -(21*8)(r31)
1874 + ld r7, -(20*8)(r31)
1875 + ld r8, -(19*8)(r31)
1876 + ld r9, -(18*8)(r31)
1877 + ld r10, -(17*8)(r31)
1878 +
1879 + lfd f1, -(16*8)(r31)
1880 + lfd f2, -(15*8)(r31)
1881 + lfd f3, -(14*8)(r31)
1882 + lfd f4, -(13*8)(r31)
1883 + lfd f5, -(12*8)(r31)
1884 + lfd f6, -(11*8)(r31)
1885 + lfd f7, -(10*8)(r31)
1886 + lfd f8, -(9*8)(r31)
1887 + lfd f9, -(8*8)(r31)
1888 + lfd f10, -(7*8)(r31)
1889 + lfd f11, -(6*8)(r31)
1890 + lfd f12, -(5*8)(r31)
1891 + lfd f13, -(4*8)(r31)
1892 +
1893 + bctrl // Do it
1894 +
1895 + ld r2,40(r1) // Load our own TOC pointer
1896 + ld r1,0(r1) // Revert stack frame
1897 + ld 0,16(r1) // Reload lr
1898 + ld 29,-24(r1) // Restore NVGPRS
1899 + ld 30,-16(r1)
1900 + ld 31,-8(r1)
1901 + mtlr 0
1902 + blr
1903 +
1904 + .size XPTC_InvokeByIndex,.-.XPTC_InvokeByIndex
1905 +
1906 + /* Magic indicating no need for an executable stack */
1907 + .section .note.GNU-stack, "", @progbits ; .previous
1908 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 1970-01-01 01:00:00.000000000 +0100
1909 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 2006-11-21 17:00:06.000000000 +0000
1910 @@ -0,0 +1,127 @@
1911 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
1912 +/* ***** BEGIN LICENSE BLOCK *****
1913 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1914 + *
1915 + * The contents of this file are subject to the Mozilla Public License Version
1916 + * 1.1 (the "License"); you may not use this file except in compliance with
1917 + * the License. You may obtain a copy of the License at
1918 + * http://www.mozilla.org/MPL/
1919 + *
1920 + * Software distributed under the License is distributed on an "AS IS" basis,
1921 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1922 + * for the specific language governing rights and limitations under the
1923 + * License.
1924 + *
1925 + * The Original Code is mozilla.org code.
1926 + *
1927 + * The Initial Developer of the Original Code is
1928 + * Netscape Communications Corporation.
1929 + * Portions created by the Initial Developer are Copyright (C) 1998
1930 + * the Initial Developer. All Rights Reserved.
1931 + *
1932 + * Contributor(s):
1933 + * dwmw2@×××××××××.org (David Woodhouse)
1934 + * Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
1935 + * beard@××××××××.com (Patrick Beard)
1936 + * waterson@××××××××.com (Chris Waterson)
1937 + *
1938 + * Alternatively, the contents of this file may be used under the terms of
1939 + * either of the GNU General Public License Version 2 or later (the "GPL"),
1940 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1941 + * in which case the provisions of the GPL or the LGPL are applicable instead
1942 + * of those above. If you wish to allow use of your version of this file only
1943 + * under the terms of either the GPL or the LGPL, and not to allow others to
1944 + * use your version of this file under the terms of the MPL, indicate your
1945 + * decision by deleting the provisions above and replace them with the notice
1946 + * and other provisions required by the GPL or the LGPL. If you do not delete
1947 + * the provisions above, a recipient may use your version of this file under
1948 + * the terms of any one of the MPL, the GPL or the LGPL.
1949 + *
1950 + * ***** END LICENSE BLOCK ***** */
1951 +
1952 +// Platform specific code to invoke XPCOM methods on native objects
1953 +
1954 +// The purpose of XPTC_InvokeByIndex() is to map a platform
1955 +// independent call to the platform ABI. To do that,
1956 +// XPTC_InvokeByIndex() has to determine the method to call via vtable
1957 +// access. The parameters for the method are read from the
1958 +// nsXPTCVariant* and prepared for the native ABI.
1959 +
1960 +#include <stdio.h>
1961 +#include "xptcprivate.h"
1962 +
1963 +// 8 integral parameters are passed in registers, not including 'that'
1964 +#define GPR_COUNT 7
1965 +
1966 +// 8 floating point parameters are passed in registers, floats are
1967 +// promoted to doubles when passed in registers
1968 +#define FPR_COUNT 13
1969 +
1970 +extern "C" PRUint32
1971 +invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
1972 +{
1973 + return PRUint32(((paramCount * 2) + 3) & ~3);
1974 +}
1975 +
1976 +extern "C" void
1977 +invoke_copy_to_stack(PRUint64* gpregs,
1978 + double* fpregs,
1979 + PRUint32 paramCount,
1980 + nsXPTCVariant* s,
1981 + PRUint64* d)
1982 +{
1983 + PRUint64 tempu64;
1984 +
1985 + for(uint32 i = 0; i < paramCount; i++, s++) {
1986 + if(s->IsPtrData())
1987 + tempu64 = (PRUint64) s->ptr;
1988 + else {
1989 + switch(s->type) {
1990 + case nsXPTType::T_FLOAT: break;
1991 + case nsXPTType::T_DOUBLE: break;
1992 + case nsXPTType::T_I8: tempu64 = s->val.i8; break;
1993 + case nsXPTType::T_I16: tempu64 = s->val.i16; break;
1994 + case nsXPTType::T_I32: tempu64 = s->val.i32; break;
1995 + case nsXPTType::T_I64: tempu64 = s->val.i64; break;
1996 + case nsXPTType::T_U8: tempu64 = s->val.u8; break;
1997 + case nsXPTType::T_U16: tempu64 = s->val.u16; break;
1998 + case nsXPTType::T_U32: tempu64 = s->val.u32; break;
1999 + case nsXPTType::T_U64: tempu64 = s->val.u64; break;
2000 + case nsXPTType::T_BOOL: tempu64 = s->val.b; break;
2001 + case nsXPTType::T_CHAR: tempu64 = s->val.c; break;
2002 + case nsXPTType::T_WCHAR: tempu64 = s->val.wc; break;
2003 + default: tempu64 = (PRUint64) s->val.p; break;
2004 + }
2005 + }
2006 +
2007 + if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
2008 + if (i < FPR_COUNT)
2009 + fpregs[i] = s->val.d;
2010 + else
2011 + *(double *)d = s->val.d;
2012 + }
2013 + else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
2014 + if (i < FPR_COUNT) {
2015 + fpregs[i] = s->val.f; // if passed in registers, floats are promoted to doubles
2016 + } else {
2017 + float *p = (float *)d;
2018 + p++;
2019 + *p = s->val.f;
2020 + }
2021 + }
2022 + else {
2023 + if (i < GPR_COUNT)
2024 + gpregs[i] = tempu64;
2025 + else
2026 + *d = tempu64;
2027 + }
2028 + if (i >= 7)
2029 + d++;
2030 + }
2031 +}
2032 +
2033 +extern "C"
2034 +XPTC_PUBLIC_API(nsresult)
2035 +XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
2036 + PRUint32 paramCount, nsXPTCVariant* params);
2037 +
2038 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
2039 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-21 16:38:52.000000000 +0000
2040 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-22 10:51:14.000000000 +0000
2041 @@ -0,0 +1,102 @@
2042 +// -*- Mode: Asm -*-
2043 +//
2044 +// The contents of this file are subject to the Netscape Public
2045 +// License Version 1.1 (the "License"); you may not use this file
2046 +// except in compliance with the License. You may obtain a copy of
2047 +// the License at http://www.mozilla.org/NPL/
2048 +//
2049 +// Software distributed under the License is distributed on an "AS
2050 +// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
2051 +// implied. See the License for the specific language governing
2052 +// rights and limitations under the License.
2053 +//
2054 +// The Original Code is mozilla.org code.
2055 +//
2056 +// The Initial Developer of the Original Code is Netscape
2057 +// Communications Corporation. Portions created by Netscape are
2058 +// Copyright (C) 1999 Netscape Communications Corporation. All
2059 +// Rights Reserved.
2060 +//
2061 +// Contributor(s):
2062 +// dwmw2@×××××××××.org (David Woodhouse)
2063 +// Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
2064 +// beard@××××××××.com (Patrick Beard)
2065 +// waterson@××××××××.com (Chris Waterson)
2066 +//
2067 +
2068 +.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4
2069 +.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
2070 +.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
2071 +.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
2072 +.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
2073 +.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
2074 +.set r30,30; .set r31,31
2075 +.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
2076 +.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
2077 +.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
2078 +.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
2079 +.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
2080 +.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
2081 +.set f30,30; .set f31,31
2082 +
2083 + .section ".text"
2084 + .align 2
2085 + .globl SharedStub
2086 + .section ".opd","aw"
2087 + .align 3
2088 +
2089 +SharedStub:
2090 + .quad .SharedStub,.TOC.@tocbase
2091 + .previous
2092 + .type SharedStub,@function
2093 +
2094 +.SharedStub:
2095 + mflr r0
2096 +
2097 + std r4, -56(r1) // Save all GPRS
2098 + std r5, -48(r1)
2099 + std r6, -40(r1)
2100 + std r7, -32(r1)
2101 + std r8, -24(r1)
2102 + std r9, -16(r1)
2103 + std r10, -8(r1)
2104 +
2105 + stfd f13, -64(r1) // ... and FPRS
2106 + stfd f12, -72(r1)
2107 + stfd f11, -80(r1)
2108 + stfd f10, -88(r1)
2109 + stfd f9, -96(r1)
2110 + stfd f8, -104(r1)
2111 + stfd f7, -112(r1)
2112 + stfd f6, -120(r1)
2113 + stfd f5, -128(r1)
2114 + stfd f4, -136(r1)
2115 + stfd f3, -144(r1)
2116 + stfd f2, -152(r1)
2117 + stfd f1, -160(r1)
2118 +
2119 + subi r6,r1,56 // r6 --> gprData
2120 + subi r7,r1,160 // r7 --> fprData
2121 + addi r5,r1,112 // r5 --> extra stack args
2122 +
2123 + std r0, 16(r1)
2124 +
2125 + stdu r1,-288(r1)
2126 + // r3 has the 'self' pointer already
2127 +
2128 + mr r4,r11 // r4 is methodIndex selector, passed
2129 + // via r11 in the nsXPTCStubBase::StubXX() call
2130 +
2131 + bl PrepareAndDispatch
2132 + nop
2133 +
2134 + ld 1,0(r1) // restore stack
2135 + ld r0,16(r1) // restore LR
2136 + mtlr r0
2137 + blr
2138 +
2139 + .size SharedStub,.-.SharedStub
2140 +
2141 +
2142 +/* Magic indicating no need for an executable stack */
2143 +.section .note.GNU-stack, "", @progbits ; .previous
2144 unchanged:
2145 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 1970-01-01 01:00:00.000000000 +0100
2146 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 2006-11-21 16:59:46.000000000 +0000
2147 @@ -0,0 +1,247 @@
2148 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2149 +/* ***** BEGIN LICENSE BLOCK *****
2150 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2151 + *
2152 + * The contents of this file are subject to the Mozilla Public License Version
2153 + * 1.1 (the "License"); you may not use this file except in compliance with
2154 + * the License. You may obtain a copy of the License at
2155 + * http://www.mozilla.org/MPL/
2156 + *
2157 + * Software distributed under the License is distributed on an "AS IS" basis,
2158 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2159 + * for the specific language governing rights and limitations under the
2160 + * License.
2161 + *
2162 + * The Original Code is mozilla.org code.
2163 + *
2164 + * The Initial Developer of the Original Code is
2165 + * Netscape Communications Corporation.
2166 + * Portions created by the Initial Developer are Copyright (C) 1999
2167 + * the Initial Developer. All Rights Reserved.
2168 + *
2169 + * Contributor(s):
2170 + * dwmw2@×××××××××.org (David Woodhouse)
2171 + * Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
2172 + * beard@××××××××.com (Patrick Beard)
2173 + * waterson@××××××××.com (Chris Waterson)
2174 + *
2175 + * Alternatively, the contents of this file may be used under the terms of
2176 + * either of the GNU General Public License Version 2 or later (the "GPL"),
2177 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2178 + * in which case the provisions of the GPL or the LGPL are applicable instead
2179 + * of those above. If you wish to allow use of your version of this file only
2180 + * under the terms of either the GPL or the LGPL, and not to allow others to
2181 + * use your version of this file under the terms of the MPL, indicate your
2182 + * decision by deleting the provisions above and replace them with the notice
2183 + * and other provisions required by the GPL or the LGPL. If you do not delete
2184 + * the provisions above, a recipient may use your version of this file under
2185 + * the terms of any one of the MPL, the GPL or the LGPL.
2186 + *
2187 + * ***** END LICENSE BLOCK ***** */
2188 +
2189 +// Implement shared vtbl methods.
2190 +
2191 +#include "xptcprivate.h"
2192 +
2193 +// The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral
2194 +// parameters and the first 13 floating point parameters in registers
2195 +// (r3-r10 and f1-f13), no stack space is allocated for these by the
2196 +// caller. The rest of the parameters are passed in the callers stack
2197 +// area. The stack pointer has to retain 16-byte alignment, longlongs
2198 +// and doubles are aligned on 8-byte boundaries.
2199 +
2200 +#define PARAM_BUFFER_COUNT 16
2201 +#define GPR_COUNT 7
2202 +#define FPR_COUNT 13
2203 +
2204 +// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
2205 +//
2206 +// - 'args[]' contains the arguments passed on stack
2207 +// - 'gprData[]' contains the arguments passed in integer registers
2208 +// - 'fprData[]' contains the arguments passed in floating point registers
2209 +//
2210 +// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
2211 +// and then the method gets called.
2212 +#include <stdio.h>
2213 +extern "C" nsresult
2214 +PrepareAndDispatch(nsXPTCStubBase* self,
2215 + PRUint64 methodIndex,
2216 + PRUint64* args,
2217 + PRUint64 *gprData,
2218 + double *fprData)
2219 +{
2220 + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
2221 + nsXPTCMiniVariant* dispatchParams = NULL;
2222 + nsIInterfaceInfo* iface_info = NULL;
2223 + const nsXPTMethodInfo* info;
2224 + PRUint32 paramCount;
2225 + PRUint32 i;
2226 + nsresult result = NS_ERROR_FAILURE;
2227 +
2228 + NS_ASSERTION(self,"no self");
2229 +
2230 + self->GetInterfaceInfo(&iface_info);
2231 + NS_ASSERTION(iface_info,"no interface info");
2232 + if (! iface_info)
2233 + return NS_ERROR_UNEXPECTED;
2234 +
2235 + iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
2236 + NS_ASSERTION(info,"no method info");
2237 + if (! info)
2238 + return NS_ERROR_UNEXPECTED;
2239 +
2240 + paramCount = info->GetParamCount();
2241 +
2242 + // setup variant array pointer
2243 + if(paramCount > PARAM_BUFFER_COUNT)
2244 + dispatchParams = new nsXPTCMiniVariant[paramCount];
2245 + else
2246 + dispatchParams = paramBuffer;
2247 +
2248 + NS_ASSERTION(dispatchParams,"no place for params");
2249 + if (! dispatchParams)
2250 + return NS_ERROR_OUT_OF_MEMORY;
2251 +
2252 + PRUint64* ap = args;
2253 + PRUint64 tempu64;
2254 +
2255 + for(i = 0; i < paramCount; i++) {
2256 + const nsXPTParamInfo& param = info->GetParam(i);
2257 + const nsXPTType& type = param.GetType();
2258 + nsXPTCMiniVariant* dp = &dispatchParams[i];
2259 +
2260 + if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
2261 + if (i < FPR_COUNT)
2262 + dp->val.d = fprData[i];
2263 + else
2264 + dp->val.d = *(double*) ap;
2265 + } else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
2266 + if (i < FPR_COUNT)
2267 + dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles
2268 + else {
2269 + float *p = (float *)ap;
2270 + p++;
2271 + dp->val.f = *p;
2272 + }
2273 + } else { /* integer type or pointer */
2274 + if (i < GPR_COUNT)
2275 + tempu64 = gprData[i];
2276 + else
2277 + tempu64 = *ap;
2278 +
2279 + if (param.IsOut() || !type.IsArithmetic())
2280 + dp->val.p = (void*) tempu64;
2281 + else if (type ==nsXPTType::T_I8)
2282 + dp->val.i8 = (PRInt8) tempu64;
2283 + else if (type ==nsXPTType::T_I16)
2284 + dp->val.i16 = (PRInt16) tempu64;
2285 + else if (type ==nsXPTType::T_I32)
2286 + dp->val.i32 = (PRInt32) tempu64;
2287 + else if (type ==nsXPTType::T_I64)
2288 + dp->val.i64 = (PRInt64) tempu64;
2289 + else if (type ==nsXPTType::T_U8)
2290 + dp->val.u8 = (PRUint8) tempu64;
2291 + else if (type ==nsXPTType::T_U16)
2292 + dp->val.u16 = (PRUint16) tempu64;
2293 + else if (type ==nsXPTType::T_U32)
2294 + dp->val.u32 = (PRUint32) tempu64;
2295 + else if (type ==nsXPTType::T_U64)
2296 + dp->val.u64 = (PRUint64) tempu64;
2297 + else if (type ==nsXPTType::T_BOOL)
2298 + dp->val.b = (PRBool) tempu64;
2299 + else if (type ==nsXPTType::T_CHAR)
2300 + dp->val.c = (char) tempu64;
2301 + else if (type ==nsXPTType::T_WCHAR)
2302 + dp->val.wc = (wchar_t) tempu64;
2303 + else
2304 + NS_ASSERTION(0, "bad type");
2305 + }
2306 +
2307 + if (i >= 7)
2308 + ap++;
2309 + }
2310 +
2311 + result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
2312 +
2313 + NS_RELEASE(iface_info);
2314 +
2315 + if (dispatchParams != paramBuffer)
2316 + delete [] dispatchParams;
2317 +
2318 + return result;
2319 +}
2320 +
2321 +// Load r11 with the constant 'n' and branch to SharedStub().
2322 +//
2323 +// XXX Yes, it's ugly that we're relying on gcc's name-mangling here;
2324 +// however, it's quick, dirty, and'll break when the ABI changes on
2325 +// us, which is what we want ;-).
2326 +
2327 +#if __GXX_ABI_VERSION < 100
2328 +#error Prehistoric GCC not supported here
2329 +#else
2330 +// gcc-3 version
2331 +//
2332 +// As G++3 ABI contains the length of the functionname in the mangled
2333 +// name, it is difficult to get a generic assembler mechanism like
2334 +// in the G++ 2.95 case.
2335 +// Create names would be like:
2336 +// _ZN14nsXPTCStubBase5Stub1Ev
2337 +// _ZN14nsXPTCStubBase6Stub12Ev
2338 +// _ZN14nsXPTCStubBase7Stub123Ev
2339 +// _ZN14nsXPTCStubBase8Stub1234Ev
2340 +// etc.
2341 +// Use assembler directives to get the names right...
2342 +
2343 +# define STUB_ENTRY(n) \
2344 +__asm__ ( \
2345 + ".section \".toc\",\"aw\" \n\t" \
2346 + ".section \".text\" \n\t" \
2347 + ".align 2 \n\t" \
2348 + ".if "#n" < 10 \n\t" \
2349 + ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
2350 + ".section \".opd\",\"aw\" \n\t" \
2351 + ".align 3 \n\t" \
2352 +"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
2353 + ".quad ._ZN14nsXPTCStubBase5Stub"#n"Ev,.TOC.@tocbase \n\t" \
2354 + ".previous \n\t" \
2355 + ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \
2356 +"._ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
2357 + \
2358 + ".elseif "#n" < 100 \n\t" \
2359 + ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
2360 + ".section \".opd\",\"aw\" \n\t" \
2361 + ".align 3 \n\t" \
2362 +"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
2363 + ".quad ._ZN14nsXPTCStubBase6Stub"#n"Ev,.TOC.@tocbase \n\t" \
2364 + ".previous \n\t" \
2365 + ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \
2366 +"._ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
2367 + \
2368 + ".elseif "#n" < 1000 \n\t" \
2369 + ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
2370 + ".section \".opd\",\"aw\" \n\t" \
2371 + ".align 3 \n\t" \
2372 +"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
2373 + ".quad ._ZN14nsXPTCStubBase7Stub"#n"Ev,.TOC.@tocbase \n\t" \
2374 + ".previous \n\t" \
2375 + ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \
2376 +"._ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
2377 + \
2378 + ".else \n\t" \
2379 + ".err \"stub number "#n" >= 1000 not yet supported\"\n" \
2380 + ".endif \n\t" \
2381 + \
2382 + "li 11,"#n" \n\t" \
2383 + "b SharedStub \n" \
2384 +);
2385 +#endif
2386 +
2387 +#define SENTINEL_ENTRY(n) \
2388 +nsresult nsXPTCStubBase::Sentinel##n() \
2389 +{ \
2390 + NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
2391 + return NS_ERROR_NOT_IMPLEMENTED; \
2392 +}
2393 +
2394 +#include "xptcstubsdef.inc"
2395
2396
2397
2398 1.1 src/patchsets/xulrunner/1.8.1.19/033_firefox-2.0_ppc_powerpc.patch
2399
2400 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/033_firefox-2.0_ppc_powerpc.patch?rev=1.1&view=markup
2401 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/033_firefox-2.0_ppc_powerpc.patch?rev=1.1&content-type=text/plain
2402
2403 Index: 033_firefox-2.0_ppc_powerpc.patch
2404 ===================================================================
2405 --- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2007-03-05 13:46:38.000000000 +0100
2406 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2007-03-05 13:47:30.000000000 +0100
2407 @@ -288,12 +288,12 @@
2408 #
2409 # Linux/PPC
2410 #
2411 -ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc)
2412 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
2413 CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
2414 ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
2415 AS := $(CC) -c -x assembler-with-cpp
2416 endif
2417 -ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc64)
2418 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
2419 CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
2420 ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
2421 AS := $(CC) -c -x assembler-with-cpp
2422
2423
2424
2425 1.1 src/patchsets/xulrunner/1.8.1.19/050_respect-host-variable.patch
2426
2427 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/050_respect-host-variable.patch?rev=1.1&view=markup
2428 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/050_respect-host-variable.patch?rev=1.1&content-type=text/plain
2429
2430 Index: 050_respect-host-variable.patch
2431 ===================================================================
2432 # https://bugs.gentoo.org/show_bug.cgi?id=168893
2433
2434 --- mozilla/configure.in.old 2007-03-02 23:28:27.000000000 +0200
2435 +++ mozilla/configure.in 2007-03-02 23:29:23.000000000 +0200
2436 @@ -825,7 +825,6 @@
2437 OS_TARGET="${target_os}"
2438 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
2439 OS_RELEASE=
2440 - OS_TEST="${target_cpu}"
2441 case "${target_os}" in
2442 linux*) OS_ARCH=Linux ;;
2443 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
2444 @@ -837,8 +836,10 @@
2445 OS_TARGET=`uname -s`
2446 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
2447 OS_RELEASE=`uname -r`
2448 - OS_TEST=`uname -m`
2449 fi
2450 +
2451 +OS_TEST="${target_cpu}"
2452 +
2453 _COMPILER_PREFIX=
2454
2455 HOST_OS_ARCH=`echo $host_os | sed -e 's|/|_|g'`
2456
2457
2458
2459 1.1 src/patchsets/xulrunner/1.8.1.19/055_firefox-2.0_gfbsd-pthreads.patch
2460
2461 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&view=markup
2462 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&content-type=text/plain
2463
2464 Index: 055_firefox-2.0_gfbsd-pthreads.patch
2465 ===================================================================
2466 # https://bugs.gentoo.org/show_bug.cgi?id=169825
2467
2468 --- mozilla/config/rules.mk.orig Thu Sep 14 14:07:03 2006
2469 +++ mozilla/config/rules.mk Wed Oct 18 11:00:09 2006
2470 @@ -442,9 +442,7 @@
2471 endif
2472
2473 ifeq ($(OS_ARCH),FreeBSD)
2474 -ifdef IS_COMPONENT
2475 -EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
2476 -endif
2477 +EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc
2478 endif
2479
2480 ifeq ($(OS_ARCH),NetBSD)
2481 --- mozilla/configure.in.orig 2007-02-06 02:37:37 -0300
2482 +++ mozilla/configure.in 2007-03-07 15:35:41 -0300
2483 @@ -2667,7 +2667,7 @@
2484 *-hpux11.*)
2485 ;;
2486 *)
2487 - AC_CHECK_LIB(c_r, gethostbyname_r)
2488 + AC_SEARCH_LIBS([gethostbyname_r], [c_r])
2489 ;;
2490 esac
2491 AC_CHECK_LIB(m, atan)
2492 --- mozilla/configure.in.orig 2007-02-06 02:37:37 -0300
2493 +++ mozilla/configure.in 2007-03-07 13:59:53 -0300
2494 @@ -2839,11 +2839,12 @@
2495 *-*-freebsd*)
2496 AC_DEFINE(_REENTRANT)
2497 AC_DEFINE(_THREAD_SAFE)
2498 - dnl -pthread links in -lc_r, so don't specify it explicitly.
2499 - if test "$ac_cv_have_dash_pthread" = "yes"; then
2500 - _PTHREAD_LDFLAGS="-pthread"
2501 + dnl use the environment PTHREAD_LIBS
2502 + if test -n "$PTHREAD_LIBS"; then
2503 + _PTHREAD_LDFLAGS="$PTHREAD_LIBS"
2504 else
2505 - _PTHREAD_LDFLAGS="-lc_r"
2506 + _PTHREAD_LDFLAGS="-lpthread"
2507 fi
2508 + LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
2509 ;;
2510
2511
2512
2513 1.1 src/patchsets/xulrunner/1.8.1.19/060_embed-typeaheadfind-1.patch
2514
2515 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/060_embed-typeaheadfind-1.patch?rev=1.1&view=markup
2516 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/060_embed-typeaheadfind-1.patch?rev=1.1&content-type=text/plain
2517
2518 Index: 060_embed-typeaheadfind-1.patch
2519 ===================================================================
2520 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=273524
2521
2522 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/Makefile.in mozilla/extensions/typeaheadfind/Makefile.in
2523 --- mozilla.orig/extensions/typeaheadfind/Makefile.in 2005-03-26 00:12:02.000000000 -0500
2524 +++ mozilla/extensions/typeaheadfind/Makefile.in 2005-03-26 11:39:29.000000000 -0500
2525 @@ -31,7 +31,7 @@
2526
2527 include $(DEPTH)/config/autoconf.mk
2528
2529 -MODULE = typeaheadfind
2530 +MODULE = typeaheadfindsea
2531 DIRS = public src resources
2532
2533 include $(topsrcdir)/config/rules.mk
2534 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/Makefile.in mozilla/extensions/typeaheadfind/public/Makefile.in
2535 --- mozilla.orig/extensions/typeaheadfind/public/Makefile.in 2005-03-26 00:12:02.000000000 -0500
2536 +++ mozilla/extensions/typeaheadfind/public/Makefile.in 2005-03-26 11:39:29.000000000 -0500
2537 @@ -31,11 +31,11 @@
2538
2539 include $(DEPTH)/config/autoconf.mk
2540
2541 -MODULE=typeaheadfind
2542 -XPIDL_MODULE=typeaheadfind
2543 +MODULE=typeaheadfindsea
2544 +XPIDL_MODULE=typeaheadfindsea
2545 GRE_MODULE = 1
2546
2547 -XPIDLSRCS= ./nsITypeAheadFind.idl \
2548 +XPIDLSRCS= ./nsITypeAheadFindSea.idl \
2549 $(NULL)
2550
2551
2552 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFind.idl mozilla/extensions/typeaheadfind/public/nsITypeAheadFind.idl
2553 --- mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFind.idl 2005-03-26 00:12:02.000000000 -0500
2554 +++ mozilla/extensions/typeaheadfind/public/nsITypeAheadFind.idl 1969-12-31 19:00:00.000000000 -0500
2555 @@ -1,88 +0,0 @@
2556 -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2557 -/* ***** BEGIN LICENSE BLOCK *****
2558 - * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2559 - *
2560 - * The contents of this file are subject to the Mozilla Public License Version
2561 - * 1.1 (the "License"); you may not use this file except in compliance with
2562 - * the License. You may obtain a copy of the License at
2563 - * http://www.mozilla.org/MPL/
2564 - *
2565 - * Software distributed under the License is distributed on an "AS IS" basis,
2566 - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2567 - * for the specific language governing rights and limitations under the
2568 - * License.
2569 - *
2570 - * The Original Code is mozilla.org code.
2571 - *
2572 - * The Initial Developer of the Original Code is
2573 - * Netscape Communications Corporation.
2574 - * Portions created by the Initial Developer are Copyright (C) 1998
2575 - * the Initial Developer. All Rights Reserved.
2576 - *
2577 - * Contributor(s):
2578 - * Original Author: Aaron Leventhal (aaronl@××××××××.com)
2579 - *
2580 - * Alternatively, the contents of this file may be used under the terms of
2581 - * either the GNU General Public License Version 2 or later (the "GPL"), or
2582 - * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2583 - * in which case the provisions of the GPL or the LGPL are applicable instead
2584 - * of those above. If you wish to allow use of your version of this file only
2585 - * under the terms of either the GPL or the LGPL, and not to allow others to
2586 - * use your version of this file under the terms of the MPL, indicate your
2587 - * decision by deleting the provisions above and replace them with the notice
2588 - * and other provisions required by the GPL or the LGPL. If you do not delete
2589 - * the provisions above, a recipient may use your version of this file under
2590 - * the terms of any one of the MPL, the GPL or the LGPL.
2591 - *
2592 - * ***** END LICENSE BLOCK ***** */
2593 -
2594 -#include "nsISupports.idl"
2595 -#include "domstubs.idl"
2596 -#include "nsISupportsPrimitives.idl"
2597 -
2598 -%{ C++
2599 - #include "nsIDOMEvent.h"
2600 -
2601 - #define NS_TYPEAHEADFIND_CID \
2602 - {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}}
2603 -
2604 - #define NS_TYPEAHEADFIND_CONTRACTID "@mozilla.org/typeaheadfind;1"
2605 -%}
2606 -
2607 -interface nsIDOMEvent;
2608 -
2609 -[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)]
2610 -interface nsITypeAheadFind : nsISupports
2611 -{
2612 - /** Is type ahead find mode currently on? */
2613 - readonly attribute boolean isActive;
2614 -
2615 - /** Manually start type ahead find mode */
2616 - void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly);
2617 -
2618 - /** Manually cancel type ahead find mode */
2619 - void cancelFind();
2620 -
2621 - /**
2622 - * Will find as you type start automatically if the user
2623 - * types with the focus on page content other than a textfield or select?
2624 - * If autostart is off, the startNewFind() method can be used to enact
2625 - * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText.
2626 - */
2627 - void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn);
2628 - boolean getAutoStart(in nsIDOMWindow aWindow);
2629 -
2630 - /**
2631 - * Find next recurrence if typeaheadfind was the last used find,
2632 - * as opposed to regular find. Returns false in nsISupportsPRBool if we
2633 - * don't handle the request.
2634 - */
2635 - void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports);
2636 -
2637 - /*
2638 - * Go back and remove one character from find string
2639 - * Returns true if backspace used
2640 - */
2641 - boolean backOneChar();
2642 -};
2643 -
2644 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl mozilla/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl
2645 --- mozilla.orig/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl 1969-12-31 19:00:00.000000000 -0500
2646 +++ mozilla/extensions/typeaheadfind/public/nsITypeAheadFindSea.idl 2005-03-26 11:39:29.000000000 -0500
2647 @@ -0,0 +1,88 @@
2648 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2649 +/* ***** BEGIN LICENSE BLOCK *****
2650 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
2651 + *
2652 + * The contents of this file are subject to the Mozilla Public License Version
2653 + * 1.1 (the "License"); you may not use this file except in compliance with
2654 + * the License. You may obtain a copy of the License at
2655 + * http://www.mozilla.org/MPL/
2656 + *
2657 + * Software distributed under the License is distributed on an "AS IS" basis,
2658 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
2659 + * for the specific language governing rights and limitations under the
2660 + * License.
2661 + *
2662 + * The Original Code is mozilla.org code.
2663 + *
2664 + * The Initial Developer of the Original Code is
2665 + * Netscape Communications Corporation.
2666 + * Portions created by the Initial Developer are Copyright (C) 1998
2667 + * the Initial Developer. All Rights Reserved.
2668 + *
2669 + * Contributor(s):
2670 + * Original Author: Aaron Leventhal (aaronl@××××××××.com)
2671 + *
2672 + * Alternatively, the contents of this file may be used under the terms of
2673 + * either the GNU General Public License Version 2 or later (the "GPL"), or
2674 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
2675 + * in which case the provisions of the GPL or the LGPL are applicable instead
2676 + * of those above. If you wish to allow use of your version of this file only
2677 + * under the terms of either the GPL or the LGPL, and not to allow others to
2678 + * use your version of this file under the terms of the MPL, indicate your
2679 + * decision by deleting the provisions above and replace them with the notice
2680 + * and other provisions required by the GPL or the LGPL. If you do not delete
2681 + * the provisions above, a recipient may use your version of this file under
2682 + * the terms of any one of the MPL, the GPL or the LGPL.
2683 + *
2684 + * ***** END LICENSE BLOCK ***** */
2685 +
2686 +#include "nsISupports.idl"
2687 +#include "domstubs.idl"
2688 +#include "nsISupportsPrimitives.idl"
2689 +
2690 +%{ C++
2691 + #include "nsIDOMEvent.h"
2692 +
2693 + #define NS_TYPEAHEADFINDSEA_CID \
2694 + {0x46590685, 0xbc00, 0x4aac, {0xab, 0xed, 0x2c, 0x10, 0xa5, 0xb9, 0x45, 0xa4}}
2695 +
2696 + #define NS_TYPEAHEADFINDSEA_CONTRACTID "@mozilla.org/typeaheadfindsea;1"
2697 +%}
2698 +
2699 +interface nsIDOMEvent;
2700 +
2701 +[scriptable, uuid(AD1C62CC-72F4-4c5b-BE78-503854F9E0D8)]
2702 +interface nsITypeAheadFindSea : nsISupports
2703 +{
2704 + /** Is type ahead find mode currently on? */
2705 + readonly attribute boolean isActive;
2706 +
2707 + /** Manually start type ahead find mode */
2708 + void startNewFind(in nsIDOMWindow aWindow, in boolean aLinksOnly);
2709 +
2710 + /** Manually cancel type ahead find mode */
2711 + void cancelFind();
2712 +
2713 + /**
2714 + * Will find as you type start automatically if the user
2715 + * types with the focus on page content other than a textfield or select?
2716 + * If autostart is off, the startNewFind() method can be used to enact
2717 + * type ahead find, as well as cmd_findTypeLinks or cmd_findTypeText.
2718 + */
2719 + void setAutoStart(in nsIDOMWindow aWindow, in boolean aIsAutoStartOn);
2720 + boolean getAutoStart(in nsIDOMWindow aWindow);
2721 +
2722 + /**
2723 + * Find next recurrence if typeaheadfindsea was the last used find,
2724 + * as opposed to regular find. Returns false in nsISupportsPRBool if we
2725 + * don't handle the request.
2726 + */
2727 + void findNext(in boolean aReverse, in nsISupportsInterfacePointer aCallerWindowSupports);
2728 +
2729 + /*
2730 + * Go back and remove one character from find string
2731 + * Returns true if backspace used
2732 + */
2733 + boolean backOneChar();
2734 +};
2735 +
2736 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js mozilla/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js
2737 --- mozilla.orig/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js 2005-03-26 00:12:02.000000000 -0500
2738 +++ mozilla/extensions/typeaheadfind/resources/content/prefs/typeaheadfind.js 2005-03-26 11:39:29.000000000 -0500
2739 @@ -36,7 +36,7 @@
2740 *
2741 * ***** END LICENSE BLOCK ***** */
2742
2743 -pref("accessibility.typeaheadfind", true);
2744 -pref("accessibility.typeaheadfind.linksonly", true);
2745 -pref("accessibility.typeaheadfind.startlinksonly", false);
2746 -pref("accessibility.typeaheadfind.timeout", 5000);
2747 +pref("accessibility.typeaheadfindsea", true);
2748 +pref("accessibility.typeaheadfindsea.linksonly", true);
2749 +pref("accessibility.typeaheadfindsea.startlinksonly", false);
2750 +pref("accessibility.typeaheadfindsea.timeout", 5000);
2751 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/jar.mn mozilla/extensions/typeaheadfind/resources/jar.mn
2752 --- mozilla.orig/extensions/typeaheadfind/resources/jar.mn 2005-03-26 00:12:02.000000000 -0500
2753 +++ mozilla/extensions/typeaheadfind/resources/jar.mn 2005-03-26 11:39:29.000000000 -0500
2754 @@ -1,5 +1,5 @@
2755 en-US.jar:
2756 - locale/en-US/global/typeaheadfind.properties (locale/en-US/typeaheadfind.properties)
2757 + locale/en-US/global/typeaheadfindsea.properties (locale/en-US/typeaheadfindsea.properties)
2758
2759 toolkit.jar:
2760 content/global/notfound.wav (content/notfound.wav)
2761 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties
2762 --- mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties 2005-03-26 00:12:02.000000000 -0500
2763 +++ mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfind.properties 1969-12-31 19:00:00.000000000 -0500
2764 @@ -1,13 +0,0 @@
2765 -openparen = (
2766 -closeparen = )
2767 -textfound = Text found: "
2768 -textnotfound = Text not found: "
2769 -linkfound = Link found: "
2770 -linknotfound = Link not found: "
2771 -closequote = "
2772 -stopfind = Find stopped.
2773 -starttextfind = Starting -- find text as you type
2774 -startlinkfind = Starting -- find links as you type
2775 -repeated = repeated
2776 -nextmatch = - next match
2777 -prevmatch = - previous match
2778 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties
2779 --- mozilla.orig/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties 1969-12-31 19:00:00.000000000 -0500
2780 +++ mozilla/extensions/typeaheadfind/resources/locale/en-US/typeaheadfindsea.properties 2005-03-26 11:39:29.000000000 -0500
2781 @@ -0,0 +1,13 @@
2782 +openparen = (
2783 +closeparen = )
2784 +textfound = Text found: "
2785 +textnotfound = Text not found: "
2786 +linkfound = Link found: "
2787 +linknotfound = Link not found: "
2788 +closequote = "
2789 +stopfind = Find stopped.
2790 +starttextfind = Starting -- find text as you type
2791 +startlinkfind = Starting -- find links as you type
2792 +repeated = repeated
2793 +nextmatch = - next match
2794 +prevmatch = - previous match
2795 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/Makefile.in mozilla/extensions/typeaheadfind/src/Makefile.in
2796 --- mozilla.orig/extensions/typeaheadfind/src/Makefile.in 2005-03-26 00:12:02.000000000 -0500
2797 +++ mozilla/extensions/typeaheadfind/src/Makefile.in 2005-03-26 11:39:29.000000000 -0500
2798 @@ -31,15 +31,15 @@
2799
2800 include $(DEPTH)/config/autoconf.mk
2801
2802 -MODULE = typeaheadfind
2803 -LIBRARY_NAME = typeaheadfind
2804 +MODULE = typeaheadfindsea
2805 +LIBRARY_NAME = typeaheadfindsea
2806 ifneq ($(OS_ARCH),WINNT)
2807 -SHORT_LIBNAME = typahead
2808 +SHORT_LIBNAME = typaheadsea
2809 endif
2810 GRE_MODULE = 1
2811 MOZILLA_INTERNAL_API = 1
2812
2813 -PACKAGE_FILE = typeaheadfind.pkg
2814 +PACKAGE_FILE = typeaheadfindsea.pkg
2815
2816 REQUIRES = appcomps \
2817 embedcomponents \
2818 @@ -66,7 +66,7 @@
2819
2820 EXPORT_LIBRARY = 1
2821 IS_COMPONENT = 1
2822 -MODULE_NAME = nsTypeAheadFind
2823 +MODULE_NAME = nsTypeAheadFindSea
2824
2825 CPPSRCS = \
2826 nsTypeAheadFind.cpp \
2827 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.cpp mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp
2828 --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.cpp 2005-03-26 00:12:02.000000000 -0500
2829 +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.cpp 2005-03-26 11:39:29.000000000 -0500
2830 @@ -114,8 +114,8 @@
2831 ////////////////////////////////////////////////////////////////////////
2832
2833
2834 -NS_INTERFACE_MAP_BEGIN(nsTypeAheadFind)
2835 - NS_INTERFACE_MAP_ENTRY(nsITypeAheadFind)
2836 +NS_INTERFACE_MAP_BEGIN(nsTypeAheadFindSea)
2837 + NS_INTERFACE_MAP_ENTRY(nsITypeAheadFindSea)
2838 NS_INTERFACE_MAP_ENTRY(nsISupportsWeakReference)
2839 NS_INTERFACE_MAP_ENTRY(nsITimerCallback)
2840 NS_INTERFACE_MAP_ENTRY(nsIScrollPositionListener)
2841 @@ -128,8 +128,8 @@
2842 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsIDOMEventListener, nsIDOMKeyListener)
2843 NS_INTERFACE_MAP_END
2844
2845 -NS_IMPL_ADDREF(nsTypeAheadFind)
2846 -NS_IMPL_RELEASE(nsTypeAheadFind)
2847 +NS_IMPL_ADDREF(nsTypeAheadFindSea)
2848 +NS_IMPL_RELEASE(nsTypeAheadFindSea)
2849
2850 static NS_DEFINE_IID(kRangeCID, NS_RANGE_CID);
2851 static NS_DEFINE_CID(kStringBundleServiceCID, NS_STRINGBUNDLESERVICE_CID);
2852 @@ -138,11 +138,11 @@
2853
2854 #define NS_FIND_CONTRACTID "@mozilla.org/embedcomp/rangefind;1"
2855
2856 -nsTypeAheadFind* nsTypeAheadFind::sInstance = nsnull;
2857 -PRInt32 nsTypeAheadFind::sAccelKey = -1; // magic value of -1 when unitialized
2858 +nsTypeAheadFindSea* nsTypeAheadFindSea::sInstance = nsnull;
2859 +PRInt32 nsTypeAheadFindSea::sAccelKey = -1; // magic value of -1 when unitialized
2860
2861
2862 -nsTypeAheadFind::nsTypeAheadFind():
2863 +nsTypeAheadFindSea::nsTypeAheadFindSea():
2864 mIsFindAllowedInWindow(PR_FALSE), mAutoStartPref(PR_FALSE),
2865 mLinksOnlyPref(PR_FALSE), mStartLinksOnlyPref(PR_FALSE),
2866 mLinksOnly(PR_FALSE), mIsTypeAheadOn(PR_FALSE), mCaretBrowsingOn(PR_FALSE),
2867 @@ -161,25 +161,25 @@
2868 static PRInt32 gInstanceCount;
2869 ++gInstanceCount;
2870 NS_ASSERTION(gInstanceCount == 1,
2871 - "There should be only 1 instance of nsTypeAheadFind!");
2872 + "There should be only 1 instance of nsTypeAheadFindSea!");
2873 #endif
2874 }
2875
2876
2877 -nsTypeAheadFind::~nsTypeAheadFind()
2878 +nsTypeAheadFindSea::~nsTypeAheadFindSea()
2879 {
2880 RemoveDocListeners();
2881 mTimer = nsnull;
2882
2883 nsCOMPtr<nsIPrefBranch2> prefInternal(do_GetService(NS_PREFSERVICE_CONTRACTID));
2884 if (prefInternal) {
2885 - prefInternal->RemoveObserver("accessibility.typeaheadfind", this);
2886 + prefInternal->RemoveObserver("accessibility.typeaheadfindsea", this);
2887 prefInternal->RemoveObserver("accessibility.browsewithcaret", this);
2888 }
2889 }
2890
2891 nsresult
2892 -nsTypeAheadFind::Init()
2893 +nsTypeAheadFindSea::Init()
2894 {
2895 nsresult rv = NS_NewISupportsArray(getter_AddRefs(mManualFindWindows));
2896 NS_ENSURE_SUCCESS(rv, rv);
2897 @@ -196,7 +196,7 @@
2898 }
2899
2900 // ----------- Listen to prefs ------------------
2901 - rv = prefInternal->AddObserver("accessibility.typeaheadfind", this, PR_FALSE);
2902 + rv = prefInternal->AddObserver("accessibility.typeaheadfindsea", this, PR_FALSE);
2903 NS_ENSURE_SUCCESS(rv, rv);
2904
2905 rv = prefInternal->AddObserver("accessibility.browsewithcaret", this, PR_FALSE);
2906 @@ -217,11 +217,11 @@
2907 return rv;
2908 }
2909
2910 -nsTypeAheadFind *
2911 -nsTypeAheadFind::GetInstance()
2912 +nsTypeAheadFindSea *
2913 +nsTypeAheadFindSea::GetInstance()
2914 {
2915 if (!sInstance) {
2916 - sInstance = new nsTypeAheadFind();
2917 + sInstance = new nsTypeAheadFindSea();
2918 if (!sInstance)
2919 return nsnull;
2920
2921 @@ -241,14 +241,14 @@
2922
2923
2924 void
2925 -nsTypeAheadFind::ReleaseInstance()
2926 +nsTypeAheadFindSea::ReleaseInstance()
2927 {
2928 NS_IF_RELEASE(sInstance);
2929 }
2930
2931
2932 void
2933 -nsTypeAheadFind::Shutdown()
2934 +nsTypeAheadFindSea::Shutdown()
2935 {
2936 // Application shutdown
2937 mTimer = nsnull;
2938 @@ -264,14 +264,14 @@
2939 // ------- Pref Callbacks (2) ---------------
2940
2941 nsresult
2942 -nsTypeAheadFind::PrefsReset()
2943 +nsTypeAheadFindSea::PrefsReset()
2944 {
2945 nsCOMPtr<nsIPrefBranch> prefBranch(do_GetService(NS_PREFSERVICE_CONTRACTID));
2946 NS_ENSURE_TRUE(prefBranch, NS_ERROR_FAILURE);
2947
2948 PRBool wasTypeAheadOn = mIsTypeAheadOn;
2949
2950 - prefBranch->GetBoolPref("accessibility.typeaheadfind", &mIsTypeAheadOn);
2951 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea", &mIsTypeAheadOn);
2952
2953 if (mIsTypeAheadOn != wasTypeAheadOn) {
2954 if (!mIsTypeAheadOn) {
2955 @@ -291,7 +291,7 @@
2956 do_GetService(kStringBundleServiceCID);
2957
2958 if (stringBundleService)
2959 - stringBundleService->CreateBundle(TYPEAHEADFIND_BUNDLE_URL,
2960 + stringBundleService->CreateBundle(TYPEAHEADFINDSEA_BUNDLE_URL,
2961 getter_AddRefs(mStringBundle));
2962
2963 // Observe find again commands. We'll handle them if we were the last find
2964 @@ -306,34 +306,34 @@
2965 }
2966
2967 PRBool oldAutoStartPref = mAutoStartPref;
2968 - prefBranch->GetBoolPref("accessibility.typeaheadfind.autostart",
2969 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.autostart",
2970 &mAutoStartPref);
2971 if (mAutoStartPref != oldAutoStartPref) {
2972 ResetGlobalAutoStart(mAutoStartPref);
2973 }
2974
2975 - prefBranch->GetBoolPref("accessibility.typeaheadfind.linksonly",
2976 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.linksonly",
2977 &mLinksOnlyPref);
2978
2979 - prefBranch->GetBoolPref("accessibility.typeaheadfind.startlinksonly",
2980 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.startlinksonly",
2981 &mStartLinksOnlyPref);
2982
2983 PRBool isSoundEnabled = PR_TRUE;
2984 - prefBranch->GetBoolPref("accessibility.typeaheadfind.enablesound",
2985 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.enablesound",
2986 &isSoundEnabled);
2987 nsXPIDLCString soundStr;
2988 if (isSoundEnabled) {
2989 - prefBranch->GetCharPref("accessibility.typeaheadfind.soundURL",
2990 + prefBranch->GetCharPref("accessibility.typeaheadfindsea.soundURL",
2991 getter_Copies(soundStr));
2992 }
2993 mNotFoundSoundURL = soundStr;
2994
2995 PRBool isTimeoutEnabled = PR_FALSE;
2996 - prefBranch->GetBoolPref("accessibility.typeaheadfind.enabletimeout",
2997 + prefBranch->GetBoolPref("accessibility.typeaheadfindsea.enabletimeout",
2998 &isTimeoutEnabled);
2999 PRInt32 timeoutLength = 0;
3000 if (isTimeoutEnabled) {
3001 - prefBranch->GetIntPref("accessibility.typeaheadfind.timeout",
3002 + prefBranch->GetIntPref("accessibility.typeaheadfindsea.timeout",
3003 &timeoutLength);
3004 }
3005 mTimeoutLength = timeoutLength;
3006 @@ -349,7 +349,7 @@
3007 // ------- nsITimer Methods (1) ---------------
3008
3009 NS_IMETHODIMP
3010 -nsTypeAheadFind::Notify(nsITimer *timer)
3011 +nsTypeAheadFindSea::Notify(nsITimer *timer)
3012 {
3013 CancelFind();
3014 return NS_OK;
3015 @@ -358,7 +358,7 @@
3016 // ----------- nsIObserver Methods (1) -------------------
3017
3018 NS_IMETHODIMP
3019 -nsTypeAheadFind::Observe(nsISupports *aSubject, const char *aTopic,
3020 +nsTypeAheadFindSea::Observe(nsISupports *aSubject, const char *aTopic,
3021 const PRUnichar *aData)
3022 {
3023 PRBool isOpening;
3024 @@ -476,7 +476,7 @@
3025
3026
3027 nsresult
3028 -nsTypeAheadFind::UseInWindow(nsIDOMWindow *aDOMWin)
3029 +nsTypeAheadFindSea::UseInWindow(nsIDOMWindow *aDOMWin)
3030 {
3031 NS_ENSURE_ARG_POINTER(aDOMWin);
3032
3033 @@ -529,7 +529,7 @@
3034 // ------- nsIDOMEventListener Methods (1) ---------------
3035
3036 NS_IMETHODIMP
3037 -nsTypeAheadFind::HandleEvent(nsIDOMEvent* aEvent)
3038 +nsTypeAheadFindSea::HandleEvent(nsIDOMEvent* aEvent)
3039 {
3040 nsAutoString eventType;
3041 aEvent->GetType(eventType);
3042 @@ -589,21 +589,21 @@
3043 // ------- nsIDOMKeyListener Methods (3) ---------------
3044
3045 NS_IMETHODIMP
3046 -nsTypeAheadFind::KeyDown(nsIDOMEvent* aEvent)
3047 +nsTypeAheadFindSea::KeyDown(nsIDOMEvent* aEvent)
3048 {
3049 return NS_OK;
3050 }
3051
3052
3053 NS_IMETHODIMP
3054 -nsTypeAheadFind::KeyUp(nsIDOMEvent* aEvent)
3055 +nsTypeAheadFindSea::KeyUp(nsIDOMEvent* aEvent)
3056 {
3057 return NS_OK;
3058 }
3059
3060
3061 NS_IMETHODIMP
3062 -nsTypeAheadFind::KeyPress(nsIDOMEvent* aEvent)
3063 +nsTypeAheadFindSea::KeyPress(nsIDOMEvent* aEvent)
3064 {
3065 if (!mIsTypeAheadOn || mIsMenuBarActive || mIsMenuPopupActive) {
3066 return NS_OK;
3067 @@ -733,7 +733,7 @@
3068
3069
3070 NS_IMETHODIMP
3071 -nsTypeAheadFind::BackOneChar(PRBool *aIsBackspaceUsed)
3072 +nsTypeAheadFindSea::BackOneChar(PRBool *aIsBackspaceUsed)
3073 {
3074 if (!mFocusedDocSelection) {
3075 *aIsBackspaceUsed = PR_FALSE;
3076 @@ -863,7 +863,7 @@
3077
3078
3079 nsresult
3080 -nsTypeAheadFind::HandleChar(PRUnichar aChar)
3081 +nsTypeAheadFindSea::HandleChar(PRUnichar aChar)
3082 {
3083 // Add a printable char to mTypeAheadBuffer, then search for buffer contents
3084
3085 @@ -1039,7 +1039,7 @@
3086
3087
3088 void
3089 -nsTypeAheadFind::SaveFind()
3090 +nsTypeAheadFindSea::SaveFind()
3091 {
3092 // Store find string for find-next
3093 mFindNextBuffer = mTypeAheadBuffer;
3094 @@ -1060,14 +1060,14 @@
3095 mFindService->SetSearchString(mFindNextBuffer);
3096 }
3097
3098 - // --- If accessibility.typeaheadfind.timeout is set,
3099 + // --- If accessibility.typeaheadfindsea.timeout is set,
3100 // cancel find after specified # milliseconds ---
3101 StartTimeout();
3102 }
3103
3104
3105 void
3106 -nsTypeAheadFind::PlayNotFoundSound()
3107 +nsTypeAheadFindSea::PlayNotFoundSound()
3108 {
3109 if (mNotFoundSoundURL.IsEmpty()) // no sound
3110 return;
3111 @@ -1097,7 +1097,7 @@
3112
3113
3114 NS_IMETHODIMP
3115 -nsTypeAheadFind::HandleText(nsIDOMEvent* aTextEvent)
3116 +nsTypeAheadFindSea::HandleText(nsIDOMEvent* aTextEvent)
3117 {
3118 // This is called multiple times in the middle of an
3119 // IME composition
3120 @@ -1145,7 +1145,7 @@
3121
3122
3123 NS_IMETHODIMP
3124 -nsTypeAheadFind::HandleStartComposition(nsIDOMEvent* aCompositionEvent)
3125 +nsTypeAheadFindSea::HandleStartComposition(nsIDOMEvent* aCompositionEvent)
3126 {
3127 // This is called once at the start of an IME composition
3128
3129 @@ -1167,7 +1167,7 @@
3130
3131
3132 NS_IMETHODIMP
3133 -nsTypeAheadFind::HandleEndComposition(nsIDOMEvent* aCompositionEvent)
3134 +nsTypeAheadFindSea::HandleEndComposition(nsIDOMEvent* aCompositionEvent)
3135 {
3136 // This is called once at the end of an IME composition
3137
3138 @@ -1198,28 +1198,28 @@
3139
3140
3141 NS_IMETHODIMP
3142 -nsTypeAheadFind::HandleQueryComposition(nsIDOMEvent* aCompositionEvent)
3143 +nsTypeAheadFindSea::HandleQueryComposition(nsIDOMEvent* aCompositionEvent)
3144 {
3145 return NS_OK;
3146 }
3147
3148
3149 NS_IMETHODIMP
3150 -nsTypeAheadFind::HandleQueryReconversion(nsIDOMEvent* aCompositionEvent)
3151 +nsTypeAheadFindSea::HandleQueryReconversion(nsIDOMEvent* aCompositionEvent)
3152 {
3153 return NS_OK;
3154 }
3155
3156
3157 NS_IMETHODIMP
3158 -nsTypeAheadFind::HandleQueryCaretRect(nsIDOMEvent* aCompositionEvent)
3159 +nsTypeAheadFindSea::HandleQueryCaretRect(nsIDOMEvent* aCompositionEvent)
3160 {
3161 return NS_OK;
3162 }
3163
3164
3165 nsresult
3166 -nsTypeAheadFind::FindItNow(nsIPresShell *aPresShell,
3167 +nsTypeAheadFindSea::FindItNow(nsIPresShell *aPresShell,
3168 PRBool aIsRepeatingSameChar, PRBool aIsLinksOnly,
3169 PRBool aIsFirstVisiblePreferred)
3170 {
3171 @@ -1241,7 +1241,7 @@
3172
3173 nsCOMPtr<nsISupports> startingContainer = presContext->GetContainer();
3174 nsCOMPtr<nsIDocShellTreeItem> treeItem(do_QueryInterface(startingContainer));
3175 - NS_ASSERTION(treeItem, "Bug 175321 Crashes with Type Ahead Find [@ nsTypeAheadFind::FindItNow]");
3176 + NS_ASSERTION(treeItem, "Bug 175321 Crashes with Type Ahead Find [@ nsTypeAheadFindSea::FindItNow]");
3177 if (!treeItem) {
3178 return NS_ERROR_FAILURE;
3179 }
3180 @@ -1465,7 +1465,7 @@
3181
3182
3183 nsresult
3184 -nsTypeAheadFind::GetSearchContainers(nsISupports *aContainer,
3185 +nsTypeAheadFindSea::GetSearchContainers(nsISupports *aContainer,
3186 PRBool aIsRepeatingSameChar,
3187 PRBool aIsFirstVisiblePreferred,
3188 PRBool aCanUseDocSelection,
3189 @@ -1573,7 +1573,7 @@
3190
3191
3192 void
3193 -nsTypeAheadFind::RangeStartsInsideLink(nsIDOMRange *aRange,
3194 +nsTypeAheadFindSea::RangeStartsInsideLink(nsIDOMRange *aRange,
3195 nsIPresShell *aPresShell,
3196 PRBool *aIsInsideLink,
3197 PRBool *aIsStartingLink)
3198 @@ -1680,7 +1680,7 @@
3199
3200
3201 NS_IMETHODIMP
3202 -nsTypeAheadFind::ScrollPositionWillChange(nsIScrollableView *aView,
3203 +nsTypeAheadFindSea::ScrollPositionWillChange(nsIScrollableView *aView,
3204 nscoord aX, nscoord aY)
3205 {
3206 return NS_OK;
3207 @@ -1688,7 +1688,7 @@
3208
3209
3210 NS_IMETHODIMP
3211 -nsTypeAheadFind::ScrollPositionDidChange(nsIScrollableView *aScrollableView,
3212 +nsTypeAheadFindSea::ScrollPositionDidChange(nsIScrollableView *aScrollableView,
3213 nscoord aX, nscoord aY)
3214 {
3215 if (!mIsFindingText)
3216 @@ -1699,7 +1699,7 @@
3217
3218
3219 NS_IMETHODIMP
3220 -nsTypeAheadFind::NotifySelectionChanged(nsIDOMDocument *aDoc,
3221 +nsTypeAheadFindSea::NotifySelectionChanged(nsIDOMDocument *aDoc,
3222 nsISelection *aSel, PRInt16 aReason)
3223 {
3224 if (!mIsFindingText) {
3225 @@ -1716,10 +1716,10 @@
3226 }
3227
3228
3229 -// ---------------- nsITypeAheadFind --------------------
3230 +// ---------------- nsITypeAheadFindSea --------------------
3231
3232 NS_IMETHODIMP
3233 -nsTypeAheadFind::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aCallerWindowSupports)
3234 +nsTypeAheadFindSea::FindNext(PRBool aFindBackwards, nsISupportsInterfacePointer *aCallerWindowSupports)
3235 {
3236 NS_ENSURE_TRUE(aCallerWindowSupports, NS_ERROR_FAILURE);
3237
3238 @@ -1731,7 +1731,7 @@
3239 return NS_OK;
3240 }
3241
3242 - // Compare the top level content pres shell of typeaheadfind
3243 + // Compare the top level content pres shell of typeaheadfindsea
3244 // with the top level content pres shell window where find next is happening
3245 // If they're different, exit so that webbrowswerfind can handle FindNext()
3246
3247 @@ -1764,7 +1764,7 @@
3248 NS_ENSURE_TRUE(callerPresShell, NS_OK);
3249
3250 if (callerPresShell != typeAheadPresShell) {
3251 - // This means typeaheadfind is active in a different window or doc
3252 + // This means typeaheadfindsea is active in a different window or doc
3253 // So it's not appropriate to find next for the current window
3254 mFindNextBuffer.Truncate();
3255 return NS_OK;
3256 @@ -1782,7 +1782,7 @@
3257 webBrowserFind->GetSearchString(getter_Copies(webBrowserFindString));
3258 if (!webBrowserFindString.Equals(mFindNextBuffer)) {
3259 // If they're not equal, then the find dialog was used last,
3260 - // not typeaheadfind. Typeaheadfind applies to the last find,
3261 + // not typeaheadfindsea. Typeaheadfind applies to the last find,
3262 // so we should let nsIWebBrowserFind::FindNext() do it.
3263 mFindNextBuffer.Truncate();
3264 return NS_OK;
3265 @@ -1832,7 +1832,7 @@
3266
3267
3268 NS_IMETHODIMP
3269 -nsTypeAheadFind::GetIsActive(PRBool *aIsActive)
3270 +nsTypeAheadFindSea::GetIsActive(PRBool *aIsActive)
3271 {
3272 *aIsActive = mLinksOnlyManuallySet || !mTypeAheadBuffer.IsEmpty();
3273
3274 @@ -1845,7 +1845,7 @@
3275 */
3276
3277 NS_IMETHODIMP
3278 -nsTypeAheadFind::StartNewFind(nsIDOMWindow *aWindow, PRBool aLinksOnly)
3279 +nsTypeAheadFindSea::StartNewFind(nsIDOMWindow *aWindow, PRBool aLinksOnly)
3280 {
3281 if (!mFind || !mIsTypeAheadOn || !aWindow)
3282 return NS_ERROR_FAILURE; // Type Ahead Find not correctly initialized
3283 @@ -1878,7 +1878,7 @@
3284 }
3285
3286 void
3287 -nsTypeAheadFind::ResetGlobalAutoStart(PRBool aAutoStart)
3288 +nsTypeAheadFindSea::ResetGlobalAutoStart(PRBool aAutoStart)
3289 {
3290 // Enumerate through the current top level windows
3291 // and either attach or remove window listeners
3292 @@ -1916,7 +1916,7 @@
3293
3294
3295 NS_IMETHODIMP
3296 -nsTypeAheadFind::SetAutoStart(nsIDOMWindow *aDOMWin, PRBool aAutoStartOn)
3297 +nsTypeAheadFindSea::SetAutoStart(nsIDOMWindow *aDOMWin, PRBool aAutoStartOn)
3298 {
3299 if (!aDOMWin) {
3300 return NS_ERROR_FAILURE;
3301 @@ -1946,7 +1946,7 @@
3302
3303
3304 NS_IMETHODIMP
3305 -nsTypeAheadFind::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn)
3306 +nsTypeAheadFindSea::GetAutoStart(nsIDOMWindow *aDOMWin, PRBool *aIsAutoStartOn)
3307 {
3308 *aIsAutoStartOn = PR_FALSE;
3309
3310 @@ -2014,7 +2014,7 @@
3311
3312
3313 NS_IMETHODIMP
3314 -nsTypeAheadFind::CancelFind()
3315 +nsTypeAheadFindSea::CancelFind()
3316 {
3317 // Stop current find if:
3318 // 1. Escape pressed
3319 @@ -2070,7 +2070,7 @@
3320 // ------- Helper Methods ---------------
3321
3322 void
3323 -nsTypeAheadFind::GetTopContentPresShell(nsIDocShellTreeItem *aDocShellTreeItem,
3324 +nsTypeAheadFindSea::GetTopContentPresShell(nsIDocShellTreeItem *aDocShellTreeItem,
3325 nsIPresShell **aPresShell)
3326 {
3327 *aPresShell = nsnull;
3328 @@ -2086,7 +2086,7 @@
3329 }
3330
3331 void
3332 -nsTypeAheadFind::GetStartWindow(nsIDOMWindow *aWindow, nsIDOMWindow **aStartWindow)
3333 +nsTypeAheadFindSea::GetStartWindow(nsIDOMWindow *aWindow, nsIDOMWindow **aStartWindow)
3334 {
3335 // Return the root ancestor content window of aWindow
3336
3337 @@ -2118,7 +2118,7 @@
3338 }
3339
3340 nsresult
3341 -nsTypeAheadFind::GetWebBrowserFind(nsIDOMWindow *aWin,
3342 +nsTypeAheadFindSea::GetWebBrowserFind(nsIDOMWindow *aWin,
3343 nsIWebBrowserFind **aWebBrowserFind)
3344 {
3345 NS_ENSURE_ARG_POINTER(aWin);
3346 @@ -2143,7 +2143,7 @@
3347
3348
3349 void
3350 -nsTypeAheadFind::StartTimeout()
3351 +nsTypeAheadFindSea::StartTimeout()
3352 {
3353 if (mTimeoutLength) {
3354 if (!mTimer) {
3355 @@ -2159,7 +2159,7 @@
3356 }
3357
3358 void
3359 -nsTypeAheadFind::SetSelectionLook(nsIPresShell *aPresShell,
3360 +nsTypeAheadFindSea::SetSelectionLook(nsIPresShell *aPresShell,
3361 PRBool aChangeColor,
3362 PRBool aEnabled)
3363 {
3364 @@ -2167,8 +2167,8 @@
3365 return;
3366
3367 // Show caret when type ahead find is on
3368 - // Also paint selection bright (typeaheadfind on) or normal
3369 - // (typeaheadfind off)
3370 + // Also paint selection bright (typeaheadfindsea on) or normal
3371 + // (typeaheadfindsea off)
3372
3373 if (aChangeColor) {
3374 mFocusedDocSelCon->SetDisplaySelection(nsISelectionController::SELECTION_ATTENTION);
3375 @@ -2211,7 +2211,7 @@
3376
3377
3378 void
3379 -nsTypeAheadFind::RemoveDocListeners()
3380 +nsTypeAheadFindSea::RemoveDocListeners()
3381 {
3382 nsCOMPtr<nsIPresShell> presShell(GetPresShell());
3383 nsIViewManager* vm = nsnull;
3384 @@ -2245,7 +2245,7 @@
3385
3386
3387 void
3388 -nsTypeAheadFind::AttachDocListeners(nsIPresShell *aPresShell)
3389 +nsTypeAheadFindSea::AttachDocListeners(nsIPresShell *aPresShell)
3390 {
3391 if (!aPresShell) {
3392 return;
3393 @@ -2275,7 +2275,7 @@
3394
3395
3396 void
3397 -nsTypeAheadFind::RemoveWindowListeners(nsIDOMWindow *aDOMWin)
3398 +nsTypeAheadFindSea::RemoveWindowListeners(nsIDOMWindow *aDOMWin)
3399 {
3400 nsCOMPtr<nsIDOMEventTarget> chromeEventHandler;
3401 GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler));
3402 @@ -2332,7 +2332,7 @@
3403
3404
3405 void
3406 -nsTypeAheadFind::AttachWindowListeners(nsIDOMWindow *aDOMWin)
3407 +nsTypeAheadFindSea::AttachWindowListeners(nsIDOMWindow *aDOMWin)
3408 {
3409 nsCOMPtr<nsIDOMEventTarget> chromeEventHandler;
3410 GetChromeEventHandler(aDOMWin, getter_AddRefs(chromeEventHandler));
3411 @@ -2385,7 +2385,7 @@
3412
3413
3414 void
3415 -nsTypeAheadFind::GetChromeEventHandler(nsIDOMWindow *aDOMWin,
3416 +nsTypeAheadFindSea::GetChromeEventHandler(nsIDOMWindow *aDOMWin,
3417 nsIDOMEventTarget **aChromeTarget)
3418 {
3419 nsCOMPtr<nsPIDOMWindow> privateDOMWindow(do_QueryInterface(aDOMWin));
3420 @@ -2401,7 +2401,7 @@
3421 }
3422
3423 PRBool
3424 -nsTypeAheadFind::IsTargetContentOkay(nsIContent *aContent)
3425 +nsTypeAheadFindSea::IsTargetContentOkay(nsIContent *aContent)
3426 {
3427 if (!aContent) {
3428 return PR_FALSE;
3429 @@ -2439,7 +2439,7 @@
3430
3431
3432 nsresult
3433 -nsTypeAheadFind::GetTargetIfTypeAheadOkay(nsIDOMEvent *aEvent,
3434 +nsTypeAheadFindSea::GetTargetIfTypeAheadOkay(nsIDOMEvent *aEvent,
3435 nsIContent **aTargetContent,
3436 nsIPresShell **aTargetPresShell)
3437 {
3438 @@ -2522,7 +2522,7 @@
3439
3440
3441 void
3442 -nsTypeAheadFind::GetSelection(nsIPresShell *aPresShell,
3443 +nsTypeAheadFindSea::GetSelection(nsIPresShell *aPresShell,
3444 nsISelectionController **aSelCon,
3445 nsISelection **aDOMSel)
3446 {
3447 @@ -2544,7 +2544,7 @@
3448
3449
3450 PRBool
3451 -nsTypeAheadFind::IsRangeVisible(nsIPresShell *aPresShell,
3452 +nsTypeAheadFindSea::IsRangeVisible(nsIPresShell *aPresShell,
3453 nsPresContext *aPresContext,
3454 nsIDOMRange *aRange, PRBool aMustBeInViewPort,
3455 PRBool aGetTopVisibleLeaf,
3456 @@ -2698,7 +2698,7 @@
3457
3458
3459 nsresult
3460 -nsTypeAheadFind::GetTranslatedString(const nsAString& aKey,
3461 +nsTypeAheadFindSea::GetTranslatedString(const nsAString& aKey,
3462 nsAString& aStringOut)
3463 {
3464 nsXPIDLString xsValue;
3465 @@ -2716,7 +2716,7 @@
3466
3467
3468 void
3469 -nsTypeAheadFind::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent,
3470 +nsTypeAheadFindSea::DisplayStatus(PRBool aSuccess, nsIContent *aFocusedContent,
3471 PRBool aClearStatus, const PRUnichar *aText)
3472 {
3473 // pres shell -> pres context -> container -> tree item ->
3474 @@ -2863,7 +2863,7 @@
3475 // Make sure we're not focused on a text field, listbox
3476 // or other form control that needs typeahead keystrokes
3477 if (focusedContent) {
3478 - *aResult = nsTypeAheadFind::IsTargetContentOkay(focusedContent);
3479 + *aResult = nsTypeAheadFindSea::IsTargetContentOkay(focusedContent);
3480 return NS_OK;
3481 }
3482
3483 @@ -2928,8 +2928,8 @@
3484 EnsureContentWindow(domWinInternal, getter_AddRefs(startContentWin));
3485 NS_ENSURE_TRUE(startContentWin, NS_ERROR_FAILURE);
3486
3487 - nsCOMPtr<nsITypeAheadFind> typeAhead =
3488 - do_GetService(NS_TYPEAHEADFIND_CONTRACTID);
3489 + nsCOMPtr<nsITypeAheadFindSea> typeAhead =
3490 + do_GetService(NS_TYPEAHEADFINDSEA_CONTRACTID);
3491 NS_ENSURE_TRUE(typeAhead, NS_ERROR_FAILURE);
3492
3493 return typeAhead->StartNewFind(startContentWin, isLinkSearch);
3494 @@ -3013,7 +3013,7 @@
3495 }
3496
3497 already_AddRefed<nsIPresShell>
3498 -nsTypeAheadFind::GetPresShell()
3499 +nsTypeAheadFindSea::GetPresShell()
3500 {
3501 if (!mFocusedWeakShell)
3502 return nsnull;
3503 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.h mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.h
3504 --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFind.h 2005-03-26 00:12:02.000000000 -0500
3505 +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFind.h 2005-03-26 11:39:29.000000000 -0500
3506 @@ -62,13 +62,13 @@
3507 #include "nsIDOMRange.h"
3508 #include "nsIDOMWindow.h"
3509 #include "nsIDocShellTreeItem.h"
3510 -#include "nsITypeAheadFind.h"
3511 +#include "nsITypeAheadFindSea.h"
3512 #include "nsIStringBundle.h"
3513 #include "nsISupportsArray.h"
3514 #include "nsISound.h"
3515
3516 -#define TYPEAHEADFIND_BUNDLE_URL \
3517 - "chrome://global/locale/typeaheadfind.properties"
3518 +#define TYPEAHEADFINDSEA_BUNDLE_URL \
3519 + "chrome://global/locale/typeaheadfindsea.properties"
3520 #define TYPEAHEADFIND_NOTFOUND_WAV_URL \
3521 "chrome://global/content/notfound.wav"
3522
3523 @@ -82,7 +82,7 @@
3524
3525 const int kMaxBadCharsBeforeCancel = 3;
3526
3527 -class nsTypeAheadFind : public nsITypeAheadFind,
3528 +class nsTypeAheadFindSea : public nsITypeAheadFindSea,
3529 public nsIDOMKeyListener,
3530 public nsIDOMTextListener,
3531 public nsIDOMCompositionListener,
3532 @@ -93,13 +93,13 @@
3533 public nsSupportsWeakReference
3534 {
3535 public:
3536 - nsTypeAheadFind();
3537 - virtual ~nsTypeAheadFind();
3538 + nsTypeAheadFindSea();
3539 + virtual ~nsTypeAheadFindSea();
3540
3541 - NS_DEFINE_STATIC_CID_ACCESSOR(NS_TYPEAHEADFIND_CID);
3542 + NS_DEFINE_STATIC_CID_ACCESSOR(NS_TYPEAHEADFINDSEA_CID);
3543
3544 NS_DECL_ISUPPORTS
3545 - NS_DECL_NSITYPEAHEADFIND
3546 + NS_DECL_NSITYPEAHEADFINDSEA
3547 NS_DECL_NSIOBSERVER
3548 NS_DECL_NSIDOMEVENTLISTENER
3549 NS_DECL_NSISELECTIONLISTENER
3550 @@ -127,7 +127,7 @@
3551 // ----- nsITimerCallback -----------------------------
3552 NS_DECL_NSITIMERCALLBACK
3553
3554 - static nsTypeAheadFind *GetInstance();
3555 + static nsTypeAheadFindSea *GetInstance();
3556 static void ReleaseInstance(void);
3557 static PRBool IsTargetContentOkay(nsIContent *aContent);
3558
3559 @@ -185,7 +185,7 @@
3560 nsresult GetTranslatedString(const nsAString& aKey, nsAString& aStringOut);
3561
3562 // Used by GetInstance and ReleaseInstance
3563 - static nsTypeAheadFind *sInstance;
3564 + static nsTypeAheadFindSea *sInstance;
3565
3566 // Current find state
3567 nsString mTypeAheadBuffer;
3568 @@ -196,7 +196,7 @@
3569
3570 // PRBool's are used instead of PRPackedBool's where the address of the
3571 // boolean variable is getting passed into a method. For example:
3572 - // GetBoolPref("accessibility.typeaheadfind.linksonly", &mLinksOnlyPref);
3573 + // GetBoolPref("accessibility.typeaheadfindsea.linksonly", &mLinksOnlyPref);
3574 PRBool mIsFindAllowedInWindow;
3575 PRBool mAutoStartPref;
3576 PRBool mLinksOnlyPref;
3577 @@ -251,7 +251,7 @@
3578 nsCOMPtr<nsIDOMWindow> mFocusedWindow;
3579 nsCOMPtr<nsIWeakReference> mFocusedWeakShell;
3580
3581 - // Windows where typeaheadfind doesn't auto start as the user types
3582 + // Windows where typeaheadfindsea doesn't auto start as the user types
3583 nsCOMPtr<nsISupportsArray> mManualFindWindows;
3584 };
3585
3586 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp mozilla/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp
3587 --- mozilla.orig/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp 2005-03-26 00:12:02.000000000 -0500
3588 +++ mozilla/extensions/typeaheadfind/src/nsTypeAheadFindRegistration.cpp 2005-03-26 11:39:40.000000000 -0500
3589 @@ -55,7 +55,7 @@
3590
3591 // This function is called at component registration time
3592 static NS_METHOD
3593 -nsTypeAheadFindRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath,
3594 +nsTypeAheadFindSeaRegistrationProc(nsIComponentManager *aCompMgr, nsIFile *aPath,
3595 const char *registryLocation,
3596 const char *componentType,
3597 const nsModuleComponentInfo *info)
3598 @@ -64,7 +64,7 @@
3599 // an application component. This makes sure that we're
3600 // initialized on application startup.
3601
3602 - // Register nsTypeAheadFind to be instantiated on startup.
3603 + // Register nsTypeAheadFindSea to be instantiated on startup.
3604 // XXX This is needed on linux, but for some reason not needed on win32.
3605 nsresult rv;
3606 nsCOMPtr<nsICategoryManager> categoryManager =
3607 @@ -74,7 +74,7 @@
3608 rv = categoryManager->AddCategoryEntry(APPSTARTUP_CATEGORY,
3609 - "Type Ahead Find",
3610 + "Type Ahead Find Sea",
3611 "service,"
3612 - NS_TYPEAHEADFIND_CONTRACTID,
3613 + NS_TYPEAHEADFINDSEA_CONTRACTID,
3614 PR_TRUE, PR_TRUE, nsnull);
3615 }
3616
3617 @@ -82,22 +82,22 @@
3618 }
3619
3620
3621 -NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsTypeAheadFind,
3622 - nsTypeAheadFind::GetInstance)
3623 +NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(nsTypeAheadFindSea,
3624 + nsTypeAheadFindSea::GetInstance)
3625
3626 static void PR_CALLBACK
3627 -TypeAheadFindModuleDtor(nsIModule* self)
3628 +TypeAheadFindSeaModuleDtor(nsIModule* self)
3629 {
3630 - nsTypeAheadFind::ReleaseInstance();
3631 + nsTypeAheadFindSea::ReleaseInstance();
3632 }
3633
3634 static const nsModuleComponentInfo components[] =
3635 {
3636 - { "TypeAheadFind Component", NS_TYPEAHEADFIND_CID,
3637 - NS_TYPEAHEADFIND_CONTRACTID, nsTypeAheadFindConstructor,
3638 - nsTypeAheadFindRegistrationProc, nsnull // Unregistration proc
3639 + { "TypeAheadFindSea Component", NS_TYPEAHEADFINDSEA_CID,
3640 + NS_TYPEAHEADFINDSEA_CONTRACTID, nsTypeAheadFindSeaConstructor,
3641 + nsTypeAheadFindSeaRegistrationProc, nsnull // Unregistration proc
3642 }
3643 };
3644
3645 -NS_IMPL_NSGETMODULE_WITH_DTOR(nsTypeAheadFind, components,
3646 - TypeAheadFindModuleDtor)
3647 +NS_IMPL_NSGETMODULE_WITH_DTOR(nsTypeAheadFindSea, components,
3648 + TypeAheadFindSeaModuleDtor)
3649 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/typeaheadfind.pkg mozilla/extensions/typeaheadfind/src/typeaheadfind.pkg
3650 --- mozilla.orig/extensions/typeaheadfind/src/typeaheadfind.pkg 2005-03-26 00:12:02.000000000 -0500
3651 +++ mozilla/extensions/typeaheadfind/src/typeaheadfind.pkg 1969-12-31 19:00:00.000000000 -0500
3652 @@ -1,9 +0,0 @@
3653 -# why not ship this with GRE/embedding, if we're building it?
3654 -
3655 -[xpfe-browser browser]
3656 -#if SHARED_LIBRARY
3657 -dist/bin/components/@SHARED_LIBRARY@
3658 -#else
3659 -!staticcomp @LIBRARY@ @MODULE_NAME@
3660 -#endif
3661 -!xpt dist/bin/components/typeaheadfind.xpt
3662 diff -urN --exclude=CVS mozilla.orig/extensions/typeaheadfind/src/typeaheadfindsea.pkg mozilla/extensions/typeaheadfind/src/typeaheadfindsea.pkg
3663 --- mozilla.orig/extensions/typeaheadfind/src/typeaheadfindsea.pkg 1969-12-31 19:00:00.000000000 -0500
3664 +++ mozilla/extensions/typeaheadfind/src/typeaheadfindsea.pkg 2005-03-26 11:39:29.000000000 -0500
3665 @@ -0,0 +1,9 @@
3666 +# why not ship this with GRE/embedding, if we're building it?
3667 +
3668 +[xpfe-browser browser]
3669 +#if SHARED_LIBRARY
3670 +dist/bin/components/@SHARED_LIBRARY@
3671 +#else
3672 +!staticcomp @LIBRARY@ @MODULE_NAME@
3673 +#endif
3674 +!xpt dist/bin/components/typeaheadfindsea.xpt
3675
3676
3677
3678 1.1 src/patchsets/xulrunner/1.8.1.19/063_firefox-rpath-3.patch
3679
3680 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/063_firefox-rpath-3.patch?rev=1.1&view=markup
3681 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/063_firefox-rpath-3.patch?rev=1.1&content-type=text/plain
3682
3683 Index: 063_firefox-rpath-3.patch
3684 ===================================================================
3685 # Gentoo http://bugs.gentoo.org/show_bug.cgi?id=100597
3686
3687 --- mozilla/config/rules.mk.orig 2006-07-07 06:13:36.000000000 +0200
3688 +++ mozilla/config/rules.mk 2006-07-19 13:22:04.000000000 +0200
3689 @@ -510,7 +510,12 @@
3690 #
3691 ifeq ($(OS_ARCH),Linux)
3692 ifdef IS_COMPONENT
3693 +DSO_LDOPTS += -Wl,-rpath,'$$ORIGIN:$$ORIGIN/..'
3694 +OS_LDFLAGS += -Wl,-rpath,'$$ORIGIN:$$ORIGIN/..'
3695 EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
3696 +else
3697 +DSO_LDOPTS += -Wl,-rpath,'$$ORIGIN'
3698 +OS_LDFLAGS += -Wl,-rpath,'$$ORIGIN'
3699 endif
3700 endif
3701
3702
3703
3704
3705 1.1 src/patchsets/xulrunner/1.8.1.19/064_firefox-nsplugins-v2.patch
3706
3707 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/064_firefox-nsplugins-v2.patch?rev=1.1&view=markup
3708 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/064_firefox-nsplugins-v2.patch?rev=1.1&content-type=text/plain
3709
3710 Index: 064_firefox-nsplugins-v2.patch
3711 ===================================================================
3712 # Gentoo's Add a search path for plugins. by agriffis
3713
3714 --- mozilla/xpcom/io/nsAppFileLocationProvider.cpp.orig 2006-07-16 22:38:44.000000000 +0200
3715 +++ mozilla/xpcom/io/nsAppFileLocationProvider.cpp 2006-07-16 22:39:41.000000000 +0200
3716 @@ -215,6 +215,14 @@
3717 if (NS_SUCCEEDED(rv))
3718 rv = localFile->AppendRelativeNativePath(PLUGINS_DIR_NAME);
3719 }
3720 + else if (nsCRT::strcmp(prop, GENTOO_NSPLUGINS_DIR) == 0)
3721 + {
3722 + rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSPLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
3723 + }
3724 + else if (nsCRT::strcmp(prop, GENTOO_NSBROWSER_PLUGINS_DIR) == 0)
3725 + {
3726 + rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSBROWSER_PLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
3727 + }
3728 #if defined(XP_MAC) || defined(XP_MACOSX)
3729 else if (nsCRT::strcmp(prop, NS_MACOSX_USER_PLUGIN_DIR) == 0)
3730 {
3731 @@ -617,7 +625,7 @@
3732
3733 *_retval = new nsAppDirectoryEnumerator(this, keys);
3734 #else
3735 - static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
3736 + static const char* keys[] = { nsnull, GENTOO_NSPLUGINS_DIR, GENTOO_NSBROWSER_PLUGINS_DIR, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
3737 if (!keys[0] && !(keys[0] = PR_GetEnv("MOZ_PLUGIN_PATH"))) {
3738 static const char nullstr = 0;
3739 keys[0] = &nullstr;
3740
3741
3742
3743 1.1 src/patchsets/xulrunner/1.8.1.19/090_xul-gcc4.3.patch
3744
3745 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/090_xul-gcc4.3.patch?rev=1.1&view=markup
3746 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/090_xul-gcc4.3.patch?rev=1.1&content-type=text/plain
3747
3748 Index: 090_xul-gcc4.3.patch
3749 ===================================================================
3750 http://lists.opensuse.org/opensuse-commit/2007-11/msg00823.html
3751
3752 diff -Naur mozilla-orig/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.h mozilla/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.h
3753 --- mozilla-orig/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.h 2006-05-20 11:20:48.000000000 -0600
3754 +++ mozilla/modules/libpr0n/encoders/jpeg/nsJPEGEncoder.h 2008-01-06 22:13:39.000000000 -0600
3755 @@ -39,8 +39,10 @@
3756 #include "imgIEncoder.h"
3757 #ifdef MOZILLA_1_8_BRANCH
3758 #define imgIEncoder imgIEncoder_MOZILLA_1_8_BRANCH
3759 +#ifndef NS_DECL_IMGIENCODER
3760 #define NS_DECL_IMGIENCODER NS_DECL_IMGIENCODER_MOZILLA_1_8_BRANCH
3761 #endif
3762 +#endif
3763
3764 // needed for JPEG library
3765 #include <stdio.h>
3766 @@ -69,6 +71,14 @@
3767
3768 nsJPEGEncoder();
3769
3770 + NS_IMETHOD InitFromData(const PRUint8* aData,
3771 + PRUint32 aLength, // (unused, req'd by JS)
3772 + PRUint32 aWidth,
3773 + PRUint32 aHeight,
3774 + PRUint32 aStride,
3775 + PRUint32 aInputFormat,
3776 + const nsAString& aOutputOptions);
3777 +
3778 private:
3779 ~nsJPEGEncoder();
3780
3781 diff -Naur mozilla-orig/modules/libpr0n/encoders/png/nsPNGEncoder.h mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.h
3782 --- mozilla-orig/modules/libpr0n/encoders/png/nsPNGEncoder.h 2006-05-20 11:20:49.000000000 -0600
3783 +++ mozilla/modules/libpr0n/encoders/png/nsPNGEncoder.h 2008-01-06 22:11:36.000000000 -0600
3784 @@ -38,8 +38,10 @@
3785 #include "imgIEncoder.h"
3786 #ifdef MOZILLA_1_8_BRANCH
3787 #define imgIEncoder imgIEncoder_MOZILLA_1_8_BRANCH
3788 +#ifndef NS_DECL_IMGIENCODER
3789 #define NS_DECL_IMGIENCODER NS_DECL_IMGIENCODER_MOZILLA_1_8_BRANCH
3790 #endif
3791 +#endif
3792
3793 #include <png.h>
3794
3795 @@ -63,6 +65,14 @@
3796
3797 nsPNGEncoder();
3798
3799 + NS_IMETHOD InitFromData(const PRUint8* aData,
3800 + PRUint32 aLength, // (unused, req'd by JS)
3801 + PRUint32 aWidth,
3802 + PRUint32 aHeight,
3803 + PRUint32 aStride,
3804 + PRUint32 aInputFormat,
3805 + const nsAString& aOutputOptions);
3806 +
3807 private:
3808 ~nsPNGEncoder();
3809
3810 diff -Naur mozilla-orig/modules/libpr0n/public/imgIEncoder.idl mozilla/modules/libpr0n/public/imgIEncoder.idl
3811 --- mozilla-orig/modules/libpr0n/public/imgIEncoder.idl 2006-05-20 11:20:49.000000000 -0600
3812 +++ mozilla/modules/libpr0n/public/imgIEncoder.idl 2008-01-06 22:15:40.000000000 -0600
3813 @@ -96,6 +96,6 @@
3814 [scriptable, uuid(CCC5B3AD-3E67-4e3d-97E1-B06B2E96FEF8)]
3815 interface imgIEncoder : nsISupports
3816 {
3817 - void encodeClipboardImage(in nsIClipboardImage aClipboardImage, out nsIFile aImageFile);
3818 + /* void encodeClipboardImage(in nsIClipboardImage aClipboardImage, out nsIFile aImageFile); */
3819 };
3820
3821
3822
3823
3824 1.1 src/patchsets/xulrunner/1.8.1.19/110_components_no_exec.patch
3825
3826 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/110_components_no_exec.patch?rev=1.1&view=markup
3827 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/110_components_no_exec.patch?rev=1.1&content-type=text/plain
3828
3829 Index: 110_components_no_exec.patch
3830 ===================================================================
3831 #! /bin/sh /usr/share/dpatch/dpatch-run
3832 ## 110_components_no_exec.dpatch by Mike Hommey <glandium@××××××.org>
3833 ##
3834 ## All lines beginning with `## DP:' are a description of the patch.
3835 ## DP: install extra components without exec premissions. bz#331777
3836
3837 @DPATCH@
3838
3839 --- xulrunner/config/rules.mk 2005-08-11 18:41:53.000000000 +0200
3840 +++ xulrunner/config/rules.mk 2005-10-03 10:02:57.000000000 +0200
3841 @@ -1486,12 +1486,12 @@
3842 ifdef EXTRA_COMPONENTS
3843 libs:: $(EXTRA_COMPONENTS)
3844 ifndef NO_DIST_INSTALL
3845 - $(INSTALL) $(IFLAGS2) $^ $(FINAL_TARGET)/components
3846 + $(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)/components
3847 endif
3848
3849 install:: $(EXTRA_COMPONENTS)
3850 ifndef NO_INSTALL
3851 - $(SYSINSTALL) $(IFLAGS2) $^ $(DESTDIR)$(mozappdir)/components
3852 + $(SYSINSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)/components
3853 endif
3854 endif
3855
3856
3857
3858
3859 1.1 src/patchsets/xulrunner/1.8.1.19/110_icons.patch
3860
3861 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/110_icons.patch?rev=1.1&view=markup
3862 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/110_icons.patch?rev=1.1&content-type=text/plain
3863
3864 Index: 110_icons.patch
3865 ===================================================================
3866 #! /bin/sh /usr/share/dpatch/dpatch-run
3867 ## 110_icons.dpatch by Mike Hommey <glandium@××××××.org>
3868 ##
3869 ## All lines beginning with `## DP:' are a description of the patch.
3870 ## DP: Apply patch from bz#314927 to install default.xpm in the right place
3871
3872 @DPATCH@
3873
3874 === xulrunner/app/Makefile.in
3875 ==================================================================
3876 --- xulrunner/xulrunner/app/Makefile.in (revision 72)
3877 +++ xulrunner/xulrunner/app/Makefile.in (local)
3878 @@ -274,7 +274,7 @@
3879 $(INSTALL) $(DIST)/branding/default.xpm $(DIST)/bin/chrome/icons/default
3880
3881 install::
3882 - $(SYSINSTALL) $(IFLAGS1) $(DIST)/branding/default.xpm $(DESTDIR)$(mozappdir)/icons
3883 + $(SYSINSTALL) $(IFLAGS1) $(DIST)/branding/default.xpm $(DESTDIR)$(mozappdir)/chrome/icons/default
3884 endif
3885
3886 # XXX applications would need to supply this file
3887
3888
3889
3890 1.1 src/patchsets/xulrunner/1.8.1.19/110_no_chrome_list.patch
3891
3892 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/110_no_chrome_list.patch?rev=1.1&view=markup
3893 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/110_no_chrome_list.patch?rev=1.1&content-type=text/plain
3894
3895 Index: 110_no_chrome_list.patch
3896 ===================================================================
3897 #! /bin/sh /usr/share/dpatch/dpatch-run
3898 ## 110_no_chromelist.dpatch by Mike Hommey <glandium@××××××.org>
3899 ##
3900 ## All lines beginning with `## DP:' are a description of the patch.
3901 ## DP: Don't build chromelist.txt files. bz#331781
3902 ## DP: Also correctly call make-jars.pl. bz#333543
3903
3904 @DPATCH@
3905
3906 === config/rules.mk
3907 ==================================================================
3908 --- xulrunner/config/rules.mk (revision 69)
3909 +++ xulrunner/config/rules.mk (local)
3910 @@ -1561,8 +1561,6 @@
3911 $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/make-jars.pl \
3912 -d $(MAKE_JARS_TARGET)/chrome -j $(FINAL_TARGET)/chrome \
3913 $(MAKE_JARS_FLAGS) -- "$(XULPPFLAGS) $(DEFINES) $(ACDEFINES)"; \
3914 - $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/make-chromelist.pl \
3915 - $(FINAL_TARGET)/chrome $(JAR_MANIFEST) $(_NO_FLOCK); \
3916 fi
3917 endif
3918
3919 @@ -1575,10 +1573,8 @@
3920 $(PERL) $(MOZILLA_DIR)/config/preprocessor.pl $(XULPPFLAGS) $(DEFINES) $(ACDEFINES) \
3921 $(JAR_MANIFEST) | \
3922 $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/make-jars.pl \
3923 - -d $(MAKE_JARS_TARGET) -j $(DESTDIR)$(mozappdir)/chrome \
3924 + -d $(MAKE_JARS_TARGET)/chrome -j $(DESTDIR)$(mozappdir)/chrome \
3925 $(MAKE_JARS_FLAGS) -- "$(XULPPFLAGS) $(DEFINES) $(ACDEFINES)"; \
3926 - $(PERL) -I$(MOZILLA_DIR)/config $(MOZILLA_DIR)/config/make-chromelist.pl \
3927 - $(DESTDIR)$(mozappdir)/chrome $(JAR_MANIFEST) $(_NO_FLOCK); \
3928 fi
3929 endif
3930
3931
3932
3933
3934 1.1 src/patchsets/xulrunner/1.8.1.19/115_jni.patch
3935
3936 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/115_jni.patch?rev=1.1&view=markup
3937 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/115_jni.patch?rev=1.1&content-type=text/plain
3938
3939 Index: 115_jni.patch
3940 ===================================================================
3941 #! /bin/sh /usr/share/dpatch/dpatch-run
3942 ## 115_jni.dpatch by <glandium@××××××.org>
3943 ##
3944 ## All lines beginning with `## DP:' are a description of the patch.
3945 ## DP: Patch from bz#333738 to update java stubs
3946
3947 @DPATCH@
3948
3949 === sun-java/stubs/include/jni.h
3950 ==================================================================
3951 --- xulrunner/sun-java/stubs/include/jni.h (revision 134)
3952 +++ xulrunner/sun-java/stubs/include/jni.h (local)
3953 @@ -114,6 +114,8 @@
3954
3955 #endif
3956
3957 +typedef jobject jweak;
3958 +
3959 #if 0 /* moved to jri_md.h */
3960 typedef jobject jref; /* For transition---not meant to be part of public
3961 API anymore.*/
3962 @@ -148,8 +150,13 @@
3963 * possible return values for JNI functions.
3964 */
3965
3966 -#define JNI_OK 0
3967 -#define JNI_ERR (-1)
3968 +#define JNI_OK 0 /* success */
3969 +#define JNI_ERR (-1) /* unknown error */
3970 +#define JNI_EDETACHED (-2) /* thread detached from the VM */
3971 +#define JNI_EVERSION (-3) /* JNI version error */
3972 +#define JNI_ENOMEM (-4) /* not enough memory */
3973 +#define JNI_EEXIST (-5) /* VM already created */
3974 +#define JNI_EINVAL (-6) /* invalid arguments */
3975
3976 /*
3977 * used in ReleaseScalarArrayElements
3978 @@ -211,16 +218,21 @@
3979 jclass (JNICALL *FindClass)
3980 (JNIEnv *env, const char *name);
3981
3982 - void *reserved4;
3983 - void *reserved5;
3984 - void *reserved6;
3985 + jmethodID (JNICALL *FromReflectedMethod)
3986 + (JNIEnv *env, jobject method);
3987 + jfieldID (JNICALL *FromReflectedField)
3988 + (JNIEnv *env, jobject field);
3989
3990 + jobject (JNICALL *ToReflectedMethod)
3991 + (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic);
3992 +
3993 jclass (JNICALL *GetSuperclass)
3994 (JNIEnv *env, jclass sub);
3995 jboolean (JNICALL *IsAssignableFrom)
3996 (JNIEnv *env, jclass sub, jclass sup);
3997 - void *reserved7;
3998
3999 + jobject (JNICALL *ToReflectedField)
4000 + (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic);
4001
4002 jint (JNICALL *Throw)
4003 (JNIEnv *env, jthrowable obj);
4004 @@ -234,9 +246,12 @@
4005 (JNIEnv *env);
4006 void (JNICALL *FatalError)
4007 (JNIEnv *env, const char *msg);
4008 - void *reserved8;
4009 - void *reserved9;
4010
4011 + jint (JNICALL *PushLocalFrame)
4012 + (JNIEnv *env, jint capacity);
4013 + jobject (JNICALL *PopLocalFrame)
4014 + (JNIEnv *env, jobject result);
4015 +
4016 jobject (JNICALL *NewGlobalRef)
4017 (JNIEnv *env, jobject lobj);
4018 void (JNICALL *DeleteGlobalRef)
4019 @@ -245,8 +260,10 @@
4020 (JNIEnv *env, jobject obj);
4021 jboolean (JNICALL *IsSameObject)
4022 (JNIEnv *env, jobject obj1, jobject obj2);
4023 - void *reserved10;
4024 - void *reserved11;
4025 + jobject (JNICALL *NewLocalRef)
4026 + (JNIEnv *env, jobject ref);
4027 + jint (JNICALL *EnsureLocalCapacity)
4028 + (JNIEnv *env, jint capacity);
4029
4030 jobject (JNICALL *AllocObject)
4031 (JNIEnv *env, jclass clazz);
4032 @@ -706,6 +723,36 @@
4033
4034 jint (JNICALL *GetJavaVM)
4035 (JNIEnv *env, JavaVM **vm);
4036 +
4037 + void (JNICALL *GetStringRegion)
4038 + (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf);
4039 + void (JNICALL *GetStringUTFRegion)
4040 + (JNIEnv *env, jstring str, jsize start, jsize len, char *buf);
4041 +
4042 + void * (JNICALL *GetPrimitiveArrayCritical)
4043 + (JNIEnv *env, jarray array, jboolean *isCopy);
4044 + void (JNICALL *ReleasePrimitiveArrayCritical)
4045 + (JNIEnv *env, jarray array, void *carray, jint mode);
4046 +
4047 + const jchar * (JNICALL *GetStringCritical)
4048 + (JNIEnv *env, jstring string, jboolean *isCopy);
4049 + void (JNICALL *ReleaseStringCritical)
4050 + (JNIEnv *env, jstring string, const jchar *cstring);
4051 +
4052 + jweak (JNICALL *NewWeakGlobalRef)
4053 + (JNIEnv *env, jobject obj);
4054 + void (JNICALL *DeleteWeakGlobalRef)
4055 + (JNIEnv *env, jweak ref);
4056 +
4057 + jboolean (JNICALL *ExceptionCheck)
4058 + (JNIEnv *env);
4059 +
4060 + jobject (JNICALL *NewDirectByteBuffer)
4061 + (JNIEnv* env, void* address, jlong capacity);
4062 + void* (JNICALL *GetDirectBufferAddress)
4063 + (JNIEnv* env, jobject buf);
4064 + jlong (JNICALL *GetDirectBufferCapacity)
4065 + (JNIEnv* env, jobject buf);
4066 };
4067
4068 /*
4069 @@ -722,8 +769,6 @@
4070
4071 struct JNIEnv_ {
4072 const struct JNINativeInterface_ *functions;
4073 - void *reserved0;
4074 - void *reserved1[6];
4075 #ifdef __cplusplus
4076
4077 jint GetVersion() {
4078 @@ -736,6 +781,17 @@
4079 jclass FindClass(const char *name) {
4080 return functions->FindClass(this, name);
4081 }
4082 + jmethodID FromReflectedMethod(jobject method) {
4083 + return functions->FromReflectedMethod(this,method);
4084 + }
4085 + jfieldID FromReflectedField(jobject field) {
4086 + return functions->FromReflectedField(this,field);
4087 + }
4088 +
4089 + jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) {
4090 + return functions->ToReflectedMethod(this, cls, methodID, isStatic);
4091 + }
4092 +
4093 jclass GetSuperclass(jclass sub) {
4094 return functions->GetSuperclass(this, sub);
4095 }
4096 @@ -743,6 +799,10 @@
4097 return functions->IsAssignableFrom(this, sub, sup);
4098 }
4099
4100 + jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) {
4101 + return functions->ToReflectedField(this,cls,fieldID,isStatic);
4102 + }
4103 +
4104 jint Throw(jthrowable obj) {
4105 return functions->Throw(this, obj);
4106 }
4107 @@ -762,6 +822,13 @@
4108 functions->FatalError(this, msg);
4109 }
4110
4111 + jint PushLocalFrame(jint capacity) {
4112 + return functions->PushLocalFrame(this,capacity);
4113 + }
4114 + jobject PopLocalFrame(jobject result) {
4115 + return functions->PopLocalFrame(this,result);
4116 + }
4117 +
4118 jobject NewGlobalRef(jobject lobj) {
4119 return functions->NewGlobalRef(this,lobj);
4120 }
4121 @@ -776,6 +843,13 @@
4122 return functions->IsSameObject(this,obj1,obj2);
4123 }
4124
4125 + jobject NewLocalRef(jobject ref) {
4126 + return functions->NewLocalRef(this,ref);
4127 + }
4128 + jint EnsureLocalCapacity(jint capacity) {
4129 + return functions->EnsureLocalCapacity(this,capacity);
4130 + }
4131 +
4132 jobject AllocObject(jclass clazz) {
4133 return functions->AllocObject(this,clazz);
4134 }
4135 @@ -1726,9 +1800,71 @@
4136 return functions->GetJavaVM(this,vm);
4137 }
4138
4139 + void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) {
4140 + functions->GetStringRegion(this,str,start,len,buf);
4141 + }
4142 + void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) {
4143 + functions->GetStringUTFRegion(this,str,start,len,buf);
4144 + }
4145 +
4146 + void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) {
4147 + return functions->GetPrimitiveArrayCritical(this,array,isCopy);
4148 + }
4149 + void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) {
4150 + functions->ReleasePrimitiveArrayCritical(this,array,carray,mode);
4151 + }
4152 +
4153 + const jchar * GetStringCritical(jstring string, jboolean *isCopy) {
4154 + return functions->GetStringCritical(this,string,isCopy);
4155 + }
4156 + void ReleaseStringCritical(jstring string, const jchar *cstring) {
4157 + functions->ReleaseStringCritical(this,string,cstring);
4158 + }
4159 +
4160 + jweak NewWeakGlobalRef(jobject obj) {
4161 + return functions->NewWeakGlobalRef(this,obj);
4162 + }
4163 + void DeleteWeakGlobalRef(jweak ref) {
4164 + functions->DeleteWeakGlobalRef(this,ref);
4165 + }
4166 +
4167 + jboolean ExceptionCheck() {
4168 + return functions->ExceptionCheck(this);
4169 + }
4170 +
4171 + jobject NewDirectByteBuffer(void* address, jlong capacity) {
4172 + return functions->NewDirectByteBuffer(this, address, capacity);
4173 + }
4174 + void* GetDirectBufferAddress(jobject buf) {
4175 + return functions->GetDirectBufferAddress(this, buf);
4176 + }
4177 + jlong GetDirectBufferCapacity(jobject buf) {
4178 + return functions->GetDirectBufferCapacity(this, buf);
4179 + }
4180 +
4181 #endif /* __cplusplus */
4182 };
4183
4184 +typedef struct JavaVMOption {
4185 + char *optionString;
4186 + void *extraInfo;
4187 +} JavaVMOption;
4188 +
4189 +typedef struct JavaVMInitArgs {
4190 + jint version;
4191 +
4192 + jint nOptions;
4193 + JavaVMOption *options;
4194 + jboolean ignoreUnrecognized;
4195 +} JavaVMInitArgs;
4196 +
4197 +typedef struct JavaVMAttachArgs {
4198 + jint version;
4199 +
4200 + char *name;
4201 + jobject group;
4202 +} JavaVMAttachArgs;
4203 +
4204 /* These structures will be VM-specific. */
4205
4206 typedef struct JDK1_1InitArgs {
4207 @@ -1745,7 +1881,7 @@
4208
4209 jint (JNICALL *vfprintf)(FILE *fp, const char *format, va_list args);
4210 void (JNICALL *exit)(jint code);
4211 - void (JNICALL *abort)();
4212 + void (JNICALL *abort)(void);
4213
4214 jint enableClassGC;
4215 jint enableVerboseGC;
4216 @@ -1759,6 +1895,9 @@
4217 void * __padding; /* C compilers don't allow empty structures. */
4218 } JDK1_1AttachArgs;
4219
4220 +#define JDK1_2
4221 +#define JDK1_4
4222 +
4223 /* End VM-specific. */
4224
4225 struct JNIInvokeInterface_ {
4226 @@ -1768,39 +1907,63 @@
4227
4228 jint (JNICALL *DestroyJavaVM)(JavaVM *vm);
4229
4230 - jint (JNICALL *AttachCurrentThread)
4231 - (JavaVM *vm, JNIEnv **penv, void *args);
4232 + jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args);
4233
4234 jint (JNICALL *DetachCurrentThread)(JavaVM *vm);
4235 +
4236 + jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version);
4237 +
4238 + jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args);
4239 };
4240
4241 struct JavaVM_ {
4242 const struct JNIInvokeInterface_ *functions;
4243 - void *reserved0;
4244 - void *reserved1;
4245 - void *reserved2;
4246 #ifdef __cplusplus
4247
4248 jint DestroyJavaVM() {
4249 return functions->DestroyJavaVM(this);
4250 }
4251 - jint AttachCurrentThread(JNIEnv **penv, void *args) {
4252 + jint AttachCurrentThread(void **penv, void *args) {
4253 return functions->AttachCurrentThread(this, penv, args);
4254 }
4255 jint DetachCurrentThread() {
4256 return functions->DetachCurrentThread(this);
4257 }
4258
4259 + jint GetEnv(void **penv, jint version) {
4260 + return functions->GetEnv(this, penv, version);
4261 + }
4262 + jint AttachCurrentThreadAsDaemon(void **penv, void *args) {
4263 + return functions->AttachCurrentThreadAsDaemon(this, penv, args);
4264 + }
4265 #endif
4266 };
4267
4268 -JNI_PUBLIC_API(void) JNI_GetDefaultJavaVMInitArgs(void *);
4269 +#ifdef _JNI_IMPLEMENTATION_
4270 +#define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT
4271 +#else
4272 +#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT
4273 +#endif
4274 +_JNI_IMPORT_OR_EXPORT_ jint JNICALL
4275 +JNI_GetDefaultJavaVMInitArgs(void *args);
4276
4277 -JNI_PUBLIC_API(jint) JNI_CreateJavaVM(JavaVM **, JNIEnv **, void *);
4278 +_JNI_IMPORT_OR_EXPORT_ jint JNICALL
4279 +JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args);
4280
4281 -JNI_PUBLIC_API(jint) JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
4282 -JNI_PUBLIC_API(jref) JNI_MakeLocalRef(JNIEnv *pJNIEnv, void *pHObject);
4283 +_JNI_IMPORT_OR_EXPORT_ jint JNICALL
4284 +JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
4285
4286 +/* Defined by native libraries. */
4287 +JNIEXPORT jint JNICALL
4288 +JNI_OnLoad(JavaVM *vm, void *reserved);
4289 +
4290 +JNIEXPORT void JNICALL
4291 +JNI_OnUnload(JavaVM *vm, void *reserved);
4292 +
4293 +#define JNI_VERSION_1_1 0x00010001
4294 +#define JNI_VERSION_1_2 0x00010002
4295 +#define JNI_VERSION_1_4 0x00010004
4296 +
4297 #ifdef __cplusplus
4298 } /* extern "C" */
4299 #endif /* __cplusplus */
4300 === sun-java/stubs/include/jni_md.h
4301 ==================================================================
4302 --- xulrunner/sun-java/stubs/include/jni_md.h (revision 134)
4303 +++ xulrunner/sun-java/stubs/include/jni_md.h (local)
4304 @@ -81,20 +81,8 @@
4305 ******************************************************************************/
4306
4307 /* DLL Entry modifiers... */
4308 -#if defined(XP_OS2)
4309 -# ifdef XP_OS2_VACPP
4310 -# define JNI_PUBLIC_API(ResultType) ResultType _System
4311 -# define JNI_PUBLIC_VAR(VarType) VarType
4312 -# define JNICALL _Optlink
4313 -# define JNIEXPORT
4314 -# else
4315 -# define JNI_PUBLIC_API(ResultType) ResultType
4316 -# define JNI_PUBLIC_VAR(VarType) VarType
4317 -# define JNICALL
4318 -# define JNIEXPORT
4319 -# endif
4320 /* Win32 */
4321 -#elif defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32)
4322 +#if defined(XP_WIN) || defined(_WINDOWS) || defined(WIN32) || defined(_WIN32)
4323 # include <windows.h>
4324 # if defined(_MSC_VER) || defined(__GNUC__)
4325 # if defined(WIN32) || defined(_WIN32)
4326 @@ -135,7 +123,33 @@
4327 # endif
4328 /* This is the stuff inherited from JavaSoft .. */
4329 # define JNIEXPORT __declspec(dllexport)
4330 +# define JNIIMPORT __declspec(dllimport)
4331
4332 +/* OS/2 */
4333 +#elif defined(XP_OS2)
4334 +# ifdef XP_OS2_VACPP
4335 +# define JNI_PUBLIC_API(ResultType) ResultType _System
4336 +# define JNI_PUBLIC_VAR(VarType) VarType
4337 +# define JNICALL _Optlink
4338 +# define JNIEXPORT
4339 +# define JNIIMPORT
4340 +# elif defined(__declspec)
4341 +# define JNI_PUBLIC_API(ResultType) __declspec(dllexport) ResultType
4342 +# define JNI_PUBLIC_VAR(VarType) VarType
4343 +# define JNI_NATIVE_STUB(ResultType) __declspec(dllexport) ResultType
4344 +# define JNICALL
4345 +# define JNIEXPORT
4346 +# define JNIIMPORT
4347 +# else
4348 +# define JNI_PUBLIC_API(ResultType) ResultType
4349 +# define JNI_PUBLIC_VAR(VarType) VarType
4350 +# define JNICALL
4351 +# define JNIEXPORT
4352 +# define JNIIMPORT
4353 +# endif
4354 +# ifndef IS_LITTLE_ENDIAN
4355 +# define IS_LITTLE_ENDIAN
4356 +# endif
4357
4358 /* Mac */
4359 #elif macintosh || Macintosh || THINK_C
4360 @@ -161,6 +175,7 @@
4361 # define JNICALL
4362 /* This is the stuff inherited from JavaSoft .. */
4363 # define JNIEXPORT
4364 +# define JNIIMPORT
4365
4366 /* Unix or else */
4367 #else
4368 @@ -170,6 +185,7 @@
4369 # define JNICALL
4370 /* This is the stuff inherited from JavaSoft .. */
4371 # define JNIEXPORT
4372 +# define JNIIMPORT
4373 #endif
4374
4375 #ifndef FAR /* for non-Win16 */
4376
4377
4378
4379 1.1 src/patchsets/xulrunner/1.8.1.19/115_pyxpcom_deadcode.patch
4380
4381 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/115_pyxpcom_deadcode.patch?rev=1.1&view=markup
4382 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/115_pyxpcom_deadcode.patch?rev=1.1&content-type=text/plain
4383
4384 Index: 115_pyxpcom_deadcode.patch
4385 ===================================================================
4386 #! /bin/sh /usr/share/dpatch/dpatch-run
4387 ## 115_pyxpcom_deadcode.dpatch by Mike Hommey <glandium@××××××.org>
4388 ##
4389 ## All lines beginning with `## DP:' are a description of the patch.
4390 ## DP: Remove pyxpcom dead code and fix FTBFS on alpha this way. Closes:
4391 ## DP: #381662. bz#347865
4392
4393 @DPATCH@
4394
4395 === extensions/python/xpcom/src/PyGBase.cpp
4396 ==================================================================
4397 --- xulrunner/extensions/python/xpcom/src/PyGBase.cpp (revision 107)
4398 +++ xulrunner/extensions/python/xpcom/src/PyGBase.cpp (local)
4399 @@ -595,101 +595,6 @@
4400 return nr == NS_OK ? NS_OK : HandleNativeGatewayError(szMethodName);
4401 }
4402
4403 -nsresult PyG_Base::InvokeNativeGetViaPolicy(
4404 - const char *szPropertyName,
4405 - PyObject **ppResult /* = NULL */
4406 - )
4407 -{
4408 - PyObject *ob_ret = NULL;
4409 - nsresult ret = NS_OK;
4410 - PyObject *real_ob = NULL;
4411 - if ( m_pPyObject == NULL || szPropertyName == NULL )
4412 - return NS_ERROR_NULL_POINTER;
4413 - // First see if we have a method of that name.
4414 - char buf[256];
4415 - strcpy(buf, "get_");
4416 - strncat(buf, szPropertyName, sizeof(buf)*sizeof(buf[0])-strlen(buf)-1);
4417 - buf[sizeof(buf)/sizeof(buf[0])-1] = '\0';
4418 - ret = InvokeNativeViaPolicyInternal(buf, ppResult, nsnull, nsnull);
4419 - if (ret == NS_PYXPCOM_NO_SUCH_METHOD) {
4420 - // No method of that name - just try a property.
4421 - // Bit to a hack here to maintain the use of a policy.
4422 - // We actually get the policies underlying object
4423 - // to make the call on.
4424 - real_ob = PyObject_GetAttrString(m_pPyObject, "_obj_");
4425 - if (real_ob == NULL) {
4426 - PyErr_Format(PyExc_AttributeError, "The policy object does not have an '_obj_' attribute.");
4427 - ret = HandleNativeGatewayError(szPropertyName);
4428 - goto done;
4429 - }
4430 - ob_ret = PyObject_GetAttrString(real_ob, (char *)szPropertyName);
4431 - if (ob_ret==NULL) {
4432 - PyErr_Format(PyExc_AttributeError,
4433 - "The object does not have a 'get_%s' function, or a '%s attribute.",
4434 - szPropertyName, szPropertyName);
4435 - } else {
4436 - ret = NS_OK;
4437 - if (ppResult)
4438 - *ppResult = ob_ret;
4439 - else
4440 - Py_XDECREF(ob_ret);
4441 - }
4442 - }
4443 - if (ret != NS_OK)
4444 - ret = HandleNativeGatewayError(szPropertyName);
4445 -
4446 -done:
4447 - Py_XDECREF(real_ob);
4448 - return ret;
4449 -}
4450 -
4451 -nsresult PyG_Base::InvokeNativeSetViaPolicy(
4452 - const char *szPropertyName,
4453 - ...
4454 - )
4455 -{
4456 - if ( m_pPyObject == NULL || szPropertyName == NULL )
4457 - return NS_ERROR_NULL_POINTER;
4458 - nsresult ret = NS_OK;
4459 - PyObject *real_ob = NULL;
4460 - char buf[256];
4461 - strcpy(buf, "set_");
4462 - strncat(buf, szPropertyName, sizeof(buf)*sizeof(buf[0])-strlen(buf)-1);
4463 - buf[sizeof(buf)/sizeof(buf[0])-1] = '\0';
4464 - va_list va;
4465 - va_start(va, szPropertyName);
4466 - ret = InvokeNativeViaPolicyInternal(buf, NULL, "O", va);
4467 - va_end(va);
4468 - if (ret == NS_PYXPCOM_NO_SUCH_METHOD) {
4469 - // No method of that name - just try a property.
4470 - // Bit to a hack here to maintain the use of a policy.
4471 - // We actually get the policies underlying object
4472 - // to make the call on.
4473 - real_ob = PyObject_GetAttrString(m_pPyObject, "_obj_");
4474 - if (real_ob == NULL) {
4475 - PyErr_Format(PyExc_AttributeError, "The policy object does not have an '_obj_' attribute.");
4476 - ret = HandleNativeGatewayError(szPropertyName);
4477 - goto done;
4478 - }
4479 - va_list va2;
4480 - va_start(va2, szPropertyName);
4481 - PyObject *arg = va_arg( va2, PyObject *);
4482 - va_end(va2);
4483 - if (PyObject_SetAttrString(real_ob, (char *)szPropertyName, arg) == 0)
4484 - ret = NS_OK;
4485 - else {
4486 - PyErr_Format(PyExc_AttributeError,
4487 - "The object does not have a 'set_%s' function, or a '%s attribute.",
4488 - szPropertyName, szPropertyName);
4489 - }
4490 - }
4491 - if (ret != NS_OK)
4492 - ret = HandleNativeGatewayError(szPropertyName);
4493 -done:
4494 - Py_XDECREF(real_ob);
4495 - return ret;
4496 -}
4497 -
4498 // Get at the underlying Python object.
4499 PyObject *PyG_Base::UnwrapPythonObject(void)
4500 {
4501 === extensions/python/xpcom/src/PyXPCOM.h
4502 ==================================================================
4503 --- xulrunner/extensions/python/xpcom/src/PyXPCOM.h (revision 107)
4504 +++ xulrunner/extensions/python/xpcom/src/PyXPCOM.h (local)
4505 @@ -416,11 +416,6 @@
4506 PyObject **ppResult,
4507 const char *szFormat,
4508 va_list va);
4509 - nsresult InvokeNativeGetViaPolicy(const char *szPropertyName,
4510 - PyObject **ppResult = NULL
4511 - );
4512 - nsresult InvokeNativeSetViaPolicy(const char *szPropertyName,
4513 - ...);
4514 };
4515
4516 class PYXPCOM_EXPORT PyXPCOM_XPTStub : public PyG_Base, public nsXPTCStubBase
4517
4518
4519
4520 1.1 src/patchsets/xulrunner/1.8.1.19/120_about:plugins.patch
4521
4522 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/120_about:plugins.patch?rev=1.1&view=markup
4523 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/120_about:plugins.patch?rev=1.1&content-type=text/plain
4524
4525 Index: 120_about:plugins.patch
4526 ===================================================================
4527 #! /bin/sh /usr/share/dpatch/dpatch-run
4528 ## 120_about:plugins.dpatch by Mike Hommey <glandium@××××××.org>
4529 ##
4530 ## All lines beginning with `## DP:' are a description of the patch.
4531 ## DP: Install the files for about:plugins. bz#328678
4532
4533 @DPATCH@
4534
4535 === toolkit/content/jar.mn
4536 ==================================================================
4537 --- toolkit/content/jar.mn.orig 2007-03-17 23:09:53.000000000 +0100
4538 +++ toolkit/content/jar.mn 2007-03-17 23:10:19.000000000 +0100
4539 @@ -51,6 +51,7 @@
4540 content/global/bindings/autoscroll_all.png (widgets/autoscroll_all.png)
4541 content/global/bindings/autoscroll_h.png (widgets/autoscroll_h.png)
4542 content/global/bindings/autoscroll_v.png (widgets/autoscroll_v.png)
4543 + content/global/plugins.html (../../xpfe/global/resources/content/plugins.html)
4544 #ifdef XP_MACOSX
4545 * content/global/macWindowMenu.js (macWindowMenu.js)
4546 #endif
4547 === toolkit/themes/winstripe/global/jar.mn
4548 ==================================================================
4549 --- toolkit/themes/winstripe/global/jar.mn.orig 2007-03-17 23:12:29.000000000 +0100
4550 +++ toolkit/themes/winstripe/global/jar.mn 2007-03-17 23:15:04.000000000 +0100
4551 @@ -39,6 +39,7 @@
4552 skin/classic/global/toolbarbutton.css
4553 skin/classic/global/tree.css
4554 skin/classic/global/wizard.css
4555 + skin/classic/global/plugins.css (../../../../themes/classic/global/plugins.css)
4556 skin/classic/global/arrow/arrow-dn.gif (arrow/arrow-dn.gif)
4557 skin/classic/global/arrow/arrow-dn-dis.gif (arrow/arrow-dn-dis.gif)
4558 skin/classic/global/arrow/arrow-dn-hov.gif (arrow/arrow-dn-hov.gif)
4559
4560
4561
4562 1.1 src/patchsets/xulrunner/1.8.1.19/125_gnome_helpers_with_params.patch
4563
4564 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/125_gnome_helpers_with_params.patch?rev=1.1&view=markup
4565 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/125_gnome_helpers_with_params.patch?rev=1.1&content-type=text/plain
4566
4567 Index: 125_gnome_helpers_with_params.patch
4568 ===================================================================
4569 #! /bin/sh /usr/share/dpatch/dpatch-run
4570 ## 125_gnome_helpers_with_params.dpatch by Mike Hommey <glandium@××××××.org>
4571 ##
4572 ## All lines beginning with `## DP:' are a description of the patch.
4573 ## DP: Make helper applications with parameters work. Adapted patch from
4574 ## DP: bz#273524
4575
4576 @DPATCH@
4577
4578 === uriloader/exthandler/Makefile.in
4579 ==================================================================
4580 --- xulrunner/uriloader/exthandler/Makefile.in (revision 116)
4581 +++ xulrunner/uriloader/exthandler/Makefile.in (local)
4582 @@ -102,7 +102,7 @@
4583 LOCAL_INCLUDES = -I$(srcdir)
4584
4585 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
4586 -OSHELPER += nsGNOMERegistry.cpp
4587 +OSHELPER += nsMIMEInfoUnix.cpp nsGNOMERegistry.cpp
4588 endif
4589
4590 ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
4591 === uriloader/exthandler/unix/nsGNOMERegistry.cpp
4592 ==================================================================
4593 --- xulrunner/uriloader/exthandler/unix/nsGNOMERegistry.cpp (revision 116)
4594 +++ xulrunner/uriloader/exthandler/unix/nsGNOMERegistry.cpp (local)
4595 @@ -42,7 +42,7 @@
4596 #include "nsString.h"
4597 #include "nsIComponentManager.h"
4598 #include "nsILocalFile.h"
4599 -#include "nsMIMEInfoImpl.h"
4600 +#include "nsMIMEInfoUnix.h"
4601 #include "nsAutoPtr.h"
4602
4603 #include <glib.h>
4604 @@ -56,12 +56,12 @@
4605 typedef struct _GnomeProgram GnomeProgram;
4606 typedef struct _GnomeModuleInfo GnomeModuleInfo;
4607
4608 -typedef struct {
4609 +struct GnomeVFSMimeApplication {
4610 char *id;
4611 char *name;
4612 char *command;
4613 /* there is more here, but we don't need it */
4614 -} GnomeVFSMimeApplication;
4615 +};
4616
4617 typedef GConfClient * (*_gconf_client_get_default_fn)();
4618 typedef gchar * (*_gconf_client_get_string_fn)(GConfClient *,
4619 @@ -264,7 +264,7 @@
4620 }
4621
4622
4623 -/* static */ already_AddRefed<nsMIMEInfoBase>
4624 +/* static */ already_AddRefed<nsMIMEInfoUnix>
4625 nsGNOMERegistry::GetFromExtension(const char *aFileExt)
4626 {
4627 if (!gconfLib)
4628 @@ -286,7 +286,7 @@
4629 return GetFromType(mimeType);
4630 }
4631
4632 -/* static */ already_AddRefed<nsMIMEInfoBase>
4633 +/* static */ already_AddRefed<nsMIMEInfoUnix>
4634 nsGNOMERegistry::GetFromType(const char *aMIMEType)
4635 {
4636 if (!gconfLib)
4637 @@ -296,7 +296,7 @@
4638 if (!handlerApp)
4639 return nsnull;
4640
4641 - nsRefPtr<nsMIMEInfoImpl> mimeInfo = new nsMIMEInfoImpl(aMIMEType);
4642 + nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix(aMIMEType);
4643 NS_ENSURE_TRUE(mimeInfo, nsnull);
4644
4645 // Get the list of extensions and append then to the mimeInfo.
4646 @@ -320,11 +320,21 @@
4647 return nsnull;
4648 }
4649
4650 - gchar *commandPath = g_find_program_in_path(nativeCommand);
4651 + gchar **argv;
4652 + gboolean res = g_shell_parse_argv(nativeCommand, NULL, &argv, NULL);
4653 + if (!res) {
4654 + NS_ERROR("Could not convert helper app command to filesystem encoding");
4655 + _gnome_vfs_mime_application_free(handlerApp);
4656 + return nsnull;
4657 + }
4658
4659 + gchar *commandPath = g_find_program_in_path(argv[0]);
4660 +
4661 g_free(nativeCommand);
4662 + g_strfreev(argv);
4663
4664 if (!commandPath) {
4665 + NS_WARNING("could not find command in path");
4666 _gnome_vfs_mime_application_free(handlerApp);
4667 return nsnull;
4668 }
4669 @@ -342,7 +352,7 @@
4670
4671 _gnome_vfs_mime_application_free(handlerApp);
4672
4673 - nsMIMEInfoBase* retval;
4674 + nsMIMEInfoUnix* retval;
4675 NS_ADDREF((retval = mimeInfo));
4676 return retval;
4677 }
4678 === uriloader/exthandler/unix/nsGNOMERegistry.h
4679 ==================================================================
4680 --- xulrunner/uriloader/exthandler/unix/nsGNOMERegistry.h (revision 116)
4681 +++ xulrunner/uriloader/exthandler/unix/nsGNOMERegistry.h (local)
4682 @@ -35,10 +35,13 @@
4683 *
4684 * ***** END LICENSE BLOCK ***** */
4685
4686 +#ifndef nsGNOMERegistry_h__
4687 +#define nsGNOMERegistry_h__
4688 +
4689 #include "nsIURI.h"
4690 #include "nsCOMPtr.h"
4691
4692 -class nsMIMEInfoBase;
4693 +class nsMIMEInfoUnix;
4694
4695 class nsGNOMERegistry
4696 {
4697 @@ -52,7 +55,9 @@
4698 static void GetAppDescForScheme(const nsACString& aScheme,
4699 nsAString& aDesc);
4700
4701 - static already_AddRefed<nsMIMEInfoBase> GetFromExtension(const char *aFileExt);
4702 + static already_AddRefed<nsMIMEInfoUnix> GetFromExtension(const char *aFileExt);
4703
4704 - static already_AddRefed<nsMIMEInfoBase> GetFromType(const char *aMIMEType);
4705 + static already_AddRefed<nsMIMEInfoUnix> GetFromType(const char *aMIMEType);
4706 };
4707 +
4708 +#endif // nsGNOMERegistry_h__
4709 === uriloader/exthandler/unix/nsOSHelperAppService.cpp
4710 ==================================================================
4711 --- xulrunner/uriloader/exthandler/unix/nsOSHelperAppService.cpp (revision 175)
4712 +++ xulrunner/uriloader/exthandler/unix/nsOSHelperAppService.cpp (local)
4713 @@ -44,11 +44,13 @@
4714 #include "nsOSHelperAppService.h"
4715 #ifdef MOZ_WIDGET_GTK2
4716 #include "nsGNOMERegistry.h"
4717 +#include "nsMIMEInfoUnix.h"
4718 #endif
4719 #include "nsISupports.h"
4720 #include "nsString.h"
4721 #include "nsReadableUtils.h"
4722 #include "nsUnicharUtils.h"
4723 +#include "nsIStringEnumerator.h"
4724 #include "nsXPIDLString.h"
4725 #include "nsIURL.h"
4726 #include "nsIFileStreams.h"
4727 @@ -1486,6 +1488,22 @@
4728
4729 LOG(("Here we do a mimetype lookup for '%s'\n", aMIMEType.get()));
4730
4731 +#ifdef MOZ_WIDGET_GTK2
4732 + // Look in GNOME registry first since it is the preferred method in GNOME,
4733 + // should trump the mailcap entry
4734 + LOG(("Looking in GNOME registry\n"));
4735 + nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
4736 + if (gnomeInfo) {
4737 + LOG(("Got MIMEInfo from GNOME registry\n"));
4738 + nsCOMPtr<nsIUTF8StringEnumerator> extensions;
4739 + gnomeInfo->GetFileExtensions(getter_AddRefs(extensions));
4740 + PRBool hasMore;
4741 + extensions->HasMore(&hasMore);
4742 + if (hasMore)
4743 + return gnomeInfo;
4744 + }
4745 +#endif
4746 +
4747 // extract the major and minor types
4748 NS_ConvertASCIItoUTF16 mimeType(aMIMEType);
4749 nsAString::const_iterator start_iter, end_iter,
4750 @@ -1521,21 +1539,6 @@
4751 NS_LossyConvertUTF16toASCII(handler).get(),
4752 NS_LossyConvertUTF16toASCII(mailcap_description).get()));
4753
4754 -#ifdef MOZ_WIDGET_GTK2
4755 - nsMIMEInfoBase *gnomeInfo = nsnull;
4756 - if (handler.IsEmpty()) {
4757 - // No useful data yet. Check the GNOME registry. Unfortunately, newer
4758 - // GNOME versions no longer have type-to-extension mappings, so we might
4759 - // get back a MIMEInfo without any extensions set. In that case we'll have
4760 - // to look in our mime.types files for the extensions.
4761 - LOG(("Looking in GNOME registry\n"));
4762 - gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
4763 - if (gnomeInfo && gnomeInfo->HasExtensions()) {
4764 - LOG(("Got MIMEInfo from GNOME registry, and it has extensions set\n"));
4765 - return gnomeInfo;
4766 - }
4767 - }
4768 -#endif
4769
4770 // Now look up our extensions
4771 nsAutoString extensions, mime_types_description;
4772 === uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
4773 ==================================================================
4774 --- xulrunner/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp (revision 116)
4775 +++ xulrunner/uriloader/exthandler/unix/nsMIMEInfoUnix.cpp (local)
4776 @@ -0,0 +1,196 @@
4777 +/* ***** BEGIN LICENSE BLOCK *****
4778 + * Version: MPL 1.1
4779 + *
4780 + * The contents of this file are subject to the Mozilla Public License Version
4781 + * 1.1 (the "License"); you may not use this file except in compliance with
4782 + * the License. You may obtain a copy of the License at
4783 + * http://www.mozilla.org/MPL/
4784 + *
4785 + * Software distributed under the License is distributed on an "AS IS" basis,
4786 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
4787 + * for the specific language governing rights and limitations under the
4788 + * License.
4789 + *
4790 + * The Original Code is mozilla.org Code.
4791 + *
4792 + * The Initial Developer of the Original Code is
4793 + * Red Hat, Inc.
4794 + * Portions created by the Initial Developer are Copyright (C) 2005
4795 + * the Initial Developer. All Rights Reserved.
4796 + *
4797 + * Contributor(s):
4798 + * Christopher Aillon <caillon@××××××.com> (Original author)
4799 + *
4800 + *
4801 + * ***** END LICENSE BLOCK ***** */
4802 +
4803 +#include "nsMIMEInfoUnix.h"
4804 +#include "prlink.h"
4805 +#include "prmem.h"
4806 +#include <glib.h>
4807 +#include <glib-object.h>
4808 +
4809 +static PRLibrary *gnomeLib;
4810 +static PRLibrary *vfsLib;
4811 +
4812 +typedef struct _GnomeProgram GnomeProgram;
4813 +typedef struct _GnomeModuleInfo GnomeModuleInfo;
4814 +
4815 +typedef enum {
4816 + GNOME_VFS_OK // there's more but we don't care about them.
4817 +} GnomeVFSResult;
4818 +
4819 +typedef GnomeVFSResult (*_gnome_vfs_mime_application_launch_fn)
4820 + (GnomeVFSMimeApplication *app,
4821 + GList *uris);
4822 +typedef void (*_gnome_vfs_mime_application_free_fn)(GnomeVFSMimeApplication *);
4823 +typedef GnomeVFSMimeApplication * (*_gnome_vfs_mime_application_copy_fn)(GnomeVFSMimeApplication *);
4824 +typedef GnomeProgram * (*_gnome_program_init_fn)(const char *, const char *,
4825 + const GnomeModuleInfo *, int,
4826 + char **, const char *, ...);
4827 +typedef const char * (*_gnome_vfs_mime_application_get_name_fn)(GnomeVFSMimeApplication *);
4828 +typedef const GnomeModuleInfo * (*_libgnome_module_info_get_fn)();
4829 +typedef GnomeProgram * (*_gnome_program_get_fn)();
4830 +typedef char * (*_gnome_vfs_make_uri_from_input_fn)(const char *);
4831 +
4832 +#define DECL_FUNC_PTR(func) static _##func##_fn _##func
4833 +
4834 +DECL_FUNC_PTR(gnome_vfs_mime_application_launch);
4835 +DECL_FUNC_PTR(gnome_vfs_mime_application_free);
4836 +DECL_FUNC_PTR(gnome_vfs_mime_application_copy);
4837 +DECL_FUNC_PTR(gnome_vfs_mime_application_get_name);
4838 +DECL_FUNC_PTR(gnome_program_init);
4839 +DECL_FUNC_PTR(gnome_program_get);
4840 +DECL_FUNC_PTR(libgnome_module_info_get);
4841 +DECL_FUNC_PTR(gnome_vfs_make_uri_from_input);
4842 +
4843 +static PRLibrary *
4844 +LoadVersionedLibrary(const char* libName, const char* libVersion)
4845 +{
4846 + char *platformLibName = PR_GetLibraryName(nsnull, libName);
4847 + nsCAutoString versionLibName(platformLibName);
4848 + versionLibName.Append(libVersion);
4849 + PR_Free(platformLibName);
4850 + return PR_LoadLibrary(versionLibName.get());
4851 +}
4852 +
4853 +static void
4854 +Cleanup()
4855 +{
4856 + // Unload all libraries
4857 + if (gnomeLib)
4858 + PR_UnloadLibrary(gnomeLib);
4859 + if (vfsLib)
4860 + PR_UnloadLibrary(vfsLib);
4861 +
4862 + gnomeLib = vfsLib = nsnull;
4863 +}
4864 +
4865 +static void
4866 +InitGnomeVFS()
4867 +{
4868 + static PRBool initialized = PR_FALSE;
4869 +
4870 + if (initialized)
4871 + return;
4872 +
4873 + #define ENSURE_LIB(lib) \
4874 + PR_BEGIN_MACRO \
4875 + if (!lib) { \
4876 + Cleanup(); \
4877 + return; \
4878 + } \
4879 + PR_END_MACRO
4880 +
4881 + #define GET_LIB_FUNCTION(lib, func, failure) \
4882 + PR_BEGIN_MACRO \
4883 + _##func = (_##func##_fn) PR_FindFunctionSymbol(lib##Lib, #func); \
4884 + if (!_##func) { \
4885 + failure; \
4886 + } \
4887 + PR_END_MACRO
4888 +
4889 + // Attempt to open libgnome
4890 + gnomeLib = LoadVersionedLibrary("gnome-2", ".0");
4891 + ENSURE_LIB(gnomeLib);
4892 +
4893 + GET_LIB_FUNCTION(gnome, gnome_program_init, return Cleanup());
4894 + GET_LIB_FUNCTION(gnome, libgnome_module_info_get, return Cleanup());
4895 + GET_LIB_FUNCTION(gnome, gnome_program_get, return Cleanup());
4896 +
4897 + // Attempt to open libgnomevfs
4898 + vfsLib = LoadVersionedLibrary("gnomevfs-2", ".0");
4899 + ENSURE_LIB(vfsLib);
4900 +
4901 + GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_launch, /* do nothing */);
4902 + GET_LIB_FUNCTION(vfs, gnome_vfs_make_uri_from_input, return Cleanup());
4903 + GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_get_name, return Cleanup());
4904 + GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_free, return Cleanup());
4905 + GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_copy, return Cleanup());
4906 +
4907 + // Initialize GNOME, if it's not already initialized. It's not
4908 + // necessary to tell GNOME about our actual command line arguments.
4909 +
4910 + if (!_gnome_program_get()) {
4911 + char *argv[1] = { "gecko" };
4912 + _gnome_program_init("Gecko", "1.0", _libgnome_module_info_get(),
4913 + 1, argv, NULL);
4914 + }
4915 +
4916 + // Note: after GNOME has been initialized, do not ever unload these
4917 + // libraries. They register atexit handlers, so if they are unloaded, we'll
4918 + // crash on exit.
4919 +}
4920 +
4921 +void
4922 +nsMIMEInfoUnix::SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication* app)
4923 +{
4924 + if (_gnome_vfs_mime_application_copy && _gnome_vfs_mime_application_free) {
4925 + mDefaultVFSApplication = _gnome_vfs_mime_application_copy(app);
4926 +
4927 + mPreferredAction = nsIMIMEInfo::useSystemDefault;
4928 +
4929 + const gchar * name = _gnome_vfs_mime_application_get_name(mDefaultVFSApplication);
4930 + if (name)
4931 + mDefaultAppDescription = NS_ConvertUTF8toUCS2(name);
4932 + }
4933 +}
4934 +
4935 +nsMIMEInfoUnix::~nsMIMEInfoUnix()
4936 +{
4937 + if (mDefaultVFSApplication)
4938 + _gnome_vfs_mime_application_free(mDefaultVFSApplication);
4939 +}
4940 +
4941 +nsresult
4942 +nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile* aFile)
4943 +{
4944 + NS_ENSURE_ARG_POINTER(aFile);
4945 +
4946 + InitGnomeVFS();
4947 +
4948 + if (_gnome_vfs_mime_application_launch && mDefaultVFSApplication) {
4949 + nsCAutoString nativePath;
4950 + aFile->GetNativePath(nativePath);
4951 +
4952 + gchar *uri = _gnome_vfs_make_uri_from_input(nativePath.get());
4953 +
4954 + GList *uris = NULL;
4955 + uris = g_list_append(uris, uri);
4956 +
4957 + GnomeVFSResult result = _gnome_vfs_mime_application_launch(mDefaultVFSApplication, uris);
4958 +
4959 + g_free(uri);
4960 + g_list_free(uris);
4961 +
4962 + if (result != GNOME_VFS_OK)
4963 + return NS_ERROR_FAILURE;
4964 +
4965 + return NS_OK;
4966 + }
4967 +
4968 + if (!mDefaultApplication)
4969 + return NS_ERROR_FILE_NOT_FOUND;
4970 +
4971 + return LaunchWithIProcess(mDefaultApplication, aFile);
4972 +}
4973 === uriloader/exthandler/unix/nsMIMEInfoUnix.h
4974 ==================================================================
4975 --- xulrunner/uriloader/exthandler/unix/nsMIMEInfoUnix.h (revision 116)
4976 +++ xulrunner/uriloader/exthandler/unix/nsMIMEInfoUnix.h (local)
4977 @@ -0,0 +1,48 @@
4978 +/* ***** BEGIN LICENSE BLOCK *****
4979 + * Version: MPL 1.1
4980 + *
4981 + * The contents of this file are subject to the Mozilla Public License Version
4982 + * 1.1 (the "License"); you may not use this file except in compliance with
4983 + * the License. You may obtain a copy of the License at
4984 + * http://www.mozilla.org/MPL/
4985 + *
4986 + * Software distributed under the License is distributed on an "AS IS" basis,
4987 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
4988 + * for the specific language governing rights and limitations under the
4989 + * License.
4990 + *
4991 + * The Original Code is mozilla.org Code.
4992 + *
4993 + * The Initial Developer of the Original Code is
4994 + * Red Hat, Inc.
4995 + * Portions created by the Initial Developer are Copyright (C) 2005
4996 + * the Initial Developer. All Rights Reserved.
4997 + *
4998 + * Contributor(s):
4999 + * Christopher Aillon <caillon@××××××.com> (Original author)
5000 + *
5001 + *
5002 + * ***** END LICENSE BLOCK ***** */
5003 +
5004 +#ifndef nsMimeInfoUnix_h__
5005 +#define nsMimeInfoUnix_h__
5006 +
5007 +#include "nsMIMEInfoImpl.h"
5008 +
5009 +struct GnomeVFSMimeApplication;
5010 +
5011 +class nsMIMEInfoUnix : public nsMIMEInfoImpl
5012 +{
5013 +public:
5014 + nsMIMEInfoUnix(const char* aType = "") : nsMIMEInfoImpl(aType), mDefaultVFSApplication(nsnull) {}
5015 + virtual ~nsMIMEInfoUnix();
5016 +
5017 + void SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication *app);
5018 +
5019 +protected:
5020 + virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile* aFile);
5021 +
5022 + GnomeVFSMimeApplication *mDefaultVFSApplication;
5023 +};
5024 +
5025 +#endif // nsMimeInfoUnix_h__
5026
5027
5028
5029 1.1 src/patchsets/xulrunner/1.8.1.19/125_xpidl.patch
5030
5031 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/125_xpidl.patch?rev=1.1&view=markup
5032 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/125_xpidl.patch?rev=1.1&content-type=text/plain
5033
5034 Index: 125_xpidl.patch
5035 ===================================================================
5036 #! /bin/sh /usr/share/dpatch/dpatch-run
5037 ## 125_xpidl.dpatch by Mike Hommey <glandium@××××××.org>
5038 ##
5039 ## All lines beginning with `## DP:' are a description of the patch.
5040 ## DP: Fix crash when no file is given on the command line.
5041 ## DP: Fix the error message about extra arguments given showing before
5042 ## DP: the crash. bz#331818.
5043
5044 @DPATCH@
5045
5046 === xpcom/typelib/xpidl/xpidl.c
5047 ==================================================================
5048 --- xulrunner/xpcom/typelib/xpidl/xpidl.c (revision 62)
5049 +++ xulrunner/xpcom/typelib/xpidl/xpidl.c (local)
5050 @@ -260,7 +260,7 @@
5051 xpidl_usage(argc, argv);
5052 return 1;
5053 }
5054 - if (argc != i + 1) {
5055 + if (argc > i + 1) {
5056 fprintf(stderr, "ERROR: extra arguments after input file\n");
5057 }
5058
5059 @@ -268,7 +268,9 @@
5060 * Don't try to process multiple files, given that we don't handle -o
5061 * multiply.
5062 */
5063 - if (xpidl_process_idl(argv[i], inc_head, file_basename, mode))
5064 + if (i >= argc)
5065 + fprintf(stderr, "ERROR: no file to process\n");
5066 + else if (xpidl_process_idl(argv[i], inc_head, file_basename, mode))
5067 return 0;
5068
5069 return 1;
5070
5071
5072
5073 1.1 src/patchsets/xulrunner/1.8.1.19/125_xrender_bug_workaround.patch
5074
5075 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/125_xrender_bug_workaround.patch?rev=1.1&view=markup
5076 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/125_xrender_bug_workaround.patch?rev=1.1&content-type=text/plain
5077
5078 Index: 125_xrender_bug_workaround.patch
5079 ===================================================================
5080 #! /bin/sh /usr/share/dpatch/dpatch-run
5081 ## 125_xrender_bug_workaround.dpatch by Mike Hommey <glandium@××××××.org>
5082 ##
5083 ## All lines beginning with `## DP:' are a description of the patch.
5084 ## DP: Patch to work around a bug in XRender. bz#252033
5085 ## DP: Ultimately, the rendering is going to be done by cairo, so the bug
5086 ## DP: will disappear by itself when the gtk gfx engine will stop being used.
5087
5088 @DPATCH@
5089
5090 === gfx/src/gtk/nsFontMetricsXft.cpp
5091 ==================================================================
5092 --- xulrunner/gfx/src/gtk/nsFontMetricsXft.cpp (revision 22)
5093 +++ xulrunner/gfx/src/gtk/nsFontMetricsXft.cpp (local)
5094 @@ -2188,19 +2188,27 @@
5095 nsAutoDrawSpecBuffer::Flush()
5096 {
5097 if (mSpecPos) {
5098 - // Some Xft libraries will crash if none of the glyphs have any
5099 - // area. So before we draw, we scan through the glyphs. If we
5100 - // find any that have area, we can draw.
5101 - for (PRUint32 i = 0; i < mSpecPos; i++) {
5102 - XftGlyphFontSpec *sp = &mSpecBuffer[i];
5103 - XGlyphInfo info;
5104 - XftGlyphExtents(GDK_DISPLAY(), sp->font, &sp->glyph, 1, &info);
5105 - if (info.width && info.height) {
5106 - // If we get here it means we found a drawable glyph. We will
5107 - // Draw all the remaining glyphs and then break out of the loop
5108 - XftDrawGlyphFontSpec(mDraw, mColor, mSpecBuffer+i, mSpecPos-i);
5109 - break;
5110 + // There are two Xft problems to work around here:
5111 + // 1. Some Xft libraries reportedly crash if none of the
5112 + // glyphs have any area.
5113 + // 2. Because of an apparent X server bug (see bug 252033),
5114 + // a glyph with no area may cause all following glyphs to be
5115 + // dropped under some circumstances.
5116 + // For this reason, we manually ship out blocks of glyphs with
5117 + // area and skip blocks of glyphs with no area.
5118 + PRUint32 start = 0;
5119 + while (start < mSpecPos) {
5120 + PRUint32 i;
5121 + for (i = start; i < mSpecPos; i++) {
5122 + XftGlyphFontSpec *sp = &mSpecBuffer[i];
5123 + XGlyphInfo info;
5124 + XftGlyphExtents(GDK_DISPLAY(), sp->font, &sp->glyph, 1, &info);
5125 + if (!info.width || !info.height)
5126 + break;
5127 }
5128 + if (i > start)
5129 + XftDrawGlyphFontSpec(mDraw, mColor, mSpecBuffer+start, i-start);
5130 + start = i + 1;
5131 }
5132 mSpecPos = 0;
5133 }
5134
5135
5136
5137 1.1 src/patchsets/xulrunner/1.8.1.19/130_embedding_tests.patch
5138
5139 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/130_embedding_tests.patch?rev=1.1&view=markup
5140 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/130_embedding_tests.patch?rev=1.1&content-type=text/plain
5141
5142 Index: 130_embedding_tests.patch
5143 ===================================================================
5144 #! /bin/sh /usr/share/dpatch/dpatch-run
5145 ## 130_embedding_tests.dpatch by Mike Hommey <glandium@××××××.org>
5146 ##
5147 ## All lines beginning with `## DP:' are a description of the patch.
5148 ## DP: embedding tests. bz#93213
5149
5150 @DPATCH@
5151
5152 Index: configure.in
5153 ===================================================================
5154 RCS file: /cvsroot/mozilla/configure.in,v
5155 retrieving revision 1.1503
5156 diff -u -r1.1503 configure.in
5157 --- xulrunner/configure.in 9 Aug 2005 07:41:30 -0000 1.1503
5158 +++ xulrunner/configure.in 30 Aug 2005 08:09:43 -0000
5159 @@ -5152,6 +5152,19 @@
5160 ENABLE_TESTS=,
5161 ENABLE_TESTS=1 )
5162
5163 +
5164 +dnl ========================================================
5165 +dnl you can enable some tests even if tests are disabled by
5166 +dnl previous option
5167 +dnl ========================================================
5168 +ENABLE_EMBEDDING_TESTS=$ENABLE_TESTS
5169 +MOZ_ARG_ENABLE_BOOL(embedding-tests,
5170 +[ --enable-embedding-tests
5171 + Do build embedding tests libraries & programs,
5172 + even if tests are disabled],
5173 + ENABLE_EMBEDDING_TESTS=1,
5174 + ENABLE_EMBEDDING_TESTS= )
5175 +
5176 dnl ========================================================
5177 dnl =
5178 dnl = Module specific options
5179 @@ -6703,6 +6716,7 @@
5180 AC_SUBST(MOZ_STATIC_COMPONENT_LIBS)
5181 AC_SUBST(MOZ_ENABLE_LIBXUL)
5182 AC_SUBST(ENABLE_TESTS)
5183 +AC_SUBST(ENABLE_EMBEDDING_TESTS)
5184 AC_SUBST(IBMBIDI)
5185 AC_SUBST(SUNCTL)
5186 AC_SUBST(ACCESSIBILITY)
5187 Index: config/autoconf.mk.in
5188 ===================================================================
5189 RCS file: /cvsroot/mozilla/config/autoconf.mk.in,v
5190 retrieving revision 3.363
5191 diff -u -r3.363 autoconf.mk.in
5192 --- xulrunner/config/autoconf.mk.in 5 Aug 2005 17:09:41 -0000 3.363
5193 +++ xulrunner/config/autoconf.mk.in 30 Aug 2005 08:09:44 -0000
5194 @@ -106,6 +106,7 @@
5195 MOZ_STATIC_COMPONENT_LIBS = @MOZ_STATIC_COMPONENT_LIBS@
5196 MOZ_ENABLE_LIBXUL = @MOZ_ENABLE_LIBXUL@
5197 ENABLE_TESTS = @ENABLE_TESTS@
5198 +ENABLE_EMBEDDING_TESTS = @ENABLE_EMBEDDING_TESTS@
5199 IBMBIDI = @IBMBIDI@
5200 SUNCTL = @SUNCTL@
5201 ACCESSIBILITY = @ACCESSIBILITY@
5202 Index: embedding/browser/gtk/Makefile.in
5203 ===================================================================
5204 RCS file: /cvsroot/mozilla/embedding/browser/gtk/Makefile.in,v
5205 retrieving revision 1.8
5206 diff -u -r1.8 Makefile.in
5207 --- xulrunner/embedding/browser/gtk/Makefile.in 18 Apr 2004 22:00:31 -0000 1.8
5208 +++ xulrunner/embedding/browser/gtk/Makefile.in 30 Aug 2005 08:09:50 -0000
5209 @@ -44,7 +44,10 @@
5210 include $(DEPTH)/config/autoconf.mk
5211
5212 MODULE = gtkembedmoz
5213 -DIRS=src tests
5214 +DIRS = src
5215 +ifdef ENABLE_EMBEDDING_TESTS
5216 +DIRS += tests
5217 +endif
5218
5219 PACKAGE_FILE = gtkembed.pkg
5220
5221 Index: embedding/browser/gtk/gtkembed.pkg
5222 ===================================================================
5223 RCS file: /cvsroot/mozilla/embedding/browser/gtk/gtkembed.pkg,v
5224 retrieving revision 1.2
5225 diff -u -r1.2 gtkembed.pkg
5226 --- xulrunner/embedding/browser/gtk/gtkembed.pkg 7 Jan 2004 01:21:23 -0000 1.2
5227 +++ xulrunner/embedding/browser/gtk/gtkembed.pkg 30 Aug 2005 08:09:50 -0000
5228 @@ -1,6 +1,8 @@
5229 [gtkembed]
5230 dist/bin/@DLLP@gtkembedmoz@DLLS@
5231 +#if ENABLE_EMBEDDING_TESTS
5232 dist/bin/TestGtkEmbed
5233 +#endif
5234
5235 #if ENABLE_TESTS
5236 dist/bin/TestGtkEmbedNotebook@BINS@
5237
5238
5239
5240 1.1 src/patchsets/xulrunner/1.8.1.19/130_killAll.patch
5241
5242 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/130_killAll.patch?rev=1.1&view=markup
5243 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/130_killAll.patch?rev=1.1&content-type=text/plain
5244
5245 Index: 130_killAll.patch
5246 ===================================================================
5247 #! /bin/sh /usr/share/dpatch/dpatch-run
5248 ## 130_killAll.dpatch by Mike Hommey <glandium@××××××.org>
5249 ##
5250 ## All lines beginning with `## DP:' are a description of the patch.
5251 ## DP: Correctly install the killAll component. bz#333289.
5252
5253 @DPATCH@
5254
5255 === xpfe/components/killAll/Makefile.in
5256 ==================================================================
5257 --- xulrunner/xpfe/components/killAll/Makefile.in (revision 69)
5258 +++ xulrunner/xpfe/components/killAll/Makefile.in (local)
5259 @@ -42,11 +42,10 @@
5260
5261 include $(DEPTH)/config/autoconf.mk
5262
5263 +EXTRA_COMPONENTS = nsKillAll.js
5264 +
5265 include $(topsrcdir)/config/rules.mk
5266
5267 -libs::
5268 - $(INSTALL) $(srcdir)/nsKillAll.js $(DIST)/bin/components
5269 -
5270 clean::
5271 rm -f $(DIST)/bin/components/nsKillAll.js
5272
5273
5274
5275
5276 1.1 src/patchsets/xulrunner/1.8.1.19/131_system_bz2.patch
5277
5278 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/131_system_bz2.patch?rev=1.1&view=markup
5279 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/131_system_bz2.patch?rev=1.1&content-type=text/plain
5280
5281 Index: 131_system_bz2.patch
5282 ===================================================================
5283 #! /bin/sh /usr/share/dpatch/dpatch-run
5284 ## 131_system_bz2.dpatch by Mike Hommey <glandium@××××××.org>
5285 ##
5286 ## All lines beginning with `## DP:' are a description of the patch.
5287 ## DP: use system bz2. bz#305782.
5288
5289 @DPATCH@
5290
5291 === Makefile.in
5292 ==================================================================
5293 --- xulrunner/Makefile.in (revision 10)
5294 +++ xulrunner/Makefile.in (local)
5295 @@ -126,7 +126,9 @@
5296 endif
5297
5298 ifdef MOZ_UPDATER
5299 +ifndef MOZ_NATIVE_BZ2
5300 tier_1_dirs += modules/libbz2
5301 +endif
5302 tier_1_dirs += modules/libmar
5303 endif
5304
5305 === config/autoconf.mk.in
5306 ==================================================================
5307 --- xulrunner/config/autoconf.mk.in (revision 10)
5308 +++ xulrunner/config/autoconf.mk.in (local)
5309 @@ -181,6 +181,7 @@
5310 NECKO_COOKIES = @NECKO_COOKIES@
5311
5312 MOZ_NATIVE_ZLIB = @SYSTEM_ZLIB@
5313 +MOZ_NATIVE_BZ2 = @SYSTEM_BZ2@
5314 MOZ_NATIVE_JPEG = @SYSTEM_JPEG@
5315 MOZ_NATIVE_PNG = @SYSTEM_PNG@
5316 MOZ_TREE_CAIRO = @MOZ_TREE_CAIRO@
5317 @@ -370,6 +371,14 @@
5318 ZLIB_REQUIRES = zlib
5319 endif
5320
5321 +MOZ_BZ2_CFLAGS = @MOZ_BZ2_CFLAGS@
5322 +MOZ_BZ2_LIBS = @MOZ_BZ2_LIBS@
5323 +ifdef MOZ_NATIVE_BZ2
5324 +BZ2_REQUIRES =
5325 +else
5326 +BZ2_REQUIRES = libbz2
5327 +endif
5328 +
5329 ifdef MOZ_NATIVE_PNG
5330 PNG_CFLAGS = @PNG_CFLAGS@
5331 PNG_LIBS = @PNG_LIBS@
5332 === configure.in
5333 ==================================================================
5334 --- xulrunner/configure.in (revision 10)
5335 +++ xulrunner/configure.in (local)
5336 @@ -732,6 +732,8 @@
5337 MOZ_JPEG_LIBS='-L$(DIST)/lib -lmozjpeg'
5338 MOZ_ZLIB_CFLAGS=
5339 MOZ_ZLIB_LIBS='-L$(DIST)/lib -lmozz'
5340 +MOZ_BZ2_CFLAGS=
5341 +MOZ_BZ2_LIBS='-L$(DIST)/lib -lbz2'
5342 MOZ_PNG_CFLAGS=
5343 MOZ_PNG_LIBS='-L$(DIST)/lib -lmozpng'
5344
5345 @@ -1524,6 +1526,7 @@
5346 MOZ_PNG_LIBS='$(DIST)/lib/mozpng.lib'
5347 MOZ_XPCOM_OBSOLETE_LIBS='$(DIST)/lib/xpcom_compat.lib'
5348 MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.lib'
5349 + MOZ_BZ2_LIBS='$(DIST)/lib/bz2.lib'
5350 OBJ_SUFFIX=obj
5351 RANLIB='echo not_ranlib'
5352 STRIP='echo not_strip'
5353 @@ -1579,6 +1582,7 @@
5354 RCFLAGS='-O coff --use-temp-file'
5355 MOZ_JPEG_LIBS='-L$(DIST)/lib -ljpeg$(MOZ_BITS)$(VERSION_NUMBER)'
5356 MOZ_ZLIB_LIBS='-L$(DIST)/lib -lmozz'
5357 + MOZ_BZ2_LIBS='-L$(DIST)/lib -lbz2'
5358 MOZ_PNG_LIBS='-L$(DIST)/lib -lpng'
5359 MOZ_JS_LIBS='-L$(DIST)/lib -ljs$(MOZ_BITS)$(VERSION_NUMBER)'
5360 MOZ_FIX_LINK_PATHS=
5361 @@ -1618,6 +1622,7 @@
5362 MOZ_OPTIMIZE_FLAGS='-O1'
5363 MOZ_JPEG_LIBS='$(DIST)/lib/jpeg$(MOZ_BITS)$(VERSION_NUMBER).lib'
5364 MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.lib'
5365 + MOZ_BZ2_LIBS='$(DIST)/lib/bz2.lib'
5366 MOZ_PNG_LIBS='$(DIST)/lib/png.lib'
5367 MOZ_JS_LIBS='$(DIST)/lib/js$(MOZ_BITS)$(VERSION_NUMBER).lib'
5368 MOZ_FIX_LINK_PATHS=
5369 @@ -1923,6 +1928,7 @@
5370 LIBXUL_LIBS='$(DIST)/lib/xpcom.lib $(DIST)/lib/xul.lib'
5371 MOZ_JPEG_LIBS='$(DIST)/lib/mozjpeg.$(LIB_SUFFIX)'
5372 MOZ_ZLIB_LIBS='$(DIST)/lib/mozz.$(LIB_SUFFIX)'
5373 + MOZ_BZ2_LIBS='$(DIST)/lib/bz2.$(LIB_SUFFIX)'
5374 MOZ_PNG_LIBS='$(DIST)/lib/mozpng.$(LIB_SUFFIX)'
5375 MOZ_WIDGET_TOOLKIT_LDFLAGS='$(DIST)/lib/wdgt$(MOZ_WIDGET_TOOLKIT)'
5376 MOZ_GFX_TOOLKIT_LDFLAGS='$(DIST)/lib/gfx_$(MOZ_GFX_TOOLKIT)'
5377 @@ -3569,6 +3575,35 @@
5378 ZLIB_LIBS="-L${ZLIB_DIR}/lib ${ZLIB_LIBS}"
5379 fi
5380
5381 +dnl system BZIP2 Support
5382 +dnl ========================================================
5383 +MOZ_ARG_WITH_STRING(system-bz2,
5384 +[ --with-system-bz2[=PFX]
5385 + Use system libbz2 [installed at prefix PFX]],
5386 + BZ2_DIR=$withval)
5387 +
5388 +_SAVE_CFLAGS=$CFLAGS
5389 +_SAVE_LDFLAGS=$LDFLAGS
5390 +_SAVE_LIBS=$LIBS
5391 +if test -n "${BZ2_DIR}" -a "${BZ2_DIR}" != "yes"; then
5392 + CFLAGS="-I${BZ2_DIR}/include $CFLAGS"
5393 + LDFLAGS="-L${BZ2_DIR}/lib $LDFLAGS"
5394 +fi
5395 +if test -z "$BZ2_DIR" -o "$BZ2_DIR" = no; then
5396 + SYSTEM_BZ2=
5397 +else
5398 + AC_CHECK_LIB(bz2, BZ2_bzread, [SYSTEM_BZ2=1 MOZ_BZ2_LIBS="-lbz2"],
5399 + [SYSTEM_BZ2= MOZ_BZ2_CFLAGS= MOZ_BZ2_LIBS=], $MOZ_BZ2_LIBS)
5400 +fi
5401 +CFLAGS=$_SAVE_CFLAGS
5402 +LDFLAGS=$_SAVE_LDFLAGS
5403 +LIBS=$_SAVE_LIBS
5404 +
5405 +if test "${BZ2_DIR}" -a -d "${BZ2_DIR}" -a "$SYSTEM_BZ2" = 1; then
5406 + MOZ_BZ2_CFLAGS="-I${BZ2_DIR}/include"
5407 + MOZ_BZ2_LIBS="-L${BZ2_DIR}/lib ${MOZ_BZ2_LIBS}"
5408 +fi
5409 +
5410 dnl system PNG Support
5411 dnl ========================================================
5412 MOZ_ARG_WITH_STRING(system-png,
5413 @@ -6679,6 +6714,7 @@
5414 AC_SUBST(SYSTEM_JPEG)
5415 AC_SUBST(SYSTEM_PNG)
5416 AC_SUBST(SYSTEM_ZLIB)
5417 +AC_SUBST(SYSTEM_BZ2)
5418
5419 AC_SUBST(JPEG_CFLAGS)
5420 AC_SUBST(JPEG_LIBS)
5421 @@ -6691,6 +6727,8 @@
5422 AC_SUBST(MOZ_JPEG_LIBS)
5423 AC_SUBST(MOZ_ZLIB_CFLAGS)
5424 AC_SUBST(MOZ_ZLIB_LIBS)
5425 +AC_SUBST(MOZ_BZ2_CFLAGS)
5426 +AC_SUBST(MOZ_BZ2_LIBS)
5427 AC_SUBST(MOZ_PNG_CFLAGS)
5428 AC_SUBST(MOZ_PNG_LIBS)
5429
5430 === toolkit/mozapps/update/src/updater/Makefile.in
5431 ==================================================================
5432 --- xulrunner/toolkit/mozapps/update/src/updater/Makefile.in (revision 10)
5433 +++ xulrunner/toolkit/mozapps/update/src/updater/Makefile.in (local)
5434 @@ -52,11 +52,11 @@
5435
5436 PROGRAM = updater$(BIN_SUFFIX)
5437
5438 -REQUIRES = libmar libbz2
5439 +REQUIRES = libmar \
5440 + $(BZ2_REQUIRES)
5441
5442 LIBS += \
5443 $(DIST)/lib/$(LIB_PREFIX)mar.$(LIB_SUFFIX) \
5444 - $(DIST)/lib/$(LIB_PREFIX)bz2.$(LIB_SUFFIX) \
5445 $(NULL)
5446
5447 ifeq ($(OS_ARCH),WINNT)
5448 @@ -118,3 +118,6 @@
5449 # Pick up nsWindowsRestart.cpp
5450 LOCAL_INCLUDES += -I$(topsrcdir)/toolkit/xre
5451 endif
5452 +
5453 +CXXFLAGS += $(MOZ_BZ2_CFLAGS)
5454 +EXTRA_LIBS += $(MOZ_BZ2_LIBS)
5455 === toolkit/mozapps/update/src/updater/updater.cpp
5456 ==================================================================
5457 --- xulrunner/toolkit/mozapps/update/src/updater/updater.cpp (revision 10)
5458 +++ xulrunner/toolkit/mozapps/update/src/updater/updater.cpp (local)
5459 @@ -52,6 +52,7 @@
5460 #include "archivereader.h"
5461 #include "errors.h"
5462 #include "bzlib.h"
5463 +#include "nscore.h"
5464
5465 #include <stdio.h>
5466 #include <string.h>
5467 @@ -121,7 +122,7 @@
5468
5469 // This variable lives in libbz2. It's declared in bzlib_private.h, so we just
5470 // declare it here to avoid including that entire header file.
5471 -extern "C" unsigned int BZ2_crc32Table[256];
5472 +extern "C" NS_IMPORT_(unsigned int) BZ2_crc32Table[256];
5473
5474 static unsigned int
5475 crc32(const unsigned char *buf, unsigned int len)
5476
5477
5478
5479 1.1 src/patchsets/xulrunner/1.8.1.19/135_gtkmozembed_change_toplevel.patch
5480
5481 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/135_gtkmozembed_change_toplevel.patch?rev=1.1&view=markup
5482 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/135_gtkmozembed_change_toplevel.patch?rev=1.1&content-type=text/plain
5483
5484 Index: 135_gtkmozembed_change_toplevel.patch
5485 ===================================================================
5486 #! /bin/sh /usr/share/dpatch/dpatch-run
5487 ## 135_gtkmozembed_change_toplevel.dpatch by Mike Hommey <glandium@××××××.org>
5488 ##
5489 ## All lines beginning with `## DP:' are a description of the patch.
5490 ## DP: Fix drop-down menus when gtkmozembed is moved from different toplevel.
5491 ## DP: Patch from bz#296002
5492
5493 @DPATCH@
5494
5495 === widget/src/gtk2/nsWindow.cpp
5496 ==================================================================
5497 --- xulrunner/widget/src/gtk2/nsWindow.cpp (revision 118)
5498 +++ xulrunner/widget/src/gtk2/nsWindow.cpp (local)
5499 @@ -116,6 +116,9 @@
5500 static int is_parent_grab_leave(GdkEventCrossing *aEvent);
5501
5502 /* callbacks from widgets */
5503 +static void hierarchy_changed_cb (GtkWidget *container,
5504 + GtkWidget *previous_toplevel,
5505 + nsWindow *window);
5506 static gboolean expose_event_cb (GtkWidget *widget,
5507 GdkEventExpose *event);
5508 static gboolean configure_event_cb (GtkWidget *widget,
5509 @@ -261,6 +264,7 @@
5510 nsWindow::nsWindow()
5511 {
5512 mContainer = nsnull;
5513 + mParentContainer = nsnull;
5514 mDrawingarea = nsnull;
5515 mShell = nsnull;
5516 mWindowGroup = nsnull;
5517 @@ -432,6 +436,15 @@
5518 mDrawingarea = nsnull;
5519 }
5520
5521 + if (mParentContainer) {
5522 + g_object_remove_weak_pointer(G_OBJECT (mParentContainer),
5523 + (void**) &mParentContainer);
5524 + g_signal_handlers_disconnect_by_func
5525 + (mParentContainer, (void*)hierarchy_changed_cb, this);
5526 +
5527 + mParentContainer = nsnull;
5528 + }
5529 +
5530 OnDestroy();
5531
5532 #ifdef ACCESSIBILITY
5533 @@ -2341,18 +2354,14 @@
5534 }
5535 else if (mWindowType == eWindowType_popup) {
5536 mShell = gtk_window_new(GTK_WINDOW_POPUP);
5537 - if (topLevelParent) {
5538 - gtk_window_set_transient_for(GTK_WINDOW(mShell),
5539 - topLevelParent);
5540 - mTransientParent = topLevelParent;
5541 + SetTransientParent(topLevelParent);
5542
5543 - if (topLevelParent->group) {
5544 - gtk_window_group_add_window(topLevelParent->group,
5545 - GTK_WINDOW(mShell));
5546 - mWindowGroup = topLevelParent->group;
5547 - }
5548 - }
5549 - }
5550 + mParentContainer = parentMozContainer;
5551 + g_object_add_weak_pointer(G_OBJECT(mParentContainer),
5552 + (void**)&mParentContainer);
5553 + g_signal_connect(parentMozContainer, "hierarchy-changed",
5554 + G_CALLBACK(hierarchy_changed_cb), this);
5555 + }
5556 else { // must be eWindowType_toplevel
5557 mShell = gtk_window_new(GTK_WINDOW_TOPLEVEL);
5558 SetDefaultIcon();
5559 @@ -3236,6 +3245,25 @@
5560 return w;
5561 }
5562
5563 +void
5564 +nsWindow::SetTransientParent(GtkWindow *aParent)
5565 +{
5566 + if (mTransientParent && mTransientParent->group) {
5567 + gtk_window_group_remove_window(mTransientParent->group,
5568 + GTK_WINDOW(mShell));
5569 + mWindowGroup = nsnull;
5570 + }
5571 +
5572 + mTransientParent = aParent;
5573 + gtk_window_set_transient_for(GTK_WINDOW(mShell), aParent);
5574 +
5575 + if (aParent && aParent->group) {
5576 + gtk_window_group_add_window(aParent->group,
5577 + GTK_WINDOW(mShell));
5578 + mWindowGroup = aParent->group;
5579 + }
5580 +}
5581 +
5582 NS_IMETHODIMP
5583 nsWindow::MakeFullScreen(PRBool aFullScreen)
5584 {
5585 @@ -3605,6 +3633,16 @@
5586 // gtk callbacks
5587
5588 /* static */
5589 +void
5590 +hierarchy_changed_cb(GtkWidget *container, GtkWidget *previous_toplevel, nsWindow *window)
5591 +{
5592 + GtkWidget *toplevelCandidate = gtk_widget_get_toplevel (container);
5593 + GtkWidget *toplevel = GTK_WIDGET_TOPLEVEL (toplevelCandidate) ? toplevelCandidate : nsnull;
5594 +
5595 + window->SetTransientParent (GTK_WINDOW (toplevel));
5596 +}
5597 +
5598 +/* static */
5599 gboolean
5600 expose_event_cb(GtkWidget *widget, GdkEventExpose *event)
5601 {
5602 === widget/src/gtk2/nsWindow.h
5603 ==================================================================
5604 --- xulrunner/widget/src/gtk2/nsWindow.h (revision 118)
5605 +++ xulrunner/widget/src/gtk2/nsWindow.h (local)
5606 @@ -154,6 +154,8 @@
5607 void LoseFocus();
5608 gint ConvertBorderStyles(nsBorderStyle aStyle);
5609
5610 + void SetTransientParent(GtkWindow *aParent);
5611 +
5612 // event callbacks
5613 gboolean OnExposeEvent(GtkWidget *aWidget,
5614 GdkEventExpose *aEvent);
5615 @@ -294,6 +296,7 @@
5616
5617 GtkWidget *mShell;
5618 MozContainer *mContainer;
5619 + MozContainer *mParentContainer;
5620 MozDrawingarea *mDrawingarea;
5621
5622 GtkWindowGroup *mWindowGroup;
5623
5624
5625
5626 1.1 src/patchsets/xulrunner/1.8.1.19/135_pango_null_char.patch
5627
5628 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/135_pango_null_char.patch?rev=1.1&view=markup
5629 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/135_pango_null_char.patch?rev=1.1&content-type=text/plain
5630
5631 Index: 135_pango_null_char.patch
5632 ===================================================================
5633 #! /bin/sh /usr/share/dpatch/dpatch-run
5634 ## 135_pango_null_char.dpatch.dpatch by <glandium@××××××.org>
5635 ##
5636 ## All lines beginning with `## DP:' are a description of the patch.
5637 ## DP: Avoid freeze/crash when null characters are present in justified text
5638 ## DP: by discarding NULL characters before displaying. bz#366902
5639 ## DP: I don't like to have the two backends do different things, so we
5640 ## DP: just unconditionally apply the workaround.
5641
5642 @DPATCH@
5643
5644 === layout/generic/nsTextTransformer.h
5645 ==================================================================
5646 --- xulrunner/layout/generic/nsTextTransformer.h (revision 161)
5647 +++ xulrunner/layout/generic/nsTextTransformer.h (local)
5648 @@ -80,10 +80,10 @@
5649 #ifdef IBMBIDI
5650 // added BIDI formatting codes
5651 #define IS_DISCARDED(_ch) \
5652 - (((_ch) == CH_SHY) || ((_ch) == '\r') || IS_BIDI_CONTROL(_ch))
5653 + (((_ch) == CH_SHY) || ((_ch) == '\r') || IS_BIDI_CONTROL(_ch) || ((_ch) == '\0'))
5654 #else
5655 #define IS_DISCARDED(_ch) \
5656 - (((_ch) == CH_SHY) || ((_ch) == '\r'))
5657 + (((_ch) == CH_SHY) || ((_ch) == '\r') || ((_ch) == '\0'))
5658 #endif
5659
5660 #define IS_ASCII_CHAR(ch) ((ch&0xff80) == 0)
5661
5662
5663
5664 1.1 src/patchsets/xulrunner/1.8.1.19/135_zip_cache.patch
5665
5666 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/135_zip_cache.patch?rev=1.1&view=markup
5667 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/135_zip_cache.patch?rev=1.1&content-type=text/plain
5668
5669 Index: 135_zip_cache.patch
5670 ===================================================================
5671 #! /bin/sh /usr/share/dpatch/dpatch-run
5672 ## 135_zip_cache.dpatch by Mike Hommey <glandium@××××××.org>
5673 ##
5674 ## All lines beginning with `## DP:' are a description of the patch.
5675 ## DP: Invalidate cache for a zip file that got modified. It will prevent
5676 ## DP: corruption of the XUL FastLoad cache when upgrade is performed
5677 ## DP: while an instance of the application is running. bz#368428.
5678
5679 @DPATCH@
5680
5681 --- iceape/modules/libjar/nsJAR.h
5682 +++ iceape/modules/libjar/nsJAR.h
5683 @@ -117,6 +117,10 @@
5684 mCache = cache;
5685 }
5686
5687 + PRInt64 GetMtime() {
5688 + return mMtime;
5689 + }
5690 +
5691 PRFileDesc* OpenFile();
5692 protected:
5693 //-- Private data members
5694 @@ -131,6 +135,7 @@
5695 PRLock* mLock;
5696 PRInt32 mTotalItemsInManifest;
5697 PRFileDesc* mFd;
5698 + PRInt64 mMtime;
5699
5700 //-- Private functions
5701 nsresult ParseManifest(nsISignatureVerifier* verifier);
5702 --- iceape/modules/libjar/nsJAR.cpp
5703 +++ iceape/modules/libjar/nsJAR.cpp
5704 @@ -214,6 +214,7 @@
5705 nsJAR::Init(nsIFile* zipFile)
5706 {
5707 mZipFile = zipFile;
5708 + zipFile->GetLastModifiedTime(&mMtime);
5709 mLock = PR_NewLock();
5710 return mLock ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
5711 }
5712 @@ -1216,15 +1217,24 @@
5713 rv = zipFile->GetNativePath(path);
5714 if (NS_FAILED(rv)) return rv;
5715
5716 + PRInt64 Mtime;
5717 + rv = zipFile->GetLastModifiedTime(&Mtime);
5718 + if (NS_FAILED(rv)) return rv;
5719 +
5720 nsCStringKey key(path);
5721 nsJAR* zip = NS_STATIC_CAST(nsJAR*, NS_STATIC_CAST(nsIZipReader*,mZips.Get(&key))); // AddRefs
5722 - if (zip) {
5723 + if (zip && LL_EQ(Mtime, zip->GetMtime())) {
5724 #ifdef ZIP_CACHE_HIT_RATE
5725 mZipCacheHits++;
5726 #endif
5727 zip->ClearReleaseTime();
5728 }
5729 else {
5730 + if (zip) {
5731 + lock.unlock();
5732 + mZips.Remove(&key);
5733 + lock.lock();
5734 + }
5735 zip = new nsJAR();
5736 if (zip == nsnull)
5737 return NS_ERROR_OUT_OF_MEMORY;
5738
5739
5740
5741 1.1 src/patchsets/xulrunner/1.8.1.19/160_config_install.patch
5742
5743 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/160_config_install.patch?rev=1.1&view=markup
5744 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/160_config_install.patch?rev=1.1&content-type=text/plain
5745
5746 Index: 160_config_install.patch
5747 ===================================================================
5748 #! /bin/sh /usr/share/dpatch/dpatch-run
5749 ## 160_config_install.dpatch by Mike Hommey <glandium@××××××.org>
5750 ##
5751 ## All lines beginning with `## DP:' are a description of the patch.
5752 ## DP: Correct installation of all the headers files from the config/
5753 ## DP: directory.
5754
5755 @DPATCH@
5756
5757 === config/Makefile.in
5758 ==================================================================
5759 --- xulrunner/config/Makefile.in (revision 77)
5760 +++ xulrunner/config/Makefile.in (local)
5761 @@ -157,8 +157,7 @@
5762 echo "(nsBuildID.h is missing.)"; \
5763 exit 1; \
5764 fi;
5765 - $(SYSINSTALL) $(IFLAGS1) nsBuildID.h $(DESTDIR)$(includedir)
5766 - $(SYSINSTALL) $(IFLAGS1) $(DEPTH)/mozilla-config.h $(DESTDIR)$(includedir)
5767 + $(SYSINSTALL) $(IFLAGS1) $(HEADERS) $(DESTDIR)$(includedir)
5768
5769 GARBAGE += build_number nsBuildID \
5770 $(FINAL_LINK_COMPS) $(FINAL_LINK_LIBS) $(FINAL_LINK_COMP_NAMES)
5771
5772
5773
5774 1.1 src/patchsets/xulrunner/1.8.1.19/160_js_binary.patch
5775
5776 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/160_js_binary.patch?rev=1.1&view=markup
5777 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/160_js_binary.patch?rev=1.1&content-type=text/plain
5778
5779 Index: 160_js_binary.patch
5780 ===================================================================
5781 #! /bin/sh /usr/share/dpatch/dpatch-run
5782 ## 160_js_binary.dpatch by Mike Hommey <glandium@××××××.org>
5783 ##
5784 ## All lines beginning with `## DP:' are a description of the patch.
5785 ## DP: - JS binary. bz#331776
5786 ## DP: - Add readline support to xpcshell.
5787
5788 @DPATCH@
5789
5790 === config/autoconf.mk.in
5791 ==================================================================
5792 --- xulrunner/config/autoconf.mk.in (revision 7)
5793 +++ xulrunner/config/autoconf.mk.in (local)
5794 @@ -73,6 +73,9 @@
5795 MOZ_X11 = @MOZ_X11@
5796
5797 MOZ_JS_LIBS = @MOZ_JS_LIBS@
5798 +ENABLE_JS_BINARY = @ENABLE_JS_BINARY@
5799 +HAVE_READLINE = @HAVE_READLINE@
5800 +READLINE_LIBS = @READLINE_LIBS@
5801
5802 MOZ_GFX_TOOLKIT_LDFLAGS = @MOZ_GFX_TOOLKIT_LDFLAGS@
5803 MOZ_WIDGET_TOOLKIT_LDFLAGS = @MOZ_WIDGET_TOOLKIT_LDFLAGS@
5804 === config/rules.mk
5805 ==================================================================
5806 --- xulrunner/config/rules.mk (revision 7)
5807 +++ xulrunner/config/rules.mk (local)
5808 @@ -898,7 +898,7 @@
5809 ifeq ($(CPP_PROG_LINK),1)
5810 $(CCC) $(WRAP_MALLOC_CFLAGS) $(CXXFLAGS) -o $@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(BIN_FLAGS)
5811 else
5812 - $(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(BIN_FLAGS)
5813 + $(CC) $(WRAP_MALLOC_CFLAGS) $(CFLAGS) $(OUTOPTION)$@ $< $(WIN32_EXE_LDFLAGS) $(LDFLAGS) $(LIBS_DIR) $(LIBS) $(OS_LIBS) $(EXTRA_LIBS) $(WRAP_MALLOC_LIB) $(PROFILER_LIBS) $(BIN_FLAGS) $(PROG_LIBS)
5814 endif # CPP_PROG_LINK
5815 endif # WINNT && !GNU_CC
5816 endif # OS/2 VACPP
5817 === configure.in
5818 ==================================================================
5819 --- xulrunner/configure.in (revision 7)
5820 +++ xulrunner/configure.in (local)
5821 @@ -5116,6 +5116,40 @@
5822 AC_SUBST(JS_ULTRASPARC_OPTS)
5823
5824 dnl ========================================================
5825 +dnl = Enable building of the js standalone binary
5826 +dnl ========================================================
5827 +MOZ_ARG_ENABLE_BOOL(js-binary,
5828 +[ --enable-js-binary Build the standalone JS program],
5829 + ENABLE_JS_BINARY=1,
5830 + ENABLE_JS_BINARY= )
5831 +AC_SUBST(ENABLE_JS_BINARY)
5832 +
5833 +if test -n "$ENABLE_JS_BINARY"; then
5834 + dnl readline Support
5835 + dnl ========================================================
5836 + READLINE_DIR=no
5837 + MOZ_ARG_WITH_STRING(readline,
5838 + [ --with-readline[=PFX]
5839 + Use libreadline [installed at prefix PFX]],
5840 + READLINE_DIR=$withval)
5841 +
5842 + if test -n "${READLINE_DIR}" -a "${READLINE_DIR}" != "no"; then
5843 + _SAVE_LDFLAGS=$LDFLAGS
5844 + LDFLAGS="-L${READLINE_DIR}/lib $LDFLAGS"
5845 + AC_CHECK_LIB(readline, readline, [HAVE_READLINE=1 READLINE_LIBS="-lreadline"],
5846 + [HAVE_READLINE= READLINE_LIBS=])
5847 + LDFLAGS=$_SAVE_LDFLAGS
5848 + fi
5849 +
5850 + if test "${READLINE_DIR}" -a -d "${READLINE_DIR}" -a "$HAVE_READLINE" = 1; then
5851 + READLINE_LIBS="-L${READLINE_DIR}/lib ${READLINE_LIBS}"
5852 + fi
5853 +fi
5854 +
5855 +AC_SUBST(HAVE_READLINE)
5856 +AC_SUBST(READLINE_LIBS)
5857 +
5858 +dnl ========================================================
5859 dnl =
5860 dnl = Feature options that require extra sources to be pulled
5861 dnl =
5862 === js/src/Makefile.in
5863 ==================================================================
5864 --- xulrunner/js/src/Makefile.in (revision 7)
5865 +++ xulrunner/js/src/Makefile.in (local)
5866 @@ -54,6 +54,16 @@
5867 RESFILE = js$(MOZ_BITS)40.res
5868 endif
5869
5870 +ifdef ENABLE_JS_BINARY
5871 +SIMPLE_PROGRAMS = js
5872 +PROG_LIBS = -L. $(MOZ_JS_LIBS) $(NSPR_LIBS)
5873 +$(SIMPLE_PROGRAMS): $(DLL_PREFIX)$(LIBRARY_NAME)$(DLL_SUFFIX)
5874 +ifdef HAVE_READLINE
5875 +PROG_LIBS += $(READLINE_LIBS)
5876 +DEFINES = -DEDITLINE
5877 +endif
5878 +endif
5879 +
5880 PACKAGE_FILE = js.pkg
5881
5882 # JavaScript must be built shared, even for static builds, as it is used by
5883 === js/src/xpconnect/shell/Makefile.in
5884 ==================================================================
5885 --- xulrunner/js/src/xpconnect/shell/Makefile.in (revision 69)
5886 +++ xulrunner/js/src/xpconnect/shell/Makefile.in (local)
5887 @@ -74,7 +74,7 @@
5888 # look at mozilla/js/src/editline, which is license-free (but not part
5889 # of the mozilla build.)
5890 #
5891 -ifdef JS_READLINE
5892 +ifdef HAVE_READLINE
5893 DEFINES += -DEDITLINE
5894 -LIBS += -lreadline $(JS_READLINE_EXTRA_LIBS)
5895 +LIBS += $(READLINE_LIBS)
5896 endif
5897
5898
5899
5900 1.1 src/patchsets/xulrunner/1.8.1.19/160_pyxpcom.patch
5901
5902 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/160_pyxpcom.patch?rev=1.1&view=markup
5903 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/160_pyxpcom.patch?rev=1.1&content-type=text/plain
5904
5905 Index: 160_pyxpcom.patch
5906 ===================================================================
5907 #! /bin/sh /usr/share/dpatch/dpatch-run
5908 ## 160_pyxpcom.dpatch by Mike Hommey <glandium@××××××.org>
5909 ##
5910 ## All lines beginning with `## DP:' are a description of the patch.
5911 ## DP: - Fix installation directory for PyXPCOM
5912 ## DP: - Use a make variable for PYTHON_SO
5913
5914 @DPATCH@
5915
5916 === extensions/python/xpcom/Makefile.in
5917 ==================================================================
5918 --- xulrunner/extensions/python/xpcom/Makefile.in (revision 85)
5919 +++ xulrunner/extensions/python/xpcom/Makefile.in (local)
5920 @@ -90,9 +90,9 @@
5921 $(INSTALL) $(PYSRCS_XPCOMTOOLS) $(DIST)/bin/python/xpcom/tools
5922
5923 install::
5924 - $(SYSINSTALL) $(IFLAGS1) $(PYSRCS_XPCOM) $(DISTDIR)$(pyexecdir)/xpcom
5925 - $(SYSINSTALL) $(IFLAGS1) $(PYSRCS_XPCOMCLIENT) $(DISTDIR)$(pyexecdir)/xpcom/client
5926 - $(SYSINSTALL) $(IFLAGS1) $(PYSRCS_XPCOMSERVER) $(DISTDIR)$(pyexecdir)/xpcom/server
5927 + $(SYSINSTALL) $(IFLAGS1) $(PYSRCS_XPCOM) $(DESTDIR)$(pyexecdir)/xpcom
5928 + $(SYSINSTALL) $(IFLAGS1) $(PYSRCS_XPCOMCLIENT) $(DESTDIR)$(pyexecdir)/xpcom/client
5929 + $(SYSINSTALL) $(IFLAGS1) $(PYSRCS_XPCOMSERVER) $(DESTDIR)$(pyexecdir)/xpcom/server
5930
5931 clobber::
5932 rm -rf $(DIST)/bin/python/xpcom
5933 === extensions/python/xpcom/src/Makefile.in
5934 ==================================================================
5935 --- xulrunner/extensions/python/xpcom/src/Makefile.in (revision 85)
5936 +++ xulrunner/extensions/python/xpcom/src/Makefile.in (local)
5937 @@ -104,9 +104,11 @@
5938
5939 install::
5940 ifneq ($(OS_ARCH),WINNT)
5941 - $(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DISTDIR)$(pyexecdir)/xpcom
5942 - mv $(DISTDIR)$(pyexecdir)/xpcom/$(SHARED_LIBRARY) $(DISTDIR)$(pyexecdir)/xpcom/_xpcom$(PYTHON_DLL_SUFFIX)
5943 + $(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DESTDIR)$(pyexecdir)/xpcom
5944 + mv $(DESTDIR)$(pyexecdir)/xpcom/$(SHARED_LIBRARY) $(DESTDIR)$(pyexecdir)/xpcom/_xpcom$(PYTHON_DLL_SUFFIX)
5945 endif
5946 + rm -f $(DESTDIR)$(mozappdir)/$(SHARED_LIBRARY)
5947 + rm -f $(DESTDIR)$(mozappdir)/$(IMPORT_LIBRARY)
5948
5949 clobber::
5950 rm -f *.ilk *.pdb
5951 === extensions/python/xpcom/src/loader/Makefile.in
5952 ==================================================================
5953 --- xulrunner/extensions/python/xpcom/src/loader/Makefile.in (revision 94)
5954 +++ xulrunner/extensions/python/xpcom/src/loader/Makefile.in (local)
5955 @@ -61,7 +61,7 @@
5956 include $(topsrcdir)/config/config.mk
5957
5958 include $(topsrcdir)/config/rules.mk
5959 -CXXFLAGS += -DPYTHON_SO=\"libpython$(PYTHON_VER_DOTTED).so\"
5960 +CXXFLAGS += -DPYTHON_SO=\"$(PYTHON_SO)\"
5961 EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS)
5962
5963 clobber::
5964
5965
5966
5967 1.1 src/patchsets/xulrunner/1.8.1.19/160_xpcomstub.patch
5968
5969 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/160_xpcomstub.patch?rev=1.1&view=markup
5970 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/160_xpcomstub.patch?rev=1.1&content-type=text/plain
5971
5972 Index: 160_xpcomstub.patch
5973 ===================================================================
5974 #! /bin/sh /usr/share/dpatch/dpatch-run
5975 ## 160_xpcomstub.dpatch by Mike Hommey <glandium@××××××.org>
5976 ##
5977 ## All lines beginning with `## DP:' are a description of the patch.
5978 ## DP: Correctly install dependentlibs.list
5979
5980 @DPATCH@
5981
5982 === xpcom/stub/Makefile.in
5983 ==================================================================
5984 --- xulrunner/xpcom/stub/Makefile.in (revision 73)
5985 +++ xulrunner/xpcom/stub/Makefile.in (local)
5986 @@ -118,8 +125,14 @@
5987
5988 include $(topsrcdir)/config/rules.mk
5989
5990 -libs:: $(FINAL_TARGET)/dependentlibs.list
5991 +libs:: dependentlibs.list
5992 + $(INSTALL) $(IFLAGS1) $^ $(FINAL_TARGET)
5993
5994 -$(FINAL_TARGET)/dependentlibs.list: Makefile.in
5995 +install:: dependentlibs.list
5996 + $(INSTALL) $(IFLAGS1) $^ $(DESTDIR)$(mozappdir)
5997 +
5998 +dependentlibs.list: Makefile.in
5999 $(EXIT_ON_ERROR) \
6000 ( $(foreach dlib,$(DEPENDENT_LIBS_LIST),echo $(dlib);) ) > $@
6001 +
6002 +GARBAGE += dependentlibs.list
6003
6004
6005
6006 1.1 src/patchsets/xulrunner/1.8.1.19/161_javaxpcom.patch
6007
6008 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/161_javaxpcom.patch?rev=1.1&view=markup
6009 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/161_javaxpcom.patch?rev=1.1&content-type=text/plain
6010
6011 Index: 161_javaxpcom.patch
6012 ===================================================================
6013 #! /bin/sh /usr/share/dpatch/dpatch-run
6014 ## 161_javaxpcom.dpatch by Mike Hommey <glandium@××××××.org>
6015 ##
6016 ## All lines beginning with `## DP:' are a description of the patch.
6017 ## DP: - Don't install GenerateJavaInterfaces. bz#333542
6018 ## DP: - Correctly install javaxpcom.jar.
6019 ## DP: - Don't use visibility flags so that symbols are exported.
6020
6021 @DPATCH@
6022
6023 === extensions/java/xpcom/tools/genifaces/Makefile.in
6024 ==================================================================
6025 --- xulrunner/extensions/java/xpcom/tools/genifaces/Makefile.in (revision 73)
6026 +++ xulrunner/extensions/java/xpcom/tools/genifaces/Makefile.in (local)
6027 @@ -54,6 +54,8 @@
6028 CPPSRCS = GenerateJavaInterfaces.cpp
6029
6030 SIMPLE_PROGRAMS = GenerateJavaInterfaces$(BIN_SUFFIX)
6031 +NO_INSTALL = 1
6032 +NO_DIST_INSTALL = 1
6033
6034 LIBS += \
6035 $(LIBS_DIR) \
6036 === extensions/java/xpcom/glue/Makefile.in
6037 ==================================================================
6038 --- xulrunner/extensions/java/xpcom/glue/Makefile.in.orig 2007-03-25 17:19:53.000000000 +0200
6039 +++ xulrunner/extensions/java/xpcom/glue/Makefile.in 2007-03-25 17:20:18.000000000 +0200
6040 @@ -44,6 +44,7 @@
6041
6042 MODULE = javaxpcomglue
6043 LIBRARY_NAME = javaxpcomglue
6044 +VISIBILITY_FLAGS =
6045 ifeq ($(OS_ARCH),OS2)
6046 SHORT_LIBNAME = jxpcmglu
6047 endif
6048
6049
6050
6051 1.1 src/patchsets/xulrunner/1.8.1.19/165_mouse_buttons.patch
6052
6053 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/165_mouse_buttons.patch?rev=1.1&view=markup
6054 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/165_mouse_buttons.patch?rev=1.1&content-type=text/plain
6055
6056 Index: 165_mouse_buttons.patch
6057 ===================================================================
6058 #! /bin/sh /usr/share/dpatch/dpatch-run
6059 ## 165_mouse_buttons.dpatch by Mike Hommey <glandium@××××××.org>
6060 ##
6061 ## All lines beginning with `## DP:' are a description of the patch.
6062 ## DP: Extended mouse buttons support taken from #244305. Thanks Peter Colberg
6063
6064 @DPATCH@
6065
6066 === widget/src/gtk2/nsWindow.cpp
6067 ==================================================================
6068 --- xulrunner/widget/src/gtk2/nsWindow.cpp (revision 72)
6069 +++ xulrunner/widget/src/gtk2/nsWindow.cpp (local)
6070 @@ -1543,6 +1543,9 @@
6071 return;
6072
6073 switch (aEvent->button) {
6074 + case 1:
6075 + eventType = NS_MOUSE_LEFT_BUTTON_DOWN;
6076 + break;
6077 case 2:
6078 eventType = NS_MOUSE_MIDDLE_BUTTON_DOWN;
6079 break;
6080 @@ -1550,7 +1553,7 @@
6081 eventType = NS_MOUSE_RIGHT_BUTTON_DOWN;
6082 break;
6083 default:
6084 - eventType = NS_MOUSE_LEFT_BUTTON_DOWN;
6085 + return;
6086 break;
6087 }
6088
6089
6090
6091
6092 1.1 src/patchsets/xulrunner/1.8.1.19/165_native_uconv.patch
6093
6094 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/165_native_uconv.patch?rev=1.1&view=markup
6095 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/165_native_uconv.patch?rev=1.1&content-type=text/plain
6096
6097 Index: 165_native_uconv.patch
6098 ===================================================================
6099 #! /bin/sh /usr/share/dpatch/dpatch-run
6100 ## 165_native_uconv.dpatch by Mike Hommey <glandium@××××××.org>
6101 ##
6102 ## All lines beginning with `## DP:' are a description of the patch.
6103 ## DP: - Fix for the build to succeed when iconv support is enabled.
6104 ## DP: (Makefile.in ; borrowed from upstream fix in version 1.7 of the file)
6105 ## DP: - Don't build what is useless when native uconv is enabled. bz#331780.
6106 ## DP: - Properly load invalid UTF-8 files. bz#331748
6107 ## DP: - Add the scriptableunicodeconverter component. bz#333261
6108 ## DP: - Correct aliases for gbk and euc-tw.
6109 ## DP: - Allow claimed iso-8859-1 actually encoded as windows-1252 to be converted
6110 ## DP: flawlessly
6111
6112 @DPATCH@
6113
6114 --- xulrunner/intl/uconv/Makefile.in (revision 158)
6115 +++ xulrunner/intl/uconv/Makefile.in (local)
6116 @@ -57,10 +57,12 @@
6117
6118 MODULE = uconv
6119
6120 -DIRS = idl public util ucvja ucvcn ucvlatin ucvtw ucvtw2 ucvko ucvibm
6121 +DIRS = idl public util
6122
6123 ifdef MOZ_USE_NATIVE_UCONV
6124 DIRS += native
6125 +else
6126 +DIRS += ucvja ucvcn ucvlatin ucvtw ucvtw2 ucvko ucvibm
6127 endif
6128
6129 DIRS += src
6130 --- xulrunner/intl/uconv/native/nsINativeUConvService.idl (revision 158)
6131 +++ xulrunner/intl/uconv/native/nsINativeUConvService.idl (local)
6132 @@ -45,8 +45,9 @@
6133 * nsIUnicodeEncoder
6134 * nsICharRepresentable
6135 */
6136 -[uuid(c60097ba-c79d-461b-9116-80a66404c0b0)]
6137 +[uuid(99e23ae8-c334-44de-a208-a7aa6923f8f5)]
6138 interface nsINativeUConvService : nsISupports
6139 {
6140 - nsISupports getNativeConverter(in string from, in string to);
6141 + nsISupports getNativeUnicodeDecoder(in string from);
6142 + nsISupports getNativeUnicodeEncoder(in string to);
6143 };
6144 --- xulrunner/intl/uconv/native/nsNativeUConvService.cpp (revision 158)
6145 +++ xulrunner/intl/uconv/native/nsNativeUConvService.cpp (local)
6146 @@ -52,8 +52,16 @@
6147 #include <langinfo.h> // nl_langinfo
6148 #include <iconv.h> // iconv_open, iconv, iconv_close
6149 #include <errno.h>
6150 +#include <string.h> // memcpy
6151
6152 +#ifdef IS_LITTLE_ENDIAN
6153 +const char UTF16[] = "UTF-16LE";
6154 +#else
6155 +const char UTF16[] = "UTF-16BE";
6156 +#endif
6157
6158 +#define NS_UCONV_CONTINUATION_BUFFER_LENGTH 8
6159 +
6160 class IConvAdaptor : public nsIUnicodeDecoder,
6161 public nsIUnicodeEncoder,
6162 public nsICharRepresentable
6163 @@ -102,21 +110,13 @@
6164
6165
6166 private:
6167 - nsresult ConvertInternal(void * aSrc,
6168 - PRInt32 * aSrcLength,
6169 - PRInt32 aSrcCharSize,
6170 - void * aDest,
6171 - PRInt32 * aDestLength,
6172 - PRInt32 aDestCharSize);
6173 -
6174 -
6175 iconv_t mConverter;
6176 PRBool mReplaceOnError;
6177 PRUnichar mReplaceChar;
6178 + char mContinuationBuffer[NS_UCONV_CONTINUATION_BUFFER_LENGTH];
6179 + PRInt32 mContinuationLength;
6180
6181 -#ifdef DEBUG
6182 - nsCString mFrom, mTo;
6183 -#endif
6184 + const char *mFrom, *mTo;
6185 };
6186
6187 NS_IMPL_ISUPPORTS3(IConvAdaptor,
6188 @@ -128,6 +128,7 @@
6189 {
6190 mConverter = 0;
6191 mReplaceOnError = PR_FALSE;
6192 + mContinuationLength = 0;
6193 }
6194
6195 IConvAdaptor::~IConvAdaptor()
6196 @@ -139,10 +140,8 @@
6197 nsresult
6198 IConvAdaptor::Init(const char* from, const char* to)
6199 {
6200 -#ifdef DEBUG
6201 mFrom = from;
6202 mTo = to;
6203 -#endif
6204
6205 mConverter = iconv_open(to, from);
6206 if (mConverter == (iconv_t) -1 )
6207 @@ -153,22 +152,129 @@
6208 mConverter = nsnull;
6209 return NS_ERROR_FAILURE;
6210 }
6211 + mContinuationLength = 0;
6212 +
6213 return NS_OK;
6214 }
6215
6216 -// From some charset to ucs2
6217 +// From some charset to UTF-16
6218 nsresult
6219 IConvAdaptor::Convert(const char * aSrc,
6220 PRInt32 * aSrcLength,
6221 PRUnichar * aDest,
6222 PRInt32 * aDestLength)
6223 {
6224 - return ConvertInternal( (void*) aSrc,
6225 - aSrcLength,
6226 - 1,
6227 - (void*) aDest,
6228 - aDestLength,
6229 - 2);
6230 + nsresult res = NS_OK;
6231 + size_t inLeft, outLeft;
6232 +
6233 + if (!mConverter) {
6234 + NS_WARNING("Converter Not Initialized");
6235 + return NS_ERROR_NOT_INITIALIZED;
6236 + }
6237 +
6238 + if (mTo != UTF16) {
6239 + NS_WARNING("Not an UnicodeDecoder");
6240 + return NS_ERROR_UNEXPECTED;
6241 + }
6242 +
6243 + inLeft = (size_t) *aSrcLength;
6244 + outLeft = (size_t) *aDestLength * sizeof(PRUnichar);
6245 +
6246 + if (mContinuationLength > 0) {
6247 + PRInt32 bufLength = NS_UCONV_CONTINUATION_BUFFER_LENGTH - mContinuationLength,
6248 + oneChar = 2, continuationLength = mContinuationLength;
6249 +
6250 +#ifdef DEBUG
6251 + printf(" * IConvAdaptor - Have %d bytes in continuation buffer\n", mContinuationLength);
6252 +#endif
6253 +
6254 + bufLength = bufLength > *aSrcLength ? *aSrcLength : bufLength;
6255 + memcpy(&mContinuationBuffer[mContinuationLength],
6256 + aSrc, bufLength);
6257 + bufLength = mContinuationLength + bufLength;
6258 +
6259 + mContinuationLength = 0; // We don't want to enter an infinite loop
6260 +
6261 + res = Convert(mContinuationBuffer, &bufLength, aDest, &oneChar);
6262 + switch (res) {
6263 + case NS_OK_UDEC_MOREINPUT: // Contination buffer ended before filling the 2
6264 + // output words, with an incomplete sequence, filling
6265 + // a new continuation buffer.
6266 + if (bufLength < continuationLength) { // still not enough data
6267 + *aSrcLength = 0;
6268 + *aDestLength = 0;
6269 + return NS_OK_UDEC_MOREINPUT;
6270 + }
6271 + mContinuationLength = 0;
6272 + case NS_OK: // Continuation buffer ended, unlikely (8 input bytes leading
6273 + // exactly to 2 output words is quite unlikely)
6274 + case NS_OK_UDEC_MOREOUTPUT: // Standard case, we continue with the
6275 + // normal conversion
6276 + inLeft = (size_t) *aSrcLength - (bufLength - continuationLength);
6277 + outLeft -= oneChar * sizeof(PRUnichar);
6278 + aSrc += bufLength - continuationLength;
6279 + aDest += oneChar;
6280 + break;
6281 + case NS_ERROR_UDEC_ILLEGALINPUT:
6282 + *aSrcLength = 0; // Corner case: replacement won't be done as
6283 + // if it were in the middle of the buffer, since
6284 + // we can't tell the caller the bad character is
6285 + // at -mContinuationLength
6286 + *aDestLength = 0;
6287 + return res;
6288 + }
6289 + }
6290 +
6291 + do {
6292 + if ( iconv(mConverter,
6293 + (char **)&aSrc,
6294 + &inLeft,
6295 + (char **)&aDest,
6296 + &outLeft) == (size_t) -1 ) {
6297 + switch (errno) {
6298 + case EILSEQ: // Invalid multibyte sequence
6299 + if (mReplaceOnError) {
6300 + *(aDest++) = mReplaceChar;
6301 + outLeft -= sizeof(PRUnichar);
6302 + aSrc++;
6303 + inLeft--;
6304 + res = NS_OK;
6305 +#ifdef DEBUG
6306 + printf(" * IConvAdaptor - Replacing char in output ( %s -> %s )\n",
6307 + mFrom, mTo);
6308 +#endif
6309 + } else {
6310 +#ifdef DEBUG
6311 + printf(" * IConvAdaptor - Bad input ( %s -> %s )\n",
6312 + mFrom, mTo);
6313 +#endif
6314 + res = NS_ERROR_UDEC_ILLEGALINPUT;
6315 + }
6316 + break;
6317 + case EINVAL: // Incomplete multibyte sequence
6318 + mContinuationLength = inLeft;
6319 + memmove(mContinuationBuffer, aSrc, inLeft);
6320 +#ifdef DEBUG
6321 + printf(" * IConvAdaptor - Incomplete multibyte sequence in input ( %s -> %s )\n",
6322 + mFrom, mTo);
6323 +#endif
6324 + res = NS_OK_UDEC_MOREINPUT;
6325 + break;
6326 + case E2BIG: // Output buffer full
6327 +#ifdef DEBUG
6328 + printf(" * IConvAdaptor - Output buffer full ( %s -> %s )\n",
6329 + mFrom, mTo);
6330 +#endif
6331 + res = NS_OK_UDEC_MOREOUTPUT;
6332 + break;
6333 + }
6334 + }
6335 + } while (mReplaceOnError && (res == NS_OK) && (inLeft != 0));
6336 +
6337 + *aSrcLength -= inLeft;
6338 + *aDestLength -= (outLeft / sizeof(PRUnichar));
6339 +
6340 + return res;
6341 }
6342
6343 nsresult
6344 @@ -176,12 +282,14 @@
6345 PRInt32 aSrcLength,
6346 PRInt32 * aDestLength)
6347 {
6348 - if (!mConverter)
6349 - return NS_ERROR_UENC_NOMAPPING;
6350 + if (!mConverter) {
6351 + NS_WARNING("Converter Not Initialized");
6352 + return NS_ERROR_NOT_INITIALIZED;
6353 + }
6354
6355 *aDestLength = aSrcLength*4; // sick
6356 #ifdef DEBUG
6357 - printf(" * IConvAdaptor - - GetMaxLength %d ( %s -> %s )\n", *aDestLength, mFrom.get(), mTo.get());
6358 + printf(" * IConvAdaptor - GetMaxLength %d ( %s -> %s )\n", *aDestLength, mFrom, mTo);
6359 #endif
6360 return NS_OK;
6361 }
6362 @@ -190,19 +298,16 @@
6363 nsresult
6364 IConvAdaptor::Reset()
6365 {
6366 - const char *zero_char_in_ptr = NULL;
6367 - char *zero_char_out_ptr = NULL;
6368 - size_t zero_size_in = 0,
6369 - zero_size_out = 0;
6370 + if (!mConverter) {
6371 + NS_WARNING("Converter Not Initialized");
6372 + return NS_ERROR_NOT_INITIALIZED;
6373 + }
6374
6375 - iconv(mConverter,
6376 - (char **)&zero_char_in_ptr,
6377 - &zero_size_in,
6378 - &zero_char_out_ptr,
6379 - &zero_size_out);
6380 + iconv(mConverter, NULL, NULL, NULL, NULL);
6381 + mContinuationLength = 0;
6382
6383 #ifdef DEBUG
6384 - printf(" * IConvAdaptor - - Reset\n");
6385 + printf(" * IConvAdaptor - Reset\n");
6386 #endif
6387 return NS_OK;
6388 }
6389 @@ -215,19 +320,138 @@
6390 char * aDest,
6391 PRInt32 * aDestLength)
6392 {
6393 - return ConvertInternal( (void*) aSrc,
6394 - aSrcLength,
6395 - 2,
6396 - (void*) aDest,
6397 - aDestLength,
6398 - 1);
6399 + nsresult res = NS_OK;
6400 + size_t inLeft, outLeft;
6401 +
6402 + if (!mConverter) {
6403 + NS_WARNING("Converter Not Initialized");
6404 + return NS_ERROR_NOT_INITIALIZED;
6405 + }
6406 +
6407 + if (mFrom != UTF16) {
6408 + NS_WARNING("Not an UnicodeEncoder");
6409 + return NS_ERROR_UNEXPECTED;
6410 + }
6411 +
6412 + inLeft = (size_t) *aSrcLength * sizeof(PRUnichar);
6413 + outLeft = (size_t) *aDestLength;
6414 +
6415 + if (mContinuationLength > 0) {
6416 + // If we're continuing, that means we have a word in the buffer, and
6417 + // that we only need one more word, UTF-16 characters being 2 or 4 bytes
6418 + // long.
6419 + PRInt32 bufLength = 2, destLength = *aDestLength;
6420 +
6421 +#ifdef DEBUG
6422 + printf(" * IConvAdaptor - Have %d bytes in continuation buffer\n", mContinuationLength);
6423 +#endif
6424 +
6425 + mContinuationLength = 0; // We don't want to enter an infinite loop
6426 +
6427 + ((PRUnichar *) mContinuationBuffer)[1] = *aSrc;
6428 +
6429 + int i;
6430 + for (i = 0; i < 4; i++) {
6431 + printf("%02x ", mContinuationBuffer[i]);
6432 + }
6433 + printf("\n");
6434 +
6435 + res = Convert((PRUnichar *) mContinuationBuffer, &bufLength, aDest, &destLength);
6436 + switch (res) {
6437 + case NS_OK_UENC_MOREOUTPUT:
6438 + case NS_ERROR_UENC_NOMAPPING:
6439 + *aSrcLength = 0;
6440 + *aDestLength = 0;
6441 + return res;
6442 + case NS_OK:
6443 + printf("NS_OK %d\n", bufLength);
6444 + outLeft -= destLength;
6445 + inLeft -= sizeof(PRUnichar); // We necessarily have consumed 1 word
6446 + aSrc++;
6447 + aDest += destLength;
6448 + }
6449 + }
6450 +
6451 + do {
6452 + if ( iconv(mConverter,
6453 + (char **)&aSrc,
6454 + &inLeft,
6455 + (char **)&aDest,
6456 + &outLeft) == (size_t) -1 ) {
6457 + switch (errno) {
6458 + case EILSEQ: // Invalid multibyte sequence ; there's no way
6459 + // to know if it's invalid input or input that
6460 + // doesn't have mapping in the output charset,
6461 + // but we'll assume our input UTF-16 is valid.
6462 + if (mReplaceOnError) {
6463 + *(aDest++) = (char)mReplaceChar;
6464 + outLeft--;
6465 + aSrc++;
6466 + inLeft -= sizeof(PRUnichar);
6467 + res = NS_OK;
6468 +#ifdef DEBUG
6469 + printf(" * IConvAdaptor - Replacing char in output ( %s -> %s )\n",
6470 + mFrom, mTo);
6471 +#endif
6472 + } else {
6473 +#ifdef DEBUG
6474 + printf(" * IConvAdaptor - No mapping in output charset ( %s -> %s )\n",
6475 + mFrom, mTo);
6476 +#endif
6477 + res = NS_ERROR_UENC_NOMAPPING;
6478 + }
6479 + break;
6480 + case EINVAL: // Incomplete UTF-16 sequence. Happens when dealing with characters
6481 + // outside BMP split between 2 buffers.
6482 +#ifdef DEBUG
6483 + printf(" * IConvAdaptor - Incomplete UTF-16 character in input. ( %s -> %s )\n",
6484 + mFrom, mTo);
6485 +#endif
6486 + mContinuationLength = 2;
6487 + ((PRUnichar *) mContinuationBuffer)[0] = *aSrc;
6488 + res = NS_OK_UENC_MOREINPUT;
6489 + break;
6490 + case E2BIG: // Output buffer full
6491 +#ifdef DEBUG
6492 + printf(" * IConvAdaptor - Output buffer full ( %s -> %s )\n",
6493 + mFrom, mTo);
6494 +#endif
6495 + res = NS_OK_UENC_MOREOUTPUT;
6496 + break;
6497 + }
6498 + }
6499 + } while (mReplaceOnError && (res == NS_OK) && (inLeft != 0));
6500 +
6501 + *aSrcLength -= (inLeft / sizeof(PRUnichar));
6502 + *aDestLength -= outLeft;
6503 +
6504 + return res;
6505 }
6506
6507
6508 nsresult
6509 IConvAdaptor::Finish(char * aDest, PRInt32 * aDestLength)
6510 {
6511 + PRInt32 length = *aDestLength;
6512 +
6513 + if (!mConverter) {
6514 + NS_WARNING("Converter Not Initialized");
6515 + return NS_ERROR_NOT_INITIALIZED;
6516 + }
6517 +
6518 +#ifdef DEBUG
6519 + printf(" * IConvAdaptor - Finish\n");
6520 +#endif
6521 *aDestLength = 0;
6522 + // Flush continuation and send replacement character.
6523 + if ((mContinuationLength > 0) && (mReplaceOnError)) {
6524 + if (length > 0 ) {
6525 + *(aDest++) = (char) mReplaceChar;
6526 + *aDestLength = 1;
6527 + } else {
6528 + return NS_OK_UENC_MOREOUTPUT;
6529 + }
6530 + }
6531 return NS_OK;
6532 }
6533
6534 @@ -236,8 +460,10 @@
6535 PRInt32 aSrcLength,
6536 PRInt32 * aDestLength)
6537 {
6538 - if (!mConverter)
6539 - return NS_ERROR_UENC_NOMAPPING;
6540 + if (!mConverter) {
6541 + NS_WARNING("Converter Not Initialized");
6542 + return NS_ERROR_NOT_INITIALIZED;
6543 + }
6544
6545 *aDestLength = aSrcLength*4; // sick
6546
6547 @@ -251,13 +477,13 @@
6548 PRUnichar aChar)
6549 {
6550
6551 - if (aBehavior != kOnError_Replace) {
6552 + if (aBehavior == kOnError_Replace) {
6553 mReplaceOnError = PR_TRUE;
6554 mReplaceChar = aChar;
6555 return NS_OK;
6556 }
6557
6558 - NS_WARNING("Uconv Error Behavior not support");
6559 + NS_WARNING("Uconv Error: Behavior not supported");
6560 return NS_ERROR_FAILURE;
6561 }
6562
6563 @@ -272,103 +498,38 @@
6564 }
6565
6566
6567 -nsresult
6568 -IConvAdaptor::ConvertInternal(void * aSrc,
6569 - PRInt32 * aSrcLength,
6570 - PRInt32 aSrcCharSize,
6571 - void * aDest,
6572 - PRInt32 * aDestLength,
6573 - PRInt32 aDestCharSize)
6574 +NS_IMPL_ISUPPORTS1(NativeUConvService, nsINativeUConvService)
6575 +
6576 +NS_IMETHODIMP
6577 +NativeUConvService::GetNativeUnicodeDecoder(const char* from,
6578 + nsISupports** aResult)
6579 {
6580 - if (!mConverter) {
6581 - NS_WARNING("Converter Not Initialize");
6582 - return NS_ERROR_NOT_INITIALIZED;
6583 - }
6584 - size_t res = 0;
6585 - size_t inLeft = (size_t) *aSrcLength * aSrcCharSize;
6586 - size_t outLeft = (size_t) *aDestLength * aDestCharSize;
6587 - size_t outputAvail = outLeft;
6588 + *aResult = nsnull;
6589
6590 - while (true){
6591 + IConvAdaptor* ucl = new IConvAdaptor();
6592 + if (!ucl)
6593 + return NS_ERROR_OUT_OF_MEMORY;
6594
6595 - res = iconv(mConverter,
6596 - (char**)&aSrc,
6597 - &inLeft,
6598 - (char**)&aDest,
6599 - &outLeft);
6600 -
6601 - if (res == (size_t) -1) {
6602 - // on some platforms (e.g., linux) iconv will fail with
6603 - // E2BIG if it cannot convert _all_ of its input. it'll
6604 - // still adjust all of the in/out params correctly, so we
6605 - // can ignore this error. the assumption is that we will
6606 - // be called again to complete the conversion.
6607 - if ((errno == E2BIG) && (outLeft < outputAvail)) {
6608 - res = 0;
6609 - break;
6610 - }
6611 -
6612 - if (errno == EILSEQ) {
6613 + // Trick to allow conversion of 0x5c into U+005c instead of U+00a5 with glibc's iconv
6614 + if (strcmp(from, "Shift_JIS") == 0)
6615 + from = "sjis-open";
6616
6617 - if (mReplaceOnError) {
6618 - if (aDestCharSize == 1) {
6619 - (*(char*)aDest) = (char)mReplaceChar;
6620 - aDest = (char*)aDest + sizeof(char);
6621 - }
6622 - else
6623 - {
6624 - (*(PRUnichar*)aDest) = (PRUnichar)mReplaceChar;
6625 - aDest = (PRUnichar*)aDest + sizeof(PRUnichar);
6626 -
6627 - }
6628 - inLeft -= aSrcCharSize;
6629 - outLeft -= aDestCharSize;
6630 + // Trick to allow claimed iso-8859-1 actually encoded as windows-1252 to be converted flawlessly
6631 + if (strcmp(from, "ISO-8859-1") == 0)
6632 + from = "windows-1252";
6633
6634 -#ifdef DEBUG
6635 - printf(" * IConvAdaptor - replacing char in output ( %s -> %s )\n",
6636 - mFrom.get(), mTo.get());
6637 + nsresult rv = ucl->Init(from, UTF16);
6638
6639 -#endif
6640 - res = 0;
6641 - }
6642 - }
6643 -
6644 - if (res == -1) {
6645 -#ifdef DEBUG
6646 - printf(" * IConvAdaptor - Bad input ( %s -> %s )\n", mFrom.get(), mTo.get());
6647 -#endif
6648 - return NS_ERROR_UENC_NOMAPPING;
6649 - }
6650 - }
6651 -
6652 - if (inLeft <= 0 || outLeft <= 0 || res == -1)
6653 - break;
6654 + if (NS_SUCCEEDED(rv)) {
6655 + NS_ADDREF(*aResult = (nsISupports*)(nsIUnicodeDecoder*)ucl);
6656 }
6657
6658 -
6659 - if (res != (size_t) -1) {
6660 -
6661 - // xp_iconv deals with how much is remaining in a given buffer
6662 - // but what uconv wants how much we read/written already. So
6663 - // we fix it up here.
6664 - *aSrcLength -= (inLeft / aSrcCharSize);
6665 - *aDestLength -= (outLeft / aDestCharSize);
6666 - return NS_OK;
6667 - }
6668 -
6669 -#ifdef DEBUG
6670 - printf(" * IConvAdaptor - - xp_iconv error( %s -> %s )\n", mFrom.get(), mTo.get());
6671 -#endif
6672 - Reset();
6673 - return NS_ERROR_UENC_NOMAPPING;
6674 + return rv;
6675 }
6676
6677 -NS_IMPL_ISUPPORTS1(NativeUConvService, nsINativeUConvService)
6678 -
6679 NS_IMETHODIMP
6680 -NativeUConvService::GetNativeConverter(const char* from,
6681 - const char* to,
6682 - nsISupports** aResult)
6683 +NativeUConvService::GetNativeUnicodeEncoder(const char* to,
6684 + nsISupports** aResult)
6685 {
6686 *aResult = nsnull;
6687
6688 @@ -376,10 +537,10 @@
6689 if (!ucl)
6690 return NS_ERROR_OUT_OF_MEMORY;
6691
6692 - nsresult rv = ucl->Init(from, to);
6693 + nsresult rv = ucl->Init(UTF16, to);
6694
6695 if (NS_SUCCEEDED(rv)) {
6696 - NS_ADDREF(*aResult = (nsISupports*)(nsIUnicharEncoder*)ucl);
6697 + NS_ADDREF(*aResult = (nsISupports*)(nsIUnicodeEncoder*)ucl);
6698 }
6699
6700 return rv;
6701 --- xulrunner/intl/uconv/src/Makefile.in.orig 2007-03-25 17:36:50.000000000 +0200
6702 +++ xulrunner/intl/uconv/src/Makefile.in 2007-03-25 17:37:24.000000000 +0200
6703 @@ -82,13 +82,13 @@
6704 nsUTF8ConverterService.cpp \
6705 nsUTF8ToUnicode.cpp \
6706 nsUnicodeToUTF8.cpp \
6707 + nsScriptableUConv.cpp \
6708 $(NULL)
6709
6710 ifdef MOZ_USE_NATIVE_UCONV
6711 REQUIRES += ucnative
6712 else
6713 CPPSRCS += \
6714 - nsScriptableUConv.cpp \
6715 nsUnicodeDecodeHelper.cpp \
6716 nsUnicodeEncodeHelper.cpp \
6717 nsMappingCache.cpp \
6718 --- xulrunner/intl/uconv/src/charsetalias.properties (revision 158)
6719 +++ xulrunner/intl/uconv/src/charsetalias.properties (local)
6720 @@ -120,13 +120,13 @@
6721 t.61-8bit=T.61-8bit
6722 hz-gb-2312=HZ-GB-2312
6723 big5-hkscs=Big5-HKSCS
6724 -gbk=x-gbk
6725 -cns11643=x-euc-tw
6726 +gbk=gbk
6727 +cns11643=euc-tw
6728 #
6729 # Netscape private ...
6730 #
6731 x-imap4-modified-utf7=x-imap4-modified-utf7
6732 -x-euc-tw=x-euc-tw
6733 +x-euc-tw=euc-tw
6734 x-mac-roman=x-mac-roman
6735 x-mac-ce=x-mac-ce
6736 x-mac-turkish=x-mac-turkish
6737 @@ -475,7 +475,7 @@
6738 #
6739 # Aliases for x-euc-tw
6740 #
6741 -zh_tw-euc=x-euc-tw
6742 +zh_tw-euc=euc-tw
6743 #
6744 # Following names appears in unix nl_langinfo(CODESET)
6745 # They can be compiled as platform specific if necessary
6746 @@ -513,6 +513,6 @@
6747 x-obsoleted-shift_jis=x-obsoleted-Shift_JIS
6748 x-obsoleted-iso-2022-jp=x-obsoleted-ISO-2022-JP
6749 x-obsoleted-euc-jp=x-obsoleted-EUC-JP
6750 -x-gbk=x-gbk
6751 +x-gbk=gbk
6752 windows-936=windows-936
6753 ansi-1251=windows-1251
6754 --- xulrunner/intl/uconv/src/nsCharsetConverterManager.cpp (revision 158)
6755 +++ xulrunner/intl/uconv/src/nsCharsetConverterManager.cpp (local)
6756 @@ -191,9 +191,8 @@
6757 #ifdef MOZ_USE_NATIVE_UCONV
6758 if (mNativeUC) {
6759 nsCOMPtr<nsISupports> supports;
6760 - mNativeUC->GetNativeConverter("UCS-2",
6761 - aDest,
6762 - getter_AddRefs(supports));
6763 + mNativeUC->GetNativeUnicodeEncoder(aDest,
6764 + getter_AddRefs(supports));
6765
6766 encoder = do_QueryInterface(supports);
6767
6768 @@ -202,7 +201,8 @@
6769 return NS_OK;
6770 }
6771 }
6772 -#endif
6773 + return NS_ERROR_UCONV_NOCONV;
6774 +#else
6775 nsresult rv = NS_OK;
6776
6777 nsCAutoString
6778 @@ -220,6 +220,7 @@
6779 NS_ADDREF(*aResult);
6780 }
6781 return rv;
6782 +#endif
6783 }
6784
6785 NS_IMETHODIMP
6786 @@ -246,9 +247,8 @@
6787 #ifdef MOZ_USE_NATIVE_UCONV
6788 if (mNativeUC) {
6789 nsCOMPtr<nsISupports> supports;
6790 - mNativeUC->GetNativeConverter(aSrc,
6791 - "UCS-2",
6792 - getter_AddRefs(supports));
6793 + mNativeUC->GetNativeUnicodeDecoder(aSrc,
6794 + getter_AddRefs(supports));
6795
6796 decoder = do_QueryInterface(supports);
6797
6798 @@ -257,7 +257,8 @@
6799 return NS_OK;
6800 }
6801 }
6802 -#endif
6803 + return NS_ERROR_UCONV_NOCONV;
6804 +#else
6805 nsresult rv = NS_OK;
6806
6807 NS_NAMED_LITERAL_CSTRING(kUnicodeDecoderContractIDBase,
6808 @@ -285,6 +286,7 @@
6809 NS_ADDREF(*aResult);
6810 }
6811 return rv;
6812 +#endif
6813 }
6814
6815 nsresult
6816 --- xulrunner/intl/uconv/src/nsUConvModule.cpp (revision 158)
6817 +++ xulrunner/intl/uconv/src/nsUConvModule.cpp (local)
6818 @@ -58,6 +58,7 @@
6819 #include "nsConverterInputStream.h"
6820 #include "nsConverterOutputStream.h"
6821 #include "nsPlatformCharset.h"
6822 +#include "nsScriptableUConv.h"
6823
6824 #ifndef MOZ_USE_NATIVE_UCONV
6825 #include "nsIUnicodeDecodeHelper.h"
6826 @@ -67,7 +68,6 @@
6827
6828 #include "nsUConvDll.h"
6829 #include "nsIFile.h"
6830 -#include "nsIScriptableUConv.h"
6831
6832 #include "nsCRT.h"
6833
6834 @@ -82,7 +82,6 @@
6835 #include "nsUnicodeToCP1252.h"
6836 #include "nsUnicodeToMacRoman.h"
6837 #include "nsUnicodeToUTF8.h"
6838 -#include "nsScriptableUConv.h"
6839
6840 // ucvlatin
6841 #include "nsUCvLatinCID.h"
6842 @@ -489,7 +488,6 @@
6843
6844 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeDecodeHelper)
6845 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeEncodeHelper)
6846 -NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableUnicodeConverter)
6847 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUnicodeToUTF8)
6848 NS_GENERIC_FACTORY_CONSTRUCTOR(nsUTF8ToUnicode)
6849
6850 @@ -720,6 +718,7 @@
6851 NS_GENERIC_FACTORY_CONSTRUCTOR(nsConverterInputStream)
6852 NS_GENERIC_FACTORY_CONSTRUCTOR(nsConverterOutputStream)
6853 NS_GENERIC_FACTORY_CONSTRUCTOR_INIT(nsPlatformCharset, Init)
6854 +NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptableUnicodeConverter)
6855
6856 static const nsModuleComponentInfo components[] =
6857 {
6858 @@ -752,6 +751,11 @@
6859 "@mozilla.org/intl/converter-output-stream;1",
6860 nsConverterOutputStreamConstructor
6861 },
6862 + {
6863 + "Unicode Encoder / Decoder for Script", NS_ISCRIPTABLEUNICODECONVERTER_CID,
6864 + NS_ISCRIPTABLEUNICODECONVERTER_CONTRACTID,
6865 + nsScriptableUnicodeConverterConstructor
6866 + },
6867 #ifdef MOZ_USE_NATIVE_UCONV
6868 {
6869 "Native UConv Service",
6870 @@ -776,11 +780,6 @@
6871 nsUTF8ConverterServiceConstructor
6872 },
6873 {
6874 - "Unicode Encoder / Decoder for Script", NS_ISCRIPTABLEUNICODECONVERTER_CID,
6875 - NS_ISCRIPTABLEUNICODECONVERTER_CONTRACTID,
6876 - nsScriptableUnicodeConverterConstructor
6877 - },
6878 - {
6879 "ISO-8859-1 To Unicode Converter", NS_ISO88591TOUNICODE_CID,
6880 NS_ISO88591TOUNICODE_CONTRACTID,
6881 nsISO88591ToUnicodeConstructor,
6882
6883
6884
6885 1.1 src/patchsets/xulrunner/1.8.1.19/180_libxpcom_hack.patch
6886
6887 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/180_libxpcom_hack.patch?rev=1.1&view=markup
6888 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/180_libxpcom_hack.patch?rev=1.1&content-type=text/plain
6889
6890 Index: 180_libxpcom_hack.patch
6891 ===================================================================
6892 #! /bin/sh /usr/share/dpatch/dpatch-run
6893 ## 180_libxpcom_hack.dpatch by Mike Hommey <glandium@××××××.org>
6894 ##
6895 ## All lines beginning with `## DP:' are a description of the patch.
6896 ## DP: Force libxpcom to be linked to xulrunner-bin, xpcshell and libgtkmozembed
6897 ## DP: so that it is loaded in most of the cases.
6898
6899 @DPATCH@
6900
6901 === embedding/browser/gtk/src/Makefile.in
6902 ==================================================================
6903 --- xulrunner/embedding/browser/gtk/src/Makefile.in (revision 118)
6904 +++ xulrunner/embedding/browser/gtk/src/Makefile.in (local)
6905 @@ -120,7 +120,9 @@
6906
6907 ifdef MOZ_ENABLE_GTK2
6908 EXTRA_DSO_LDOPTS = \
6909 + -Wl,--no-as-needed \
6910 $(MOZ_COMPONENT_LIBS) \
6911 + -Wl,--as-needed \
6912 $(NULL)
6913 endif
6914
6915 === js/src/xpconnect/shell/Makefile.in
6916 ==================================================================
6917 --- xulrunner/js/src/xpconnect/shell/Makefile.in (revision 118)
6918 +++ xulrunner/js/src/xpconnect/shell/Makefile.in (local)
6919 @@ -57,7 +57,9 @@
6920
6921 LIBS = \
6922 $(MOZ_JS_LIBS) \
6923 + -Wl,--no-as-needed \
6924 $(XPCOM_LIBS) \
6925 + -Wl,--as-needed \
6926 $(NSPR_LIBS) \
6927 $(NULL)
6928
6929 === xulrunner/app/Makefile.in
6930 ==================================================================
6931 --- xulrunner/xulrunner/app/Makefile.in (revision 118)
6932 +++ xulrunner/xulrunner/app/Makefile.in (local)
6933 @@ -104,7 +104,9 @@
6934 $(STATIC_COMPONENTS_LINKER_PATH) \
6935 $(EXTRA_DSO_LIBS) \
6936 $(MOZ_JS_LIBS) \
6937 + -Wl,--no-as-needed \
6938 $(XPCOM_LIBS) \
6939 + -Wl,--as-needed \
6940 $(NSPR_LIBS) \
6941 $(TK_LIBS) \
6942 $(NULL)
6943
6944
6945
6946 1.1 src/patchsets/xulrunner/1.8.1.19/180_no_examples.patch
6947
6948 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/180_no_examples.patch?rev=1.1&view=markup
6949 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/180_no_examples.patch?rev=1.1&content-type=text/plain
6950
6951 Index: 180_no_examples.patch
6952 ===================================================================
6953 #! /bin/sh /usr/share/dpatch/dpatch-run
6954 ## 180_no_examples.dpatch by Mike Hommey <glandium@××××××.org>
6955 ##
6956 ## All lines beginning with `## DP:' are a description of the patch.
6957 ## DP: Don't build examples
6958
6959 @DPATCH@
6960
6961 === xulrunner/Makefile.in
6962 ==================================================================
6963 --- xulrunner/xulrunner/Makefile.in (revision 62)
6964 +++ xulrunner/xulrunner/Makefile.in (local)
6965 @@ -48,7 +48,6 @@
6966 stub \
6967 util \
6968 app \
6969 - examples \
6970 $(NULL)
6971
6972 ifeq ($(OS_ARCH),WINNT)
6973 === extensions/python/xpcom/Makefile.in
6974 ==================================================================
6975 --- xulrunner/extensions/python/xpcom/Makefile.in (revision 85)
6976 +++ xulrunner/extensions/python/xpcom/Makefile.in (local)
6977 @@ -40,7 +40,6 @@
6978
6979 DIRS = \
6980 src \
6981 - test/test_component \
6982 $(NULL)
6983
6984 topsrcdir = @top_srcdir@
6985
6986
6987
6988 1.1 src/patchsets/xulrunner/1.8.1.19/180_no_sys_profile.patch
6989
6990 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/180_no_sys_profile.patch?rev=1.1&view=markup
6991 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/180_no_sys_profile.patch?rev=1.1&content-type=text/plain
6992
6993 Index: 180_no_sys_profile.patch
6994 ===================================================================
6995 #! /bin/sh /usr/share/dpatch/dpatch-run
6996 ## 180_no_sys_profile.dpatch by Mike Hommey <glandium@××××××.org>
6997 ##
6998 ## All lines beginning with `## DP:' are a description of the patch.
6999 ## DP: Don't install system profile
7000
7001 @DPATCH@
7002
7003 === xulrunner/app/Makefile.in
7004 ==================================================================
7005 --- xulrunner/xulrunner/app/Makefile.in (revision 61)
7006 +++ xulrunner/xulrunner/app/Makefile.in (local)
7007 @@ -49,8 +49,6 @@
7008
7009 MOZILLA_INTERNAL_API = 1
7010
7011 -DIRS = profile
7012 -
7013 PREF_JS_EXPORTS = $(srcdir)/xulrunner.js
7014 GARBAGE += $(addprefix $(DIST)/bin/defaults/pref/,xulrunner.js)
7015
7016
7017
7018
7019 1.1 src/patchsets/xulrunner/1.8.1.19/181_sonames.patch
7020
7021 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/181_sonames.patch?rev=1.1&view=markup
7022 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/181_sonames.patch?rev=1.1&content-type=text/plain
7023
7024 Index: 181_sonames.patch
7025 ===================================================================
7026 #! /bin/sh /usr/share/dpatch/dpatch-run
7027 ## 181_sonames.dpatch by Mike Hommey <glandium@××××××.org>
7028 ##
7029 ## All lines beginning with `## DP:' are a description of the patch.
7030 ## DP: Add soname support
7031
7032 @DPATCH@
7033
7034 === config/rules.mk
7035 ==================================================================
7036 --- xulrunner/config/rules.mk.orig 2007-03-18 00:59:30.000000000 +0100
7037 +++ xulrunner/config/rules.mk 2007-03-18 01:31:27.000000000 +0100
7038 @@ -133,6 +133,26 @@
7039
7040 SHARED_LIBRARY := $(DLL_PREFIX)$(LIBRARY_NAME)$(DLL_SUFFIX)
7041
7042 +SONAME := $(notdir $(SHARED_LIBRARY))
7043 +
7044 +ifdef SO_VERSION
7045 +ifneq (,$(findstring $(SONAME),$(MKSHLIB)))
7046 +SO_VERSION_MAJOR := $(shell echo $(SO_VERSION) | sed 's/^\([^.]*\)\(\.[^.]*\)\?\(\.[^.]*\)\?/\1/')
7047 +SO_VERSION_MINOR := $(shell echo $(SO_VERSION) | sed 's/^\([^.]*\)\(\.[^.]*\)\?\(\.[^.]*\)\?/\2/')
7048 +SO_VERSION_MICRO := $(shell echo $(SO_VERSION) | sed 's/^\([^.]*\)\(\.[^.]*\)\?\(\.[^.]*\)\?/\3/')
7049 +
7050 +SHARED_LIBRARY_LINKS := $(SONAME)
7051 +ifdef SO_VERSION_MINOR
7052 +SHARED_LIBRARY_LINKS += $(SONAME).$(SO_VERSION_MAJOR)
7053 +endif
7054 +
7055 +SONAME := $(SONAME).$(SO_VERSION_MAJOR)
7056 +SHARED_LIBRARY := $(SHARED_LIBRARY).$(SO_VERSION)
7057 +
7058 +MKSHLINKS = (cd $(1) && for link in $(SHARED_LIBRARY_LINKS); do rm -f $$link; ln -s $(notdir $(SHARED_LIBRARY)) $$link; done)
7059 +endif
7060 +endif
7061 +
7062 ifeq ($(OS_ARCH),OS2)
7063 DEF_FILE := $(SHARED_LIBRARY:.dll=.def)
7064 endif
7065 @@ -264,7 +284,7 @@
7066 $(HOST_PROGOBJS) $(HOST_OBJS) $(IMPORT_LIBRARY) $(DEF_FILE)\
7067 $(EXE_DEF_FILE) so_locations _gen _stubs $(wildcard *.res) $(wildcard *.RES) \
7068 $(wildcard *.pdb) $(CODFILE) $(MAPFILE) $(IMPORT_LIBRARY) \
7069 - $(SHARED_LIBRARY:$(DLL_SUFFIX)=.exp) $(wildcard *.ilk) \
7070 + $(SHARED_LIBRARY:$(DLL_SUFFIX)=.exp) $(SHARED_LIBRARY_LINKS) $(wildcard *.ilk) \
7071 $(PROGRAM:$(BIN_SUFFIX)=.exp) $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.exp) \
7072 $(PROGRAM:$(BIN_SUFFIX)=.lib) $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.lib) \
7073 $(SIMPLE_PROGRAMS:$(BIN_SUFFIX)=.$(OBJ_SUFFIX)) \
7074 @@ -662,6 +682,8 @@
7075 ifdef IS_COMPONENT
7076 $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)/components
7077 $(ELF_DYNSTR_GC) $(FINAL_TARGET)/components/$(SHARED_LIBRARY)
7078 + $(call MKSHLINKS, $(FINAL_TARGET)/components)
7079 + $(call MKSHLINKS, $(FINAL_TARGET)/components/$(SHARED_LIBRARY))
7080 ifdef BEOS_ADDON_WORKAROUND
7081 ( cd $(FINAL_TARGET)/components && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
7082 endif
7083 @@ -670,8 +692,10 @@
7084 $(INSTALL) $(IFLAGS2) $(IMPORT_LIBRARY) $(DIST)/lib
7085 else
7086 $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(DIST)/lib
7087 + $(call MKSHLINKS,$(DIST)/lib)
7088 endif
7089 $(INSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(FINAL_TARGET)
7090 + $(call MKSHLINKS,$(FINAL_TARGET))
7091 ifdef BEOS_ADDON_WORKAROUND
7092 ( cd $(FINAL_TARGET) && $(CC) -nostart -o $(SHARED_LIBRARY).stub $(SHARED_LIBRARY) )
7093 endif
7094 @@ -717,45 +741,32 @@
7095 endif
7096 endif
7097
7098 +ifdef MRE_DIST
7099 +DESTSUBDIR=$(mredir)
7100 +else
7101 +DESTSUBDIR=$(mozappdir)
7102 +endif
7103 +
7104 install:: $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(LIBRARY) $(PROGRAM) $(SIMPLE_PROGRAMS)
7105 ifndef NO_INSTALL
7106 #ifdef LIBRARY
7107 #ifndef IS_COMPONENT
7108 -#ifdef MRE_DIST
7109 -# $(SYSINSTALL) $(IFLAGS1) $(LIBRARY) $(DESTDIR)$(mredir)
7110 -#else
7111 -# $(SYSINSTALL) $(IFLAGS1) $(LIBRARY) $(DESTDIR)$(mozappdir)
7112 -#endif
7113 +# $(SYSINSTALL) $(IFLAGS1) $(LIBRARY) $(DESTDIR)$(DESTSUBDIR)
7114 #endif # !IS_COMPONENT
7115 #endif # LIBRARY
7116 ifdef SHARED_LIBRARY
7117 ifdef IS_COMPONENT
7118 -ifdef MRE_DIST
7119 - $(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(DESTDIR)$(mredir)/components
7120 + $(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(DESTDIR)$(DESTSUBDIR)/components
7121 else
7122 - $(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(DESTDIR)$(mozappdir)/components
7123 -endif
7124 -else
7125 -ifdef MRE_DIST
7126 - $(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(DESTDIR)$(mredir)
7127 -else
7128 - $(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(DESTDIR)$(mozappdir)
7129 -endif
7130 + $(SYSINSTALL) $(IFLAGS2) $(SHARED_LIBRARY) $(IMPORT_LIBRARY) $(DESTDIR)$(DESTSUBDIR)
7131 + $(call MKSHLINKS,$(DESTDIR)$(DESTSUBDIR))
7132 endif
7133 endif # SHARED_LIBRARY
7134 ifdef PROGRAM
7135 -ifdef MRE_DIST
7136 - $(SYSINSTALL) $(IFLAGS2) $(PROGRAM) $(DESTDIR)$(mredir)
7137 -else
7138 - $(SYSINSTALL) $(IFLAGS2) $(PROGRAM) $(DESTDIR)$(mozappdir)
7139 -endif
7140 + $(SYSINSTALL) $(IFLAGS2) $(PROGRAM) $(DESTDIR)$(DESTSUBDIR)
7141 endif # PROGRAM
7142 ifdef SIMPLE_PROGRAMS
7143 -ifdef MRE_DIST
7144 - $(SYSINSTALL) $(IFLAGS2) $(SIMPLE_PROGRAMS) $(DESTDIR)$(mredir)
7145 -else
7146 - $(SYSINSTALL) $(IFLAGS2) $(SIMPLE_PROGRAMS) $(DESTDIR)$(mozappdir)
7147 -endif
7148 + $(SYSINSTALL) $(IFLAGS2) $(SIMPLE_PROGRAMS) $(DESTDIR)$(DESTSUBDIR)
7149 endif # SIMPLE_PROGRAMS
7150 endif # NO_INSTALL
7151
7152 @@ -987,6 +998,8 @@
7153 SUB_SHLOBJS = $(SUB_LOBJS)
7154 endif
7155
7156 +$(SHARED_LIBRARY_LINKS): %: $(SHARED_LIBRARY)
7157 +
7158 $(SHARED_LIBRARY): $(OBJS) $(LOBJS) $(DEF_FILE) $(RESFILE) $(SHARED_LIBRARY_LIBS) $(EXTRA_DEPS) $(DSO_LDOPTS_DEPS) Makefile Makefile.in
7159 ifndef INCREMENTAL_LINKER
7160 rm -f $@
7161 @@ -1013,6 +1026,7 @@
7162 endif # SHARED_LIBRARY_LIBS
7163 endif # NO_LD_ARCHIVE_FLAGS
7164 $(MKSHLIB) $(SHLIB_LDSTARTFILE) $(OBJS) $(LOBJS) $(SUB_SHLOBJS) $(RESFILE) $(LDFLAGS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE) $(SHLIB_LDENDFILE)
7165 + $(call MKSHLINKS,.)
7166 @rm -f foodummyfilefoo $(SUB_SHLOBJS) $(DELETE_AFTER_LINK)
7167 else # os2 vacpp
7168 $(MKSHLIB) -O:$@ -DLL -INC:_dllentry $(LDFLAGS) $(OBJS) $(LOBJS) $(EXTRA_DSO_LDOPTS) $(OS_LIBS) $(EXTRA_LIBS) $(DEF_FILE)
7169 @@ -1352,11 +1366,7 @@
7170
7171 install:: $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt
7172 ifndef NO_INSTALL
7173 -ifdef MRE_DIST
7174 - $(SYSINSTALL) $(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(DESTDIR)$(mredir)/components
7175 -else
7176 - $(SYSINSTALL) $(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(DESTDIR)$(mozappdir)/components
7177 -endif
7178 + $(SYSINSTALL) $(IFLAGS1) $(XPIDL_GEN_DIR)/$(XPIDL_MODULE).xpt $(DESTDIR)$(DESTSUBDIR)/components
7179 endif # NO_INSTALL
7180 endif # NO_GEN_XPT
7181
7182 === configure.in
7183 --- xulrunner/configure.in.orig 2007-03-18 02:07:01.000000000 +0100
7184 +++ xulrunner/configure.in 2007-03-18 02:38:19.000000000 +0100
7185 @@ -1121,8 +1121,8 @@
7186 dnl GNU specific defaults
7187 dnl ========================================================
7188 if test "$GNU_CC"; then
7189 - MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
7190 - MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
7191 + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(SONAME) -o $@'
7192 + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(SONAME) -o $@'
7193 DSO_LDOPTS='-shared'
7194 if test "$GCC_USE_GNU_LD"; then
7195 # Don't allow undefined symbols in libraries
7196 @@ -1152,8 +1152,9 @@
7197 _DEFINES_CFLAGS='-include $(DEPTH)/mozilla-config.h -DMOZILLA_CLIENT'
7198 _USE_CPP_INCLUDE_FLAG=1
7199 else
7200 - MKSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@'
7201 - MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@'
7202 + MKSHLIB='$(LD) $(DSO_LDOPTS) -h $(SONAME) -o $@'
7203 + MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $(SONAME) -o $@'
7204 +
7205
7206 DSO_LDOPTS='-shared'
7207 if test "$GNU_LD"; then
7208 @@ -1389,7 +1390,7 @@
7209
7210 *-beos*)
7211 no_x=yes
7212 - MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
7213 + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -Wl,-h,$(SONAME) -o $@'
7214 _PLATFORM_DEFAULT_TOOLKIT="beos"
7215 DSO_LDOPTS='-nostart'
7216 TK_LIBS='-lbe -lroot'
7217 @@ -1902,8 +1903,9 @@
7218 if test "$LIBRUNPATH"; then
7219 DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
7220 fi
7221 - MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,lib$(LIBRARY_NAME)$(DLL_SUFFIX) -o $@'
7222 - MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,lib$(LIBRARY_NAME)$(DLL_SUFFIX) -o $@'
7223 + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(SONAME) -o $@'
7224 + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(SONAME) -o $@'
7225 +
7226 ;;
7227
7228 *-nto*)
7229 @@ -2070,8 +2072,9 @@
7230
7231 alpha*-*-osf*)
7232 if test "$GNU_CC"; then
7233 - MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$@ -o $@'
7234 - MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$@ -o $@'
7235 + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(SONAME) -o $@'
7236 + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$(SONAME) -o $@'
7237 +
7238
7239 else
7240 MOZ_DEBUG_FLAGS='-g'
7241 @@ -2081,8 +2084,9 @@
7242 DSO_LDOPTS='-shared -msym -expect_unresolved \* -update_registry $(DIST)/so_locations'
7243 DSO_CFLAGS=
7244 DSO_PIC_CFLAGS=
7245 - MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -soname $@ -o $@'
7246 - MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -soname $@ -o $@'
7247 + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -soname $(SONAME) -o $@'
7248 + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -soname $(SONAME) -o $@'
7249 +
7250 MKSHLIB_FORCE_ALL='-all'
7251 MKSHLIB_UNFORCE_ALL='-none'
7252 dnl Might fix the libxpcom.so breakage on this platform as well....
7253 @@ -2139,8 +2143,9 @@
7254 [LDFLAGS=$_SAVE_LDFLAGS])
7255 fi
7256 MOZ_OPTIMIZE_FLAGS="-xO4"
7257 - MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -h $@ -o $@'
7258 - MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) -G -Wl,-z -Wl,muldefs -h $@ -o $@'
7259 + MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -h $(SONAME) -o $@'
7260 + MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) -G -Wl,-z -Wl,muldefs -h $(SONAME) -o $@'
7261 +
7262 MKSHLIB_FORCE_ALL='-Qoption ld -z,allextract'
7263 MKSHLIB_UNFORCE_ALL=''
7264 DSO_LDOPTS='-G -Qoption ld -z,muldefs'
7265 === embedding/browser/gtk/src/Makefile.in
7266 --- xulrunner/embedding/browser/gtk/src/Makefile.in (revision 8)
7267 +++ xulrunner/embedding/browser/gtk/src/Makefile.in (local)
7268 @@ -46,6 +46,7 @@
7269 MODULE = gtkembedmoz
7270 LIBRARY_NAME = gtkembedmoz
7271 MOZILLA_INTERNAL_API = 1
7272 +SO_VERSION = 1
7273
7274 REQUIRES = xpcom \
7275 string \
7276 === js/src/Makefile.in
7277 --- xulrunner/js/src/Makefile.in (revision 8)
7278 +++ xulrunner/js/src/Makefile.in (local)
7279 @@ -48,6 +48,7 @@
7280 LIBRARY_NAME = mozjs
7281 LIB_IS_C_ONLY = 1
7282 GRE_MODULE = 1
7283 +SO_VERSION = 1
7284
7285 ifeq (,$(filter-out WINNT WINCE,$(OS_ARCH)))
7286 LIBRARY_NAME = js$(MOZ_BITS)$(VERSION_NUMBER)
7287 === toolkit/library/Makefile.in
7288 --- xulrunner/toolkit/library/Makefile.in (revision 8)
7289 +++ xulrunner/toolkit/library/Makefile.in (local)
7290 @@ -48,6 +48,7 @@
7291 FORCE_USE_PIC = 1
7292 FORCE_SHARED_LIB = 1
7293 MOZILLA_INTERNAL_API = 1
7294 +SO_VERSION = 1
7295
7296 ifeq ($(OS_ARCH),Darwin)
7297 # This is going to be a framework named "XUL", not an ordinary library named
7298 === xpcom/stub/Makefile.in
7299 --- xulrunner/xpcom/stub/Makefile.in (revision 8)
7300 +++ xulrunner/xpcom/stub/Makefile.in (local)
7301 @@ -44,6 +44,7 @@
7302
7303 MODULE = xpcom
7304 LIBRARY_NAME = xpcom
7305 +SO_VERSION = 1
7306
7307 # The XPCOM glue uses realpath() on libxpcom.so to resolve any symlinks. We
7308 # want it to find dist/bin and not xpcom/stub so we copy instead of symlinking.
7309
7310
7311
7312 1.1 src/patchsets/xulrunner/1.8.1.19/182_locale.patch
7313
7314 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/182_locale.patch?rev=1.1&view=markup
7315 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/182_locale.patch?rev=1.1&content-type=text/plain
7316
7317 Index: 182_locale.patch
7318 ===================================================================
7319 #! /bin/sh /usr/share/dpatch/dpatch-run
7320 ## 182_locale.dpatch by Mike Hommey <glandium@××××××.org>
7321 ##
7322 ## All lines beginning with `## DP:' are a description of the patch.
7323 ## DP: use OS locale and display it correctly. bz#331779
7324
7325 @DPATCH@
7326
7327 === xulrunner/app/xulrunner.js
7328 ==================================================================
7329 --- xulrunner/xulrunner/app/xulrunner.js (revision 17)
7330 +++ xulrunner/xulrunner/app/xulrunner.js (local)
7331 @@ -39,7 +39,8 @@
7332 // We need to override the default values of these preferences since all.js
7333 // assumes these are in the navigator package, which for us is non-existant.
7334 // XXX(darin): perhaps all.js should not be seamonkey specific
7335 -pref("general.useragent.locale", "@AB_CD@");
7336 +pref("intl.locale.matchOS", true);
7337 +pref("general.useragent.locale", "chrome://global/locale/intl.properties");
7338 pref("font.language.group", "chrome://global/locale/intl.properties");
7339 pref("intl.accept_languages", "chrome://global/locale/intl.properties");
7340 pref("intl.collationOption", "chrome://global-platform/locale/intl.properties");
7341
7342
7343
7344 1.1 src/patchsets/xulrunner/1.8.1.19/182_prefs.patch
7345
7346 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/182_prefs.patch?rev=1.1&view=markup
7347 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/182_prefs.patch?rev=1.1&content-type=text/plain
7348
7349 Index: 182_prefs.patch
7350 ===================================================================
7351 #! /bin/sh /usr/share/dpatch/dpatch-run
7352 ## 82_prefs.dpatch by Mike Hommey <glandium@××××××.org>
7353 ##
7354 ## All lines beginning with `## DP:' are a description of the patch.
7355 ## DP: Fix font defaults.
7356 ## DP: Set javascript.options.showInConsole.
7357
7358 @DPATCH@
7359
7360 === modules/libpref/src/init/all.js
7361 ==================================================================
7362 --- xulrunner/modules/libpref/src/init/all.js (revision 67)
7363 +++ xulrunner/modules/libpref/src/init/all.js (local)
7364 @@ -439,6 +439,7 @@
7365 pref("javascript.enabled", true);
7366 pref("javascript.allow.mailnews", false);
7367 pref("javascript.options.strict", false);
7368 +pref("javascript.options.showInConsole", true);
7369
7370 // advanced prefs
7371 pref("security.enable_java", true);
7372 @@ -1872,33 +1873,33 @@
7373
7374 // th
7375
7376 -pref("font.name.serif.tr", "Times");
7377 -pref("font.name.sans-serif.tr", "Helvetica");
7378 -pref("font.name.monospace.tr", "Courier");
7379 +pref("font.name.serif.tr", "serif");
7380 +pref("font.name.sans-serif.tr", "sans-serif");
7381 +pref("font.name.monospace.tr", "monospace");
7382
7383 pref("font.name.serif.x-baltic", "serif");
7384 pref("font.name.sans-serif.x-baltic", "sans-serif");
7385 pref("font.name.monospace.x-baltic", "monospace");
7386
7387 -pref("font.name.serif.x-central-euro", "Times");
7388 -pref("font.name.sans-serif.x-central-euro", "Helvetica");
7389 -pref("font.name.monospace.x-central-euro", "Courier");
7390 +pref("font.name.serif.x-central-euro", "serif");
7391 +pref("font.name.sans-serif.x-central-euro", "sans-serif");
7392 +pref("font.name.monospace.x-central-euro", "monospace");
7393
7394 pref("font.name.serif.x-cyrillic", "serif");
7395 pref("font.name.sans-serif.x-cyrillic", "sans-serif");
7396 pref("font.name.monospace.x-cyrillic", "monospace");
7397
7398 -pref("font.name.serif.x-unicode", "Times");
7399 -pref("font.name.sans-serif.x-unicode", "Helvetica");
7400 -pref("font.name.monospace.x-unicode", "Courier");
7401 +pref("font.name.serif.x-unicode", "serif");
7402 +pref("font.name.sans-serif.x-unicode", "sans-serif");
7403 +pref("font.name.monospace.x-unicode", "monospace");
7404
7405 -pref("font.name.serif.x-user-def", "Times");
7406 -pref("font.name.sans-serif.x-user-def", "Helvetica");
7407 -pref("font.name.monospace.x-user-def", "Courier");
7408 +pref("font.name.serif.x-user-def", "serif");
7409 +pref("font.name.sans-serif.x-user-def", "sans-serif");
7410 +pref("font.name.monospace.x-user-def", "monospace");
7411
7412 -pref("font.name.serif.x-western", "Times");
7413 -pref("font.name.sans-serif.x-western", "Helvetica");
7414 -pref("font.name.monospace.x-western", "Courier");
7415 +pref("font.name.serif.x-western", "serif");
7416 +pref("font.name.sans-serif.x-western", "sans-serif");
7417 +pref("font.name.monospace.x-western", "monospace");
7418
7419 pref("font.name.serif.zh-CN", "serif");
7420 pref("font.name.sans-serif.zh-CN", "sans-serif");
7421
7422
7423
7424 1.1 src/patchsets/xulrunner/1.8.1.19/185_installer.patch
7425
7426 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/185_installer.patch?rev=1.1&view=markup
7427 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/185_installer.patch?rev=1.1&content-type=text/plain
7428
7429 Index: 185_installer.patch
7430 ===================================================================
7431 #! /bin/sh /usr/share/dpatch/dpatch-run
7432 ## 185_installer.dpatch by Mike Hommey <glandium@××××××.org>
7433 ##
7434 ## All lines beginning with `## DP:' are a description of the patch.
7435 ## DP: - Install applications in /usr/local/lib instead of /usr/lib
7436
7437 @DPATCH@
7438
7439 === xulrunner/setup/nsXULAppInstall.js
7440 ==================================================================
7441 --- xulrunner/xulrunner/setup/nsXULAppInstall.js (revision 72)
7442 +++ xulrunner/xulrunner/setup/nsXULAppInstall.js (local)
7443 @@ -246,7 +246,7 @@
7444 #else
7445 aDirectory = Components.classes["@mozilla.org/file/local;1"].
7446 createInstance(nsILocalFile);
7447 - aDirectory.initWithPath("/usr/lib");
7448 + aDirectory.initWithPath("/usr/local/lib");
7449 if (vendor)
7450 aDirectory.append(vendor.toLowerCase());
7451 #endif
7452
7453
7454
7455 1.1 src/patchsets/xulrunner/1.8.1.19/185_no_register.patch
7456
7457 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/185_no_register.patch?rev=1.1&view=markup
7458 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/185_no_register.patch?rev=1.1&content-type=text/plain
7459
7460 Index: 185_no_register.patch
7461 ===================================================================
7462 #! /bin/sh /usr/share/dpatch/dpatch-run
7463 ## 185_no_register.dpatch by Mike Hommey <glandium@××××××.org>
7464 ##
7465 ## All lines beginning with `## DP:' are a description of the patch.
7466 ## DP: Remove (un|)registering system.
7467
7468 @DPATCH@
7469
7470 === xulrunner/app/nsXULRunnerApp.cpp
7471 ==================================================================
7472 --- xulrunner/xulrunner/app/nsXULRunnerApp.cpp (revision 69)
7473 +++ xulrunner/xulrunner/app/nsXULRunnerApp.cpp (local)
7474 @@ -43,7 +43,6 @@
7475
7476 #include "nsXULAppAPI.h"
7477 #include "nsXPCOMGlue.h"
7478 -#include "nsRegisterGRE.h"
7479 #include "nsAppRunner.h"
7480 #include "nsINIParser.h"
7481 #include "nsILocalFile.h"
7482 @@ -264,12 +263,6 @@
7483 " -h, --help show this message\n"
7484 " -v, --version show version\n"
7485 " --gre-version print the GRE version string on stdout\n"
7486 - " --register-global register this GRE in the machine registry\n"
7487 - " --register-user register this GRE in the user registry\n"
7488 - " --unregister-global unregister this GRE formerly registered with\n"
7489 - " --register-global\n"
7490 - " --unregister-user unregister this GRE formely registered with\n"
7491 - " --register-user\n"
7492 " --find-gre <version> Find a GRE with version <version> and print\n"
7493 " the path on stdout\n"
7494 " --install-app <application> [<destination> [<directoryname>]]\n"
7495 @@ -373,40 +366,6 @@
7496 }
7497
7498 if (argc > 1) {
7499 - PRBool registerGlobal = IsArg(argv[1], "register-global");
7500 - PRBool registerUser = IsArg(argv[1], "register-user");
7501 - if (registerGlobal || registerUser) {
7502 - if (argc != 2) {
7503 - Usage();
7504 - return 1;
7505 - }
7506 -
7507 - nsCOMPtr<nsIFile> regDir;
7508 - nsresult rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir));
7509 - if (NS_FAILED(rv))
7510 - return 2;
7511 -
7512 - return RegisterXULRunner(registerGlobal, regDir,
7513 - kGREProperties,
7514 - NS_ARRAY_LENGTH(kGREProperties)) ? 0 : 2;
7515 - }
7516 -
7517 - registerGlobal = IsArg(argv[1], "unregister-global");
7518 - registerUser = IsArg(argv[1], "unregister-user");
7519 - if (registerGlobal || registerUser) {
7520 - if (argc != 2) {
7521 - Usage();
7522 - return 1;
7523 - }
7524 -
7525 - nsCOMPtr<nsIFile> regDir;
7526 - nsresult rv = GetXULRunnerDir(argv[0], getter_AddRefs(regDir));
7527 - if (NS_FAILED(rv))
7528 - return 2;
7529 - UnregisterXULRunner(registerGlobal, regDir);
7530 - return 0;
7531 - }
7532 -
7533 if (IsArg(argv[1], "find-gre")) {
7534 if (argc != 3) {
7535 Usage();
7536
7537
7538
7539 1.1 src/patchsets/xulrunner/1.8.1.19/185_sidebar.patch
7540
7541 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/185_sidebar.patch?rev=1.1&view=markup
7542 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/185_sidebar.patch?rev=1.1&content-type=text/plain
7543
7544 Index: 185_sidebar.patch
7545 ===================================================================
7546 #! /bin/sh /usr/share/dpatch/dpatch-run
7547 ## 185_sidebar.dpatch by Mike Hommey <glandium@××××××.org>
7548 ##
7549 ## All lines beginning with `## DP:' are a description of the patch.
7550 ## DP: Add sidebar component
7551
7552 @DPATCH@
7553
7554 === allmakefiles.sh
7555 ==================================================================
7556 --- xulrunner/allmakefiles.sh (revision 4)
7557 +++ xulrunner/allmakefiles.sh (local)
7558 @@ -985,6 +985,9 @@
7559 toolkit/components/satchel/Makefile
7560 toolkit/components/satchel/public/Makefile
7561 toolkit/components/satchel/src/Makefile
7562 +toolkit/components/sidebar/Makefile
7563 +toolkit/components/sidebar/public/Makefile
7564 +toolkit/components/sidebar/src/Makefile
7565 toolkit/components/startup/Makefile
7566 toolkit/components/startup/public/Makefile
7567 toolkit/components/startup/src/Makefile
7568 === toolkit/components/Makefile.in
7569 ==================================================================
7570 --- xulrunner/toolkit/components/Makefile.in.orig 2007-03-18 02:55:06.000000000 +0100
7571 +++ xulrunner/toolkit/components/Makefile.in 2007-03-18 02:56:45.000000000 +0100
7572 @@ -73,6 +73,7 @@
7573 history \
7574 passwordmgr \
7575 satchel \
7576 + sidebar \
7577 $(NULL)
7578 endif # MOZ_THUNDERBIRD
7579
7580 === toolkit/components/sidebar/Makefile.in
7581 ==================================================================
7582 --- xulrunner/toolkit/components/sidebar/Makefile.in (revision 4)
7583 +++ xulrunner/toolkit/components/sidebar/Makefile.in (local)
7584 @@ -0,0 +1,48 @@
7585 +#
7586 +# ***** BEGIN LICENSE BLOCK *****
7587 +# Version: MPL 1.1/GPL 2.0/LGPL 2.1
7588 +#
7589 +# The contents of this file are subject to the Mozilla Public License Version
7590 +# 1.1 (the "License"); you may not use this file except in compliance with
7591 +# the License. You may obtain a copy of the License at
7592 +# http://www.mozilla.org/MPL/
7593 +#
7594 +# Software distributed under the License is distributed on an "AS IS" basis,
7595 +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
7596 +# for the specific language governing rights and limitations under the
7597 +# License.
7598 +#
7599 +# The Original Code is mozilla.org Code.
7600 +#
7601 +# The Initial Developer of the Original Code is
7602 +# Netscape Communications Corporation.
7603 +# Portions created by the Initial Developer are Copyright (C) 1999
7604 +# the Initial Developer. All Rights Reserved.
7605 +#
7606 +# Contributor(s):
7607 +#
7608 +# Alternatively, the contents of this file may be used under the terms of
7609 +# either the GNU General Public License Version 2 or later (the "GPL"), or
7610 +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
7611 +# in which case the provisions of the GPL or the LGPL are applicable instead
7612 +# of those above. If you wish to allow use of your version of this file only
7613 +# under the terms of either the GPL or the LGPL, and not to allow others to
7614 +# use your version of this file under the terms of the MPL, indicate your
7615 +# decision by deleting the provisions above and replace them with the notice
7616 +# and other provisions required by the GPL or the LGPL. If you do not delete
7617 +# the provisions above, a recipient may use your version of this file under
7618 +# the terms of any one of the MPL, the GPL or the LGPL.
7619 +#
7620 +# ***** END LICENSE BLOCK *****
7621 +
7622 +DEPTH = ../../..
7623 +topsrcdir = @top_srcdir@
7624 +srcdir = @srcdir@
7625 +VPATH = @srcdir@
7626 +
7627 +include $(DEPTH)/config/autoconf.mk
7628 +
7629 +DIRS = public src
7630 +
7631 +include $(topsrcdir)/config/rules.mk
7632 +
7633 === toolkit/components/sidebar/public/Makefile.in
7634 ==================================================================
7635 --- xulrunner/toolkit/components/sidebar/public/Makefile.in (revision 4)
7636 +++ xulrunner/toolkit/components/sidebar/public/Makefile.in (local)
7637 @@ -0,0 +1,50 @@
7638 +#
7639 +# ***** BEGIN LICENSE BLOCK *****
7640 +# Version: MPL 1.1/GPL 2.0/LGPL 2.1
7641 +#
7642 +# The contents of this file are subject to the Mozilla Public License Version
7643 +# 1.1 (the "License"); you may not use this file except in compliance with
7644 +# the License. You may obtain a copy of the License at
7645 +# http://www.mozilla.org/MPL/
7646 +#
7647 +# Software distributed under the License is distributed on an "AS IS" basis,
7648 +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
7649 +# for the specific language governing rights and limitations under the
7650 +# License.
7651 +#
7652 +# The Original Code is mozilla.org Code.
7653 +#
7654 +# The Initial Developer of the Original Code is
7655 +# Netscape Communications Corporation.
7656 +# Portions created by the Initial Developer are Copyright (C) 1998
7657 +# the Initial Developer. All Rights Reserved.
7658 +#
7659 +# Contributor(s):
7660 +#
7661 +# Alternatively, the contents of this file may be used under the terms of
7662 +# either the GNU General Public License Version 2 or later (the "GPL"), or
7663 +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
7664 +# in which case the provisions of the GPL or the LGPL are applicable instead
7665 +# of those above. If you wish to allow use of your version of this file only
7666 +# under the terms of either the GPL or the LGPL, and not to allow others to
7667 +# use your version of this file under the terms of the MPL, indicate your
7668 +# decision by deleting the provisions above and replace them with the notice
7669 +# and other provisions required by the GPL or the LGPL. If you do not delete
7670 +# the provisions above, a recipient may use your version of this file under
7671 +# the terms of any one of the MPL, the GPL or the LGPL.
7672 +#
7673 +# ***** END LICENSE BLOCK *****
7674 +
7675 +DEPTH = ../../../..
7676 +topsrcdir = @top_srcdir@
7677 +srcdir = @srcdir@
7678 +VPATH = @srcdir@
7679 +
7680 +include $(DEPTH)/config/autoconf.mk
7681 +
7682 +MODULE = sidebar
7683 +
7684 +XPIDLSRCS = nsISidebar.idl
7685 +
7686 +include $(topsrcdir)/config/rules.mk
7687 +
7688 === toolkit/components/sidebar/public/nsISidebar.idl
7689 ==================================================================
7690 --- xulrunner/toolkit/components/sidebar/public/nsISidebar.idl (revision 4)
7691 +++ xulrunner/toolkit/components/sidebar/public/nsISidebar.idl (local)
7692 @@ -0,0 +1,70 @@
7693 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
7694 + *
7695 + * ***** BEGIN LICENSE BLOCK *****
7696 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
7697 + *
7698 + * The contents of this file are subject to the Mozilla Public License Version
7699 + * 1.1 (the "License"); you may not use this file except in compliance with
7700 + * the License. You may obtain a copy of the License at
7701 + * http://www.mozilla.org/MPL/
7702 + *
7703 + * Software distributed under the License is distributed on an "AS IS" basis,
7704 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
7705 + * for the specific language governing rights and limitations under the
7706 + * License.
7707 + *
7708 + * The Original Code is mozilla.org Code.
7709 + *
7710 + * The Initial Developer of the Original Code is
7711 + * Netscape Communications Corporation.
7712 + * Portions created by the Initial Developer are Copyright (C) 1998
7713 + * the Initial Developer. All Rights Reserved.
7714 + *
7715 + * Contributor(s):
7716 + *
7717 + * Alternatively, the contents of this file may be used under the terms of
7718 + * either the GNU General Public License Version 2 or later (the "GPL"), or
7719 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
7720 + * in which case the provisions of the GPL or the LGPL are applicable instead
7721 + * of those above. If you wish to allow use of your version of this file only
7722 + * under the terms of either the GPL or the LGPL, and not to allow others to
7723 + * use your version of this file under the terms of the MPL, indicate your
7724 + * decision by deleting the provisions above and replace them with the notice
7725 + * and other provisions required by the GPL or the LGPL. If you do not delete
7726 + * the provisions above, a recipient may use your version of this file under
7727 + * the terms of any one of the MPL, the GPL or the LGPL.
7728 + *
7729 + * ***** END LICENSE BLOCK ***** */
7730 +
7731 +/*
7732 +
7733 + The Sidebar API for 3rd parties
7734 +
7735 +*/
7736 +
7737 +#include "nsISupports.idl"
7738 +
7739 +[scriptable, uuid(577CB745-8CAF-11d3-AAEF-00805F8A4905)]
7740 +interface nsISidebar : nsISupports
7741 +{
7742 + void addPanel(in wstring aTitle, in string aContentURL,
7743 + in string aCustomizeURL);
7744 + void addPersistentPanel(in wstring aTitle, in string aContentURL,
7745 + in string aCustomizeURL);
7746 + void addSearchEngine(in string engineURL, in string iconURL,
7747 + in wstring suggestedTitle, in wstring suggestedCategory);
7748 +};
7749 +
7750 +%{ C++
7751 +// {577CB744-8CAF-11d3-AAEF-00805F8A4905}
7752 +#define NS_SIDEBAR_CID \
7753 +{ 0x577cb744, 0x8caf, 0x11d3, { 0xaa, 0xef, 0x0, 0x80, 0x5f, 0x8a, 0x49, 0x5 } }
7754 +
7755 +#define NS_SIDEBAR_CONTRACTID "@mozilla.org/sidebar;1"
7756 +%}
7757 +
7758 +/*
7759 + var isidebar = Components.interfaces.nsISidebar;
7760 + var csidebar = Components.classes['@mozilla.org/sidebar;1'];
7761 + var sidebar = csidebar.createInstance(isidebar);
7762 +*/
7763 === toolkit/components/sidebar/src/Makefile.in
7764 ==================================================================
7765 --- xulrunner/toolkit/components/sidebar/src/Makefile.in (revision 4)
7766 +++ xulrunner/toolkit/components/sidebar/src/Makefile.in (local)
7767 @@ -0,0 +1,48 @@
7768 +#
7769 +# ***** BEGIN LICENSE BLOCK *****
7770 +# Version: MPL 1.1/GPL 2.0/LGPL 2.1
7771 +#
7772 +# The contents of this file are subject to the Mozilla Public License Version
7773 +# 1.1 (the "License"); you may not use this file except in compliance with
7774 +# the License. You may obtain a copy of the License at
7775 +# http://www.mozilla.org/MPL/
7776 +#
7777 +# Software distributed under the License is distributed on an "AS IS" basis,
7778 +# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
7779 +# for the specific language governing rights and limitations under the
7780 +# License.
7781 +#
7782 +# The Original Code is mozilla.org Code.
7783 +#
7784 +# The Initial Developer of the Original Code is
7785 +# Netscape Communications Corporation.
7786 +# Portions created by the Initial Developer are Copyright (C) 1998
7787 +# the Initial Developer. All Rights Reserved.
7788 +#
7789 +# Contributor(s):
7790 +#
7791 +# Alternatively, the contents of this file may be used under the terms of
7792 +# either the GNU General Public License Version 2 or later (the "GPL"), or
7793 +# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
7794 +# in which case the provisions of the GPL or the LGPL are applicable instead
7795 +# of those above. If you wish to allow use of your version of this file only
7796 +# under the terms of either the GPL or the LGPL, and not to allow others to
7797 +# use your version of this file under the terms of the MPL, indicate your
7798 +# decision by deleting the provisions above and replace them with the notice
7799 +# and other provisions required by the GPL or the LGPL. If you do not delete
7800 +# the provisions above, a recipient may use your version of this file under
7801 +# the terms of any one of the MPL, the GPL or the LGPL.
7802 +#
7803 +# ***** END LICENSE BLOCK *****
7804 +
7805 +DEPTH = ../../../..
7806 +topsrcdir = @top_srcdir@
7807 +srcdir = @srcdir@
7808 +VPATH = @srcdir@
7809 +
7810 +include $(DEPTH)/config/autoconf.mk
7811 +
7812 +EXTRA_COMPONENTS = nsSidebar.js
7813 +
7814 +include $(topsrcdir)/config/rules.mk
7815 +
7816 === toolkit/components/sidebar/src/nsSidebar.js
7817 ==================================================================
7818 --- xulrunner/toolkit/components/sidebar/src/nsSidebar.js (revision 4)
7819 +++ xulrunner/toolkit/components/sidebar/src/nsSidebar.js (local)
7820 @@ -0,0 +1,315 @@
7821 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
7822 + * ***** BEGIN LICENSE BLOCK *****
7823 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
7824 + *
7825 + * The contents of this file are subject to the Mozilla Public License Version
7826 + * 1.1 (the "License"); you may not use this file except in compliance with
7827 + * the License. You may obtain a copy of the License at
7828 + * http://www.mozilla.org/MPL/
7829 + *
7830 + * Software distributed under the License is distributed on an "AS IS" basis,
7831 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
7832 + * for the specific language governing rights and limitations under the
7833 + * License.
7834 + *
7835 + * The Original Code is mozilla.org code.
7836 + *
7837 + * The Initial Developer of the Original Code is
7838 + * Netscape Communications Corporation.
7839 + * Portions created by the Initial Developer are Copyright (C) 1999
7840 + * the Initial Developer. All Rights Reserved.
7841 + *
7842 + * Contributor(s):
7843 + * Stephen Lamm <slamm@××××××××.com>
7844 + * Robert John Churchill <rjc@××××××××.com>
7845 + * David Hyatt <hyatt@×××××××.org>
7846 + * Christopher A. Aillon <christopher@××××××.com>
7847 + *
7848 + * Alternatively, the contents of this file may be used under the terms of
7849 + * either the GNU General Public License Version 2 or later (the "GPL"), or
7850 + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
7851 + * in which case the provisions of the GPL or the LGPL are applicable instead
7852 + * of those above. If you wish to allow use of your version of this file only
7853 + * under the terms of either the GPL or the LGPL, and not to allow others to
7854 + * use your version of this file under the terms of the MPL, indicate your
7855 + * decision by deleting the provisions above and replace them with the notice
7856 + * and other provisions required by the GPL or the LGPL. If you do not delete
7857 + * the provisions above, a recipient may use your version of this file under
7858 + * the terms of any one of the MPL, the GPL or the LGPL.
7859 + *
7860 + * ***** END LICENSE BLOCK ***** */
7861 +
7862 +/*
7863 + * No magic constructor behaviour, as is de rigeur for XPCOM.
7864 + * If you must perform some initialization, and it could possibly fail (even
7865 + * due to an out-of-memory condition), you should use an Init method, which
7866 + * can convey failure appropriately (thrown exception in JS,
7867 + * NS_FAILED(nsresult) return in C++).
7868 + *
7869 + * In JS, you can actually cheat, because a thrown exception will cause the
7870 + * CreateInstance call to fail in turn, but not all languages are so lucky.
7871 + * (Though ANSI C++ provides exceptions, they are verboten in Mozilla code
7872 + * for portability reasons -- and even when you're building completely
7873 + * platform-specific code, you can't throw across an XPCOM method boundary.)
7874 + */
7875 +
7876 +const DEBUG = false; /* set to false to suppress debug messages */
7877 +
7878 +const SIDEBAR_CONTRACTID = "@mozilla.org/sidebar;1";
7879 +const SIDEBAR_CID = Components.ID("{22117140-9c6e-11d3-aaf1-00805f8a4905}");
7880 +const NETSEARCH_CONTRACTID = "@mozilla.org/rdf/datasource;1?name=internetsearch"
7881 +const nsISupports = Components.interfaces.nsISupports;
7882 +const nsIFactory = Components.interfaces.nsIFactory;
7883 +const nsISidebar = Components.interfaces.nsISidebar;
7884 +const nsIInternetSearchService = Components.interfaces.nsIInternetSearchService;
7885 +const nsIClassInfo = Components.interfaces.nsIClassInfo;
7886 +
7887 +function nsSidebar()
7888 +{
7889 + const PROMPTSERVICE_CONTRACTID = "@mozilla.org/embedcomp/prompt-service;1";
7890 + const nsIPromptService = Components.interfaces.nsIPromptService;
7891 + this.promptService =
7892 + Components.classes[PROMPTSERVICE_CONTRACTID].getService(nsIPromptService);
7893 +}
7894 +
7895 +nsSidebar.prototype.nc = "http://home.netscape.com/NC-rdf#";
7896 +
7897 +function sidebarURLSecurityCheck(url)
7898 +{
7899 + if (url.search(/(^http:|^ftp:|^https:)/) == -1)
7900 + throw "Script attempted to add sidebar panel from illegal source";
7901 +}
7902 +
7903 +/* decorate prototype to provide ``class'' methods and property accessors */
7904 +nsSidebar.prototype.addPanel =
7905 +function (aTitle, aContentURL, aCustomizeURL)
7906 +{
7907 + debug("addPanel(" + aTitle + ", " + aContentURL + ", " +
7908 + aCustomizeURL + ")");
7909 +
7910 + return this.addPanelInternal(aTitle, aContentURL, aCustomizeURL, false);
7911 +}
7912 +
7913 +nsSidebar.prototype.addPersistentPanel =
7914 +function(aTitle, aContentURL, aCustomizeURL)
7915 +{
7916 + debug("addPersistentPanel(" + aTitle + ", " + aContentURL + ", " +
7917 + aCustomizeURL + ")\n");
7918 +
7919 + return this.addPanelInternal(aTitle, aContentURL, aCustomizeURL, true);
7920 +}
7921 +
7922 +nsSidebar.prototype.addPanelInternal =
7923 +function (aTitle, aContentURL, aCustomizeURL, aPersist)
7924 +{
7925 + var WINMEDSVC = Components.classes['@mozilla.org/appshell/window-mediator;1']
7926 + .getService(Components.interfaces.nsIWindowMediator);
7927 + var win = WINMEDSVC.getMostRecentWindow( "navigator:browser" );
7928 +
7929 + sidebarURLSecurityCheck(aContentURL);
7930 + var dialogArgs = {
7931 + name: aTitle,
7932 + url: aContentURL,
7933 + bWebPanel: true
7934 + }
7935 + var features;
7936 + if (!/Mac/.test(win.navigator.platform))
7937 + features = "centerscreen,chrome,dialog,resizable,dependent";
7938 + else
7939 + features = "chrome,dialog,resizable,modal";
7940 + win.openDialog("chrome://browser/content/bookmarks/addBookmark2.xul", "",
7941 + features, dialogArgs);
7942 +}
7943 +
7944 +/* decorate prototype to provide ``class'' methods and property accessors */
7945 +nsSidebar.prototype.addSearchEngine =
7946 +function (engineURL, iconURL, suggestedTitle, suggestedCategory)
7947 +{
7948 + debug("addSearchEngine(" + engineURL + ", " + iconURL + ", " +
7949 + suggestedCategory + ", " + suggestedTitle + ")");
7950 +
7951 + try
7952 + {
7953 + // make sure using HTTP (for both engine as well as icon URLs)
7954 +
7955 + if (engineURL.search(/^http:\/\//i) == -1)
7956 + {
7957 + debug ("must use HTTP to fetch search engine file");
7958 + throw Components.results.NS_ERROR_INVALID_ARG;
7959 + }
7960 +
7961 + if (iconURL.search(/^http:\/\//i) == -1)
7962 + {
7963 + debug ("must use HTTP to fetch search icon file");
7964 + throw Components.results.NS_ERROR_INVALID_ARG;
7965 + }
7966 +
7967 + // make sure engineURL refers to a .src file
7968 + if (engineURL.search(/\.src$/i) == -1)
7969 + {
7970 + debug ("engineURL doesn't reference a .src file");
7971 + throw Components.results.NS_ERROR_INVALID_ARG;
7972 + }
7973 +
7974 + // make sure iconURL refers to a .gif/.jpg/.jpeg/.png file
7975 + if (iconURL.search(/\.(gif|jpg|jpeg|png)$/i) == -1)
7976 + {
7977 + debug ("iconURL doesn't reference a supported image file");
7978 + throw Components.results.NS_ERROR_INVALID_ARG;
7979 + }
7980 +
7981 + }
7982 + catch(ex)
7983 + {
7984 + this.promptService.alert(null, "Failed to add the search engine.");
7985 + throw Components.results.NS_ERROR_INVALID_ARG;
7986 + }
7987 +
7988 + var titleMessage, dialogMessage;
7989 + try {
7990 + var stringBundle = srGetStrBundle("chrome://browser/locale/sidebar/sidebar.properties");
7991 + if (stringBundle) {
7992 + titleMessage = stringBundle.GetStringFromName("addEngineConfirmTitle");
7993 + dialogMessage = stringBundle.GetStringFromName("addEngineConfirmMessage");
7994 + dialogMessage = dialogMessage.replace(/%title%/, suggestedTitle);
7995 + dialogMessage = dialogMessage.replace(/%category%/, suggestedCategory);
7996 + dialogMessage = dialogMessage.replace(/%url%/, engineURL);
7997 + dialogMessage = dialogMessage.replace(/#/g, "\n");
7998 + }
7999 + }
8000 + catch (e) {
8001 + titleMessage = "Add Search Engine";
8002 + dialogMessage = "Add the following search engine?\n\nName: " + suggestedTitle;
8003 + dialogMessage += "\nSearch Category: " + suggestedCategory;
8004 + dialogMessage += "\nSource: " + engineURL;
8005 + }
8006 +
8007 + var rv = this.promptService.confirm(null, titleMessage, dialogMessage);
8008 +
8009 + if (!rv)
8010 + return;
8011 +
8012 + var internetSearch = Components.classes[NETSEARCH_CONTRACTID].getService();
8013 + if (internetSearch)
8014 + internetSearch = internetSearch.QueryInterface(nsIInternetSearchService);
8015 + if (internetSearch)
8016 + {
8017 + internetSearch.AddSearchEngine(engineURL, iconURL, suggestedTitle,
8018 + suggestedCategory);
8019 + }
8020 +}
8021 +
8022 +// property of nsIClassInfo
8023 +nsSidebar.prototype.flags = nsIClassInfo.DOM_OBJECT;
8024 +
8025 +// property of nsIClassInfo
8026 +nsSidebar.prototype.classDescription = "Sidebar";
8027 +
8028 +// method of nsIClassInfo
8029 +nsSidebar.prototype.getInterfaces = function(count) {
8030 + var interfaceList = [nsISidebar, nsIClassInfo];
8031 + count.value = interfaceList.length;
8032 + return interfaceList;
8033 +}
8034 +
8035 +// method of nsIClassInfo
8036 +nsSidebar.prototype.getHelperForLanguage = function(count) {return null;}
8037 +
8038 +nsSidebar.prototype.QueryInterface =
8039 +function (iid) {
8040 + if (!iid.equals(nsISidebar) &&
8041 + !iid.equals(nsIClassInfo) &&
8042 + !iid.equals(nsISupports))
8043 + throw Components.results.NS_ERROR_NO_INTERFACE;
8044 + return this;
8045 +}
8046 +
8047 +var sidebarModule = new Object();
8048 +
8049 +sidebarModule.registerSelf =
8050 +function (compMgr, fileSpec, location, type)
8051 +{
8052 + debug("registering (all right -- a JavaScript module!)");
8053 + compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
8054 +
8055 + compMgr.registerFactoryLocation(SIDEBAR_CID,
8056 + "Sidebar JS Component",
8057 + SIDEBAR_CONTRACTID,
8058 + fileSpec,
8059 + location,
8060 + type);
8061 + const CATMAN_CONTRACTID = "@mozilla.org/categorymanager;1";
8062 + const nsICategoryManager = Components.interfaces.nsICategoryManager;
8063 + var catman = Components.classes[CATMAN_CONTRACTID].
8064 + getService(nsICategoryManager);
8065 +
8066 + const JAVASCRIPT_GLOBAL_PROPERTY_CATEGORY = "JavaScript global property";
8067 + catman.addCategoryEntry(JAVASCRIPT_GLOBAL_PROPERTY_CATEGORY,
8068 + "sidebar",
8069 + SIDEBAR_CONTRACTID,
8070 + true,
8071 + true);
8072 +}
8073 +
8074 +sidebarModule.getClassObject =
8075 +function (compMgr, cid, iid) {
8076 + if (!cid.equals(SIDEBAR_CID))
8077 + throw Components.results.NS_ERROR_NO_INTERFACE;
8078 +
8079 + if (!iid.equals(Components.interfaces.nsIFactory))
8080 + throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
8081 +
8082 + return sidebarFactory;
8083 +}
8084 +
8085 +sidebarModule.canUnload =
8086 +function(compMgr)
8087 +{
8088 + debug("Unloading component.");
8089 + return true;
8090 +}
8091 +
8092 +/* factory object */
8093 +var sidebarFactory = new Object();
8094 +
8095 +sidebarFactory.createInstance =
8096 +function (outer, iid) {
8097 + debug("CI: " + iid);
8098 + if (outer != null)
8099 + throw Components.results.NS_ERROR_NO_AGGREGATION;
8100 +
8101 + return (new nsSidebar()).QueryInterface(iid);
8102 +}
8103 +
8104 +/* entrypoint */
8105 +function NSGetModule(compMgr, fileSpec) {
8106 + return sidebarModule;
8107 +}
8108 +
8109 +/* static functions */
8110 +if (DEBUG)
8111 + debug = function (s) { dump("-*- sidebar component: " + s + "\n"); }
8112 +else
8113 + debug = function (s) {}
8114 +
8115 +var strBundleService = null;
8116 +function srGetStrBundle(path)
8117 +{
8118 + var strBundle = null;
8119 + if (!strBundleService) {
8120 + try {
8121 + strBundleService =
8122 + Components.classes["@mozilla.org/intl/stringbundle;1"].getService();
8123 + strBundleService =
8124 + strBundleService.QueryInterface(Components.interfaces.nsIStringBundleService);
8125 + } catch (ex) {
8126 + dump("\n--** strBundleService failed: " + ex + "\n");
8127 + return null;
8128 + }
8129 + }
8130 + strBundle = strBundleService.createBundle(path);
8131 + if (!strBundle) {
8132 + dump("\n--** strBundle createInstance failed **--\n");
8133 + }
8134 + return strBundle;
8135 +}
8136
8137
8138
8139 1.1 src/patchsets/xulrunner/1.8.1.19/185_useragent.patch
8140
8141 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/185_useragent.patch?rev=1.1&view=markup
8142 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/185_useragent.patch?rev=1.1&content-type=text/plain
8143
8144 Index: 185_useragent.patch
8145 ===================================================================
8146 #! /bin/sh /usr/share/dpatch/dpatch-run
8147 ## 185_useragent.dpatch by Mike Hommey <glandium@××××××.org>
8148 ##
8149 ## All lines beginning with `## DP:' are a description of the patch.
8150 ## DP: Remove useless useragent setter at startup. bz#331783.
8151
8152 @DPATCH@
8153
8154 === layout/build/Makefile.in
8155 ==================================================================
8156 --- xulrunner/layout/build/Makefile.in (revision 42)
8157 +++ xulrunner/layout/build/Makefile.in (local)
8158 @@ -105,7 +105,6 @@
8159
8160 CPPSRCS = \
8161 nsLayoutModule.cpp \
8162 - nsContentHTTPStartup.cpp \
8163 nsContentDLF.cpp \
8164 $(NULL)
8165
8166 === layout/build/nsLayoutModule.cpp
8167 ==================================================================
8168 --- xulrunner/layout/build/nsLayoutModule.cpp (revision 42)
8169 +++ xulrunner/layout/build/nsLayoutModule.cpp (local)
8170 @@ -43,7 +43,6 @@
8171 #include "nsCSSProps.h" // to addref/release table
8172 #include "nsColorNames.h" // to addref/release table
8173 #include "nsContentCID.h"
8174 -#include "nsContentHTTPStartup.h"
8175 #include "nsContentDLF.h"
8176 #include "nsContentPolicyUtils.h"
8177 #include "nsContentUtils.h"
8178 @@ -593,7 +592,6 @@
8179 #ifdef MOZ_SVG
8180 MAKE_CTOR(CreateSVGRect, nsIDOMSVGRect, NS_NewSVGRect)
8181 #endif
8182 -NS_GENERIC_FACTORY_CONSTRUCTOR(nsContentHTTPStartup)
8183 MAKE_CTOR(CreateContentDLF, nsIDocumentLoaderFactory, NS_NewContentDocumentLoaderFactory)
8184 NS_GENERIC_FACTORY_CONSTRUCTOR(nsCSSOMFactory)
8185 NS_GENERIC_FACTORY_CONSTRUCTOR(nsInspectorCSSUtils)
8186 @@ -1258,13 +1256,6 @@
8187 CreateSVGRect },
8188 #endif
8189
8190 - { "Content HTTP Startup Listener",
8191 - NS_CONTENTHTTPSTARTUP_CID,
8192 - NS_CONTENTHTTPSTARTUP_CONTRACTID,
8193 - nsContentHTTPStartupConstructor,
8194 - nsContentHTTPStartup::RegisterHTTPStartup,
8195 - nsContentHTTPStartup::UnregisterHTTPStartup },
8196 -
8197 { "Document Loader Factory",
8198 NS_CONTENT_DOCUMENT_LOADER_FACTORY_CID,
8199 "@mozilla.org/content/document-loader-factory;1",
8200
8201
8202
8203 1.1 src/patchsets/xulrunner/1.8.1.19/185_xpcomglue.patch
8204
8205 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/185_xpcomglue.patch?rev=1.1&view=markup
8206 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/185_xpcomglue.patch?rev=1.1&content-type=text/plain
8207
8208 Index: 185_xpcomglue.patch
8209 ===================================================================
8210 #! /bin/sh /usr/share/dpatch/dpatch-run
8211 ## 185_xpcomglue.dpatch by Mike Hommey <glandium@××××××.org>
8212 ##
8213 ## All lines beginning with `## DP:' are a description of the patch.
8214 ## DP: - Build the xpcom glue as a shared library. Still hackish.
8215 ## DP: - Load DSOs from . when directory is not given.
8216
8217 @DPATCH@
8218
8219 === xpcom/glue/Makefile.in
8220 ==================================================================
8221 --- xulrunner/xpcom/glue/Makefile.in (revision 62)
8222 +++ xulrunner/xpcom/glue/Makefile.in (local)
8223 @@ -45,6 +45,7 @@
8224
8225 DIRS = standalone
8226
8227 +ifeq (1,0)
8228 MODULE = xpcom
8229 LIBRARY_NAME = xpcomglue_s
8230
8231 @@ -64,6 +65,7 @@
8232 $(XPCOM_GLUE_SRC_LCPPSRCS) \
8233 $(XPCOM_GLUENS_SRC_LCPPSRCS) \
8234 $(NULL)
8235 +endif
8236
8237 EXPORTS = \
8238 pldhash.h \
8239 @@ -96,6 +98,7 @@
8240 nsVersionComparator.h \
8241 $(NULL)
8242
8243 +ifeq (1,0)
8244 SDK_LIBRARY = \
8245 $(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
8246 $(NULL)
8247 @@ -105,6 +108,7 @@
8248
8249 # Force use of PIC
8250 FORCE_USE_PIC = 1
8251 +endif
8252
8253 include $(topsrcdir)/config/rules.mk
8254
8255 === xpcom/glue/standalone/Makefile.in
8256 ==================================================================
8257 --- xulrunner/xpcom/glue/standalone/Makefile.in (revision 62)
8258 +++ xulrunner/xpcom/glue/standalone/Makefile.in (local)
8259 @@ -45,10 +45,15 @@
8260
8261 MODULE = xpcom
8262 LIBRARY_NAME = xpcomglue
8263 +SO_VERSION = 1
8264 +VISIBILITY_FLAGS=
8265
8266 REQUIRES = string \
8267 $(NULL)
8268
8269 +EXTRA_DSO_LDOPTS += $(NSSLIBS) \
8270 + $(NSPR_LIBS)
8271 +
8272 LOCAL_INCLUDES = \
8273 -I$(srcdir)/../../build \
8274 $(NULL)
8275 @@ -87,11 +91,11 @@
8276 $(NULL)
8277
8278 SDK_LIBRARY = \
8279 - $(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX) \
8280 + $(DLL_PREFIX)xpcomglue$(DLL_SUFFIX) \
8281 $(NULL)
8282
8283 # we don't want the shared lib, but we want to force the creation of a static lib.
8284 -FORCE_STATIC_LIB = 1
8285 +#FORCE_STATIC_LIB = 1
8286
8287 # Force use of PIC
8288 FORCE_USE_PIC = 1
8289 === xpcom/glue/standalone/nsGlueLinking.h
8290 ==================================================================
8291 --- xulrunner/xpcom/glue/standalone/nsGlueLinking.h (revision 62)
8292 +++ xulrunner/xpcom/glue/standalone/nsGlueLinking.h (local)
8293 @@ -42,15 +42,15 @@
8294
8295 #define XPCOM_DEPENDENT_LIBS_LIST "dependentlibs.list"
8296
8297 -NS_HIDDEN_(GetFrozenFunctionsFunc)
8298 +NS_EXPORT_(GetFrozenFunctionsFunc)
8299 XPCOMGlueLoad(const char *xpcomFile);
8300
8301 -NS_HIDDEN_(void)
8302 +NS_EXPORT_(void)
8303 XPCOMGlueUnload();
8304
8305 typedef void (*DependentLibsCallback)(const char *aDependentLib);
8306
8307 -NS_HIDDEN_(void)
8308 +NS_EXPORT_(void)
8309 XPCOMGlueLoadDependentLibs(const char *xpcomDir, DependentLibsCallback cb);
8310
8311 #endif // nsGlueLinking_h__
8312 === xpcom/glue/standalone/nsXPCOMGlue.h
8313 ==================================================================
8314 --- xulrunner/xpcom/glue/standalone/nsXPCOMGlue.h (revision 62)
8315 +++ xulrunner/xpcom/glue/standalone/nsXPCOMGlue.h (local)
8316 @@ -99,7 +99,7 @@
8317 * Initialize the XPCOM glue by dynamically linking against the XPCOM
8318 * shared library indicated by xpcomFile.
8319 */
8320 -extern "C" NS_HIDDEN_(nsresult)
8321 +extern "C" NS_EXPORT_(nsresult)
8322 XPCOMGlueStartup(const char* xpcomFile);
8323
8324 typedef void (*NSFuncPtr)();
8325 @@ -118,13 +118,13 @@
8326 * @throws NS_ERROR_LOSS_OF_SIGNIFICANT_DATA if only some of the required
8327 * functions were found.
8328 */
8329 -extern "C" NS_HIDDEN_(nsresult)
8330 +extern "C" NS_EXPORT_(nsresult)
8331 XPCOMGlueLoadXULFunctions(const nsDynamicFunctionLoad *symbols);
8332
8333 /**
8334 * Finish the XPCOM glue after it is no longer needed.
8335 */
8336 -extern "C" NS_HIDDEN_(nsresult)
8337 +extern "C" NS_EXPORT_(nsresult)
8338 XPCOMGlueShutdown();
8339
8340
8341 @@ -139,7 +139,7 @@
8342 * not need to free this buffer.
8343 * @status DEPRECATED - Use GRE_GetGREPathWithProperties
8344 */
8345 -extern "C" NS_HIDDEN_(char const *)
8346 +extern "C" NS_EXPORT_(char const *)
8347 GRE_GetXPCOMPath();
8348
8349
8350 @@ -148,7 +148,7 @@
8351 *
8352 * @param _retval Ordinary XPCOM getter, returns an addrefed interface.
8353 */
8354 -extern "C" NS_HIDDEN_(nsresult)
8355 +extern "C" NS_EXPORT_(nsresult)
8356 GRE_GetGREDirectory(nsILocalFile* *_retval);
8357
8358
8359 @@ -157,14 +157,14 @@
8360 * directoryserviceprovider may use GRE_Startup to start the XPCOM
8361 * glue and initialize the GRE in one step.
8362 */
8363 -extern "C" NS_HIDDEN_(nsresult)
8364 +extern "C" NS_EXPORT_(nsresult)
8365 GRE_Startup();
8366
8367
8368 /**
8369 * Shut down XPCOM and the XPCOM glue in one step.
8370 */
8371 -extern "C" NS_HIDDEN_(nsresult)
8372 +extern "C" NS_EXPORT_(nsresult)
8373 GRE_Shutdown();
8374
8375 #endif // XPCOM_GLUE
8376 === xpcom/string/public/nsStringAPI.h
8377 ==================================================================
8378 --- xulrunner/xpcom/string/public/nsStringAPI.h (revision 62)
8379 +++ xulrunner/xpcom/string/public/nsStringAPI.h (local)
8380 @@ -75,7 +75,7 @@
8381 #include "nscore.h"
8382
8383 #if defined( XPCOM_GLUE )
8384 -#define NS_STRINGAPI(type) extern "C" NS_HIDDEN_(type)
8385 +#define NS_STRINGAPI(type) extern "C" NS_EXPORT_(type)
8386 #elif defined( _IMPL_NS_STRINGAPI )
8387 #define NS_STRINGAPI(type) extern "C" NS_EXPORT type
8388 #else
8389 === xpcom/tools/registry/Makefile.in
8390 ==================================================================
8391 --- xulrunner/xpcom/tools/registry/Makefile.in (revision 62)
8392 +++ xulrunner/xpcom/tools/registry/Makefile.in (local)
8393 @@ -55,7 +55,6 @@
8394
8395 LIBS = \
8396 $(XPCOM_STANDALONE_GLUE_LDOPTS) \
8397 - $(NSPR_LIBS) \
8398 $(NULL)
8399
8400 # Need to link with CoreFoundation on Mac
8401 === configure.in
8402 ==================================================================
8403 --- xulrunner/configure.in (revision 62)
8404 +++ xulrunner/configure.in (local)
8405 @@ -754,7 +754,7 @@
8406 XPCOM_FROZEN_LDOPTS='-L$(DIST)/bin $(MOZ_FIX_LINK_PATHS) -lxpcom'
8407 LIBXUL_LIBS='$(XPCOM_FROZEN_LDOPTS) -lxul'
8408 XPCOM_GLUE_LDOPTS='$(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) $(XPCOM_FROZEN_LDOPTS)'
8409 -XPCOM_STANDALONE_GLUE_LDOPTS='$(DIST)/lib/$(LIB_PREFIX)xpcomglue.$(LIB_SUFFIX)'
8410 +XPCOM_STANDALONE_GLUE_LDOPTS='-L$(DIST)/lib -lxpcomglue'
8411
8412 MOZ_COMPONENT_NSPR_LIBS='-L$(DIST)/bin $(NSPR_LIBS)'
8413 MOZ_XPCOM_OBSOLETE_LIBS='-L$(DIST)/lib -lxpcom_compat'
8414 === xpcom/glue/standalone/nsGlueLinkingDlopen.cpp
8415 ==================================================================
8416 --- xulrunner/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp (revision 65)
8417 +++ xulrunner/xpcom/glue/standalone/nsGlueLinkingDlopen.cpp (local)
8418 @@ -86,20 +86,22 @@
8419 GetFrozenFunctionsFunc
8420 XPCOMGlueLoad(const char *xpcomFile)
8421 {
8422 - char xpcomDir[MAXPATHLEN];
8423 - if (realpath(xpcomFile, xpcomDir)) {
8424 - char *lastSlash = strrchr(xpcomDir, '/');
8425 - if (lastSlash) {
8426 - *lastSlash = '\0';
8427 + char xulFile[MAXPATHLEN];
8428 + char *lastSlash = strrchr(xpcomFile, '/');
8429 + if (!lastSlash) {
8430 + snprintf(xulFile, MAXPATHLEN, "./%s", xpcomFile);
8431 + return XPCOMGlueLoad(xulFile);
8432 + }
8433 + *lastSlash = '\0';
8434
8435 - XPCOMGlueLoadDependentLibs(xpcomDir, ReadDependentCB);
8436 + XPCOMGlueLoadDependentLibs(xpcomFile, ReadDependentCB);
8437
8438 - snprintf(lastSlash, MAXPATHLEN - strlen(xpcomDir), "/" XUL_DLL);
8439 + snprintf(xulFile, MAXPATHLEN - strlen(xpcomFile), "%s/" XUL_DLL, xpcomFile);
8440
8441 - sXULLibHandle = dlopen(xpcomDir, RTLD_GLOBAL | RTLD_LAZY);
8442 - }
8443 - }
8444 + sXULLibHandle = dlopen(xulFile, RTLD_GLOBAL | RTLD_LAZY);
8445
8446 + *lastSlash = '/';
8447 +
8448 // RTLD_DEFAULT is not defined in non-GNU toolchains, and it is
8449 // (void*) 0 in any case.
8450
8451
8452
8453
8454 1.1 src/patchsets/xulrunner/1.8.1.19/300_firefox-1.5-makeopts.patch
8455
8456 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/300_firefox-1.5-makeopts.patch?rev=1.1&view=markup
8457 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/300_firefox-1.5-makeopts.patch?rev=1.1&content-type=text/plain
8458
8459 Index: 300_firefox-1.5-makeopts.patch
8460 ===================================================================
8461 --- Makefile.in-orig 2006-01-31 14:25:38.508639384 -0600
8462 +++ Makefile.in 2006-01-31 14:25:52.018585560 -0600
8463 @@ -58,6 +58,7 @@
8464 $(MAKE) -C config export
8465 $(MAKE) nspr
8466 $(MAKE) ldap
8467 + $(MAKE) -C parser/expat
8468 $(MAKE) tier_0
8469 $(MAKE) tier_1
8470 $(MAKE) tier_2
8471
8472
8473
8474 1.1 src/patchsets/xulrunner/1.8.1.19/401_firefox-1.5-theme-change.patch
8475
8476 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/401_firefox-1.5-theme-change.patch?rev=1.1&view=markup
8477 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/401_firefox-1.5-theme-change.patch?rev=1.1&content-type=text/plain
8478
8479 Index: 401_firefox-1.5-theme-change.patch
8480 ===================================================================
8481 Index: layout/base/nsPresContext.cpp
8482 ===================================================================
8483 RCS file: /cvsroot/mozilla/layout/base/nsPresContext.cpp,v
8484 retrieving revision 3.288.12.2.4.1
8485 diff -d -u -p -r3.288.12.2.4.1 nsPresContext.cpp
8486 --- layout/base/nsPresContext.cpp 21 Apr 2006 23:30:50 -0000 3.288.12.2.4.1
8487 +++ layout/base/nsPresContext.cpp 26 Sep 2006 19:26:40 -0000
8488 @@ -73,6 +73,9 @@
8489 #include "nsIDOMDocument.h"
8490 #include "nsAutoPtr.h"
8491 #include "nsEventStateManager.h"
8492 +#include "nsIEventQueue.h"
8493 +#include "nsIEventQueueService.h"
8494 +
8495 #ifdef IBMBIDI
8496 #include "nsBidiPresUtils.h"
8497 #endif // IBMBIDI
8498 @@ -267,6 +270,7 @@ nsPresContext::~nsPresContext()
8499 NS_IF_RELEASE(mDeviceContext);
8500 NS_IF_RELEASE(mLookAndFeel);
8501 NS_IF_RELEASE(mLangGroup);
8502 + NS_IF_RELEASE(mEventQueueService);
8503 }
8504
8505 NS_IMPL_ISUPPORTS2(nsPresContext, nsPresContext, nsIObserver)
8506 @@ -285,6 +289,17 @@ static const char* const kGenericFont[]
8507 ".fantasy."
8508 };
8509
8510 +// Set to true when LookAndFeelChanged needs to be called. This is used
8511 +// because the look and feel is a service, so there's no need to notify it from
8512 +// more than one prescontext.
8513 +static PRBool sLookAndFeelChanged;
8514 +
8515 +// Set to true when ThemeChanged needs to be called on mTheme. This is used
8516 +// because mTheme is a service, so there's no need to notify it from more than
8517 +// one prescontext.
8518 +static PRBool sThemeChanged;
8519 +
8520 +
8521 void
8522 nsPresContext::GetFontPreferences()
8523 {
8524 @@ -709,6 +724,9 @@ nsPresContext::Init(nsIDeviceContext* aD
8525 this);
8526 #endif
8527
8528 + rv = CallGetService(NS_EVENTQUEUESERVICE_CONTRACTID, &mEventQueueService);
8529 + NS_ENSURE_SUCCESS(rv, rv);
8530 +
8531 // Initialize our state from the user preferences
8532 GetUserPreferences();
8533
8534 @@ -1180,33 +1198,126 @@ nsPresContext::GetTheme()
8535 void
8536 nsPresContext::ThemeChanged()
8537 {
8538 + if (!mPendingThemeChanged) {
8539 + sLookAndFeelChanged = PR_TRUE;
8540 + sThemeChanged = PR_TRUE;
8541 +
8542 + nsCOMPtr<nsIEventQueue> eventQ;
8543 + mEventQueueService->
8544 + GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
8545 + getter_AddRefs(eventQ));
8546 + if (!eventQ) {
8547 + return;
8548 + }
8549 +
8550 + PLEvent* evt = new PLEvent();
8551 + if (!evt) {
8552 + return;
8553 + }
8554 +
8555 + PL_InitEvent(evt, this, nsPresContext::ThemeChangedInternal,
8556 + nsPresContext::DestroyThemeChangeEvt);
8557 +
8558 + // After this point, event destruction will release |this|
8559 + NS_ADDREF_THIS();
8560 +
8561 + nsresult rv = eventQ->PostEvent(evt);
8562 + if (NS_FAILED(rv)) {
8563 + PL_DestroyEvent(evt);
8564 + } else {
8565 + mPendingThemeChanged = PR_TRUE;
8566 + }
8567 + }
8568 +}
8569 +
8570 +void* PR_CALLBACK
8571 +nsPresContext::ThemeChangedInternal(PLEvent *aEvent)
8572 +{
8573 + nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
8574 +
8575 + pc->mPendingThemeChanged = PR_FALSE;
8576 +
8577 // Tell the theme that it changed, so it can flush any handles to stale theme
8578 // data.
8579 - if (mTheme)
8580 - mTheme->ThemeChanged();
8581 + if (pc->mTheme && sThemeChanged) {
8582 + pc->mTheme->ThemeChanged();
8583 + sThemeChanged = PR_FALSE;
8584 + }
8585
8586 // Clear all cached nsILookAndFeel colors.
8587 - if (mLookAndFeel)
8588 - mLookAndFeel->LookAndFeelChanged();
8589 + if (pc->mLookAndFeel && sLookAndFeelChanged) {
8590 + pc->mLookAndFeel->LookAndFeelChanged();
8591 + sLookAndFeelChanged = PR_FALSE;
8592 + }
8593
8594 // We have to clear style data because the assumption of style rule
8595 // immutability has been violated since any style rule that uses
8596 // system colors or fonts (and probably -moz-appearance as well) has
8597 // changed.
8598 - nsPresContext::ClearStyleDataAndReflow();
8599 + pc->ClearStyleDataAndReflow();
8600 +
8601 + return nsnull;
8602 +}
8603 +
8604 +
8605 +void PR_CALLBACK
8606 +nsPresContext::DestroyThemeChangeEvt(PLEvent* aEvent)
8607 +{
8608 + nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
8609 + NS_RELEASE(pc);
8610 + delete aEvent;
8611 }
8612
8613 void
8614 nsPresContext::SysColorChanged()
8615 {
8616 - if (mLookAndFeel) {
8617 + if (!mPendingSysColorChanged) {
8618 + sLookAndFeelChanged = PR_TRUE;
8619 +
8620 + nsCOMPtr<nsIEventQueue> eventQ;
8621 + mEventQueueService->
8622 + GetSpecialEventQueue(nsIEventQueueService::UI_THREAD_EVENT_QUEUE,
8623 + getter_AddRefs(eventQ));
8624 + if (!eventQ) {
8625 + return;
8626 + }
8627 +
8628 + PLEvent* evt = new PLEvent();
8629 + if (!evt) {
8630 + return;
8631 + }
8632 +
8633 + PL_InitEvent(evt, this, nsPresContext::SysColorChangedInternal,
8634 + nsPresContext::DestroySysColorChangeEvt);
8635 +
8636 + // After this point, event destruction will release |this|
8637 + NS_ADDREF_THIS();
8638 +
8639 + nsresult rv = eventQ->PostEvent(evt);
8640 + if (NS_FAILED(rv)) {
8641 + PL_DestroyEvent(evt);
8642 + } else {
8643 + mPendingSysColorChanged = PR_TRUE;
8644 + }
8645 + }
8646 +}
8647 +
8648 +void* PR_CALLBACK
8649 +nsPresContext::SysColorChangedInternal(PLEvent *aEvent)
8650 +{
8651 + nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
8652 +
8653 + pc->mPendingSysColorChanged = PR_FALSE;
8654 +
8655 + if (pc->mLookAndFeel && sLookAndFeelChanged) {
8656 // Don't use the cached values for the system colors
8657 - mLookAndFeel->LookAndFeelChanged();
8658 + pc->mLookAndFeel->LookAndFeelChanged();
8659 + sLookAndFeelChanged = PR_FALSE;
8660 }
8661 -
8662 +
8663 // Reset default background and foreground colors for the document since
8664 // they may be using system colors
8665 - GetDocumentColorPreferences();
8666 + pc->GetDocumentColorPreferences();
8667
8668 // Clear out all of the style data since it may contain RGB values
8669 // which originated from system colors.
8670 @@ -1222,7 +1333,17 @@ nsPresContext::SysColorChanged()
8671 // data without reflowing/updating views will lead to incorrect change hints
8672 // later, because when generating change hints, any style structs which have
8673 // been cleared and not reread are assumed to not be used at all.
8674 - ClearStyleDataAndReflow();
8675 + pc->ClearStyleDataAndReflow();
8676 +
8677 + return nsnull;
8678 +}
8679 +
8680 +void PR_CALLBACK
8681 +nsPresContext::DestroySysColorChangeEvt(PLEvent* aEvent)
8682 +{
8683 + nsPresContext* pc = NS_STATIC_CAST(nsPresContext*, aEvent->owner);
8684 + NS_RELEASE(pc);
8685 + delete aEvent;
8686 }
8687
8688 void
8689 Index: layout/base/nsPresContext.h
8690 ===================================================================
8691 RCS file: /cvsroot/mozilla/layout/base/nsPresContext.h,v
8692 retrieving revision 3.150.4.2
8693 diff -d -u -p -r3.150.4.2 nsPresContext.h
8694 --- layout/base/nsPresContext.h 29 Aug 2005 16:15:39 -0000 3.150.4.2
8695 +++ layout/base/nsPresContext.h 26 Sep 2006 19:26:40 -0000
8696 @@ -56,6 +56,7 @@
8697 #include "nsCRT.h"
8698 #include "nsIPrintSettings.h"
8699 #include "nsPropertyTable.h"
8700 +#include "plevent.h"
8701 #ifdef IBMBIDI
8702 class nsBidiPresUtils;
8703 #endif // IBMBIDI
8704 @@ -76,6 +77,7 @@ class nsIAtom;
8705 class nsIEventStateManager;
8706 class nsIURI;
8707 class nsILookAndFeel;
8708 +class nsIEventQueueService;
8709 class nsICSSPseudoComparator;
8710 class nsIAtom;
8711 struct nsStyleStruct;
8712 @@ -627,6 +629,14 @@ public:
8713 const nscoord* GetBorderWidthTable() { return mBorderWidthTable; }
8714
8715 protected:
8716 + static NS_HIDDEN_(void*) PR_CALLBACK ThemeChangedInternal(PLEvent* aEvent);
8717 + static NS_HIDDEN_(void*) PR_CALLBACK SysColorChangedInternal(PLEvent* aEvent);
8718 + static NS_HIDDEN_(void) PR_CALLBACK DestroyThemeChangeEvt(PLEvent* aEvent);
8719 + static NS_HIDDEN_(void) PR_CALLBACK DestroySysColorChangeEvt(PLEvent* aEvent);
8720 +
8721 + friend void* PR_CALLBACK ThemeChangedInternal(PLEvent* aEvent);
8722 + friend void* PR_CALLBACK SysColorChangedInternal(PLEvent* aEvent);
8723 +
8724 NS_HIDDEN_(void) SetImgAnimations(nsIContent *aParent, PRUint16 aMode);
8725 NS_HIDDEN_(void) GetDocumentColorPreferences();
8726
8727 @@ -654,6 +664,7 @@ protected:
8728 // from gfx back to layout.
8729 nsIEventStateManager* mEventManager; // [STRONG]
8730 nsILookAndFeel* mLookAndFeel; // [STRONG]
8731 + nsIEventQueueService *mEventQueueService; // [STRONG]
8732 nsIAtom* mMedium; // initialized by subclass ctors;
8733 // weak pointer to static atom
8734
8735 @@ -724,6 +735,8 @@ protected:
8736 unsigned mCanPaginatedScroll : 1;
8737 unsigned mDoScaledTwips : 1;
8738 unsigned mEnableJapaneseTransform : 1;
8739 + unsigned mPendingSysColorChanged : 1;
8740 + unsigned mPendingThemeChanged : 1;
8741 #ifdef IBMBIDI
8742 unsigned mIsVisual : 1;
8743 unsigned mIsBidiSystem : 1;
8744
8745
8746
8747 1.1 src/patchsets/xulrunner/1.8.1.19/402_firefox-2.0-pango-cursor.patch
8748
8749 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/402_firefox-2.0-pango-cursor.patch?rev=1.1&view=markup
8750 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/402_firefox-2.0-pango-cursor.patch?rev=1.1&content-type=text/plain
8751
8752 Index: 402_firefox-2.0-pango-cursor.patch
8753 ===================================================================
8754 # Upstream bug #335810
8755
8756 Index: mozilla/gfx/src/gtk/nsFontMetricsPango.cpp
8757 ===================================================================
8758 RCS file: /cvsroot/mozilla/gfx/src/gtk/nsFontMetricsPango.cpp,v
8759 retrieving revision 1.24
8760 diff -d -u -p -6 -r1.24 nsFontMetricsPango.cpp
8761 --- mozilla/gfx/src/gtk/nsFontMetricsPango.cpp 25 Aug 2006 01:02:34 -0000 1.24
8762 +++ mozilla/gfx/src/gtk/nsFontMetricsPango.cpp 6 Sep 2006 07:01:49 -0000
8763 @@ -948,13 +948,12 @@ nsFontMetricsPango::GetClusterInfo(const
8764 PRInt32
8765 nsFontMetricsPango::GetPosition(const PRUnichar *aText, PRUint32 aLength,
8766 nsPoint aPt)
8767 {
8768 int trailing = 0;
8769 int inx = 0;
8770 - gboolean found = FALSE;
8771 const gchar *curChar;
8772 PRInt32 retval = 0;
8773
8774 float f = mDeviceContext->AppUnitsToDevUnits();
8775
8776 PangoLayout *layout = pango_layout_new(mPangoContext);
8777 @@ -974,28 +973,18 @@ nsFontMetricsPango::GetPosition(const PR
8778 }
8779
8780 // Set up the pango layout
8781 pango_layout_set_text(layout, text, strlen(text));
8782 FixupSpaceWidths(layout, text);
8783
8784 - found = pango_layout_xy_to_index(layout, localX, localY,
8785 - &inx, &trailing);
8786 + pango_layout_xy_to_index(layout, localX, localY,
8787 + &inx, &trailing);
8788
8789 // Convert the index back to the utf-16 index
8790 curChar = text;
8791
8792 - // Jump to the end if it's not found.
8793 - if (!found) {
8794 - if (inx == 0)
8795 - retval = 0;
8796 - else if (trailing)
8797 - retval = aLength;
8798 -
8799 - goto loser;
8800 - }
8801 -
8802 for (PRUint32 curOffset=0; curOffset < aLength;
8803 curOffset++, curChar = g_utf8_find_next_char(curChar, NULL)) {
8804
8805 // Check for a match before checking for a surrogate pair
8806 if (curChar - text == inx) {
8807 retval = curOffset;
8808
8809
8810
8811 1.1 src/patchsets/xulrunner/1.8.1.19/501_firefox-2.0-gtk-cursors.patch
8812
8813 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/501_firefox-2.0-gtk-cursors.patch?rev=1.1&view=markup
8814 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/501_firefox-2.0-gtk-cursors.patch?rev=1.1&content-type=text/plain
8815
8816 Index: 501_firefox-2.0-gtk-cursors.patch
8817 ===================================================================
8818 ## 501_firefox-2.0-gtk-cursors-patch
8819 ##
8820 ## All lines beginning with `## GP:' are a description of the patch.
8821 ## GP: use X cursor theme for more cursors. bz#310924
8822
8823 --- widget/src/gtk2/nsWindow.cpp 2006-01-09 05:48:56.000000000 +0000
8824 +++ widget/src/gtk2/nsWindow.cpp 2006-08-09 18:51:41.000000000 +0000
8825 @@ -3512,15 +3512,19 @@
8826 gdkcursor = gdk_cursor_new(GDK_FLEUR);
8827 break;
8828 case eCursor_help:
8829 + gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(), "help");
8830 newType = MOZ_CURSOR_QUESTION_ARROW;
8831 break;
8832 case eCursor_copy: // CSS3
8833 + gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(), "copy");
8834 newType = MOZ_CURSOR_COPY;
8835 break;
8836 case eCursor_alias:
8837 + gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(), "alias");
8838 newType = MOZ_CURSOR_ALIAS;
8839 break;
8840 case eCursor_context_menu:
8841 + gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(), "context-menu");
8842 newType = MOZ_CURSOR_CONTEXT_MENU;
8843 break;
8844 case eCursor_cell:
8845 @@ -3533,6 +3537,7 @@
8846 newType = MOZ_CURSOR_HAND_GRABBING;
8847 break;
8848 case eCursor_spinning:
8849 + gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(), "wait"); // or maybe "progress" ?
8850 newType = MOZ_CURSOR_SPINNING;
8851 break;
8852 case eCursor_zoom_in:
8853 @@ -3542,25 +3547,34 @@
8854 newType = MOZ_CURSOR_ZOOM_OUT;
8855 break;
8856 case eCursor_not_allowed:
8857 + gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(), "not-allowed");
8858 + newType = MOZ_CURSOR_NOT_ALLOWED;
8859 + break;
8860 case eCursor_no_drop:
8861 + gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(), "no-drop");
8862 newType = MOZ_CURSOR_NOT_ALLOWED;
8863 break;
8864 case eCursor_col_resize:
8865 + gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(), "col-resize");
8866 newType = MOZ_CURSOR_COL_RESIZE;
8867 break;
8868 case eCursor_row_resize:
8869 + gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(), "row-resize");
8870 newType = MOZ_CURSOR_ROW_RESIZE;
8871 break;
8872 case eCursor_vertical_text:
8873 + gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(), "vertical-text");
8874 newType = MOZ_CURSOR_VERTICAL_TEXT;
8875 break;
8876 case eCursor_all_scroll:
8877 gdkcursor = gdk_cursor_new(GDK_FLEUR);
8878 break;
8879 case eCursor_nesw_resize:
8880 + gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(), "nesw-resize");
8881 newType = MOZ_CURSOR_NESW_RESIZE;
8882 break;
8883 case eCursor_nwse_resize:
8884 + gdkcursor = gdk_cursor_new_from_name(gdk_display_get_default(), "nwse-resize");
8885 newType = MOZ_CURSOR_NWSE_RESIZE;
8886 break;
8887 case eCursor_ns_resize:
8888 @@ -3577,7 +3591,7 @@
8889
8890 // if by now we dont have a xcursor, this means we have to make a
8891 // custom one
8892 - if (newType != 0xff) {
8893 + if (!gdkcursor && newType != 0xff) {
8894 gdk_color_parse("#000000", &fg);
8895 gdk_color_parse("#ffffff", &bg);
8896
8897
8898
8899
8900 1.1 src/patchsets/xulrunner/1.8.1.19/502_xulrunner-2.0-window-blur.patch
8901
8902 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/502_xulrunner-2.0-window-blur.patch?rev=1.1&view=markup
8903 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/502_xulrunner-2.0-window-blur.patch?rev=1.1&content-type=text/plain
8904
8905 Index: 502_xulrunner-2.0-window-blur.patch
8906 ===================================================================
8907 ## 502_xulrunner-2.0-window-blur.patch
8908 ##
8909 ## All lines beginning with `## GP:' are a description of the patch.
8910 ## GP: window.blur() fails on popup window in gtkmozembed. bz#325644
8911
8912 --- dom/src/base/nsGlobalWindow.cpp 2006-06-29 05:24:47.000000000 +0000
8913 +++ dom/src/base/nsGlobalWindow.cpp 2006-08-09 18:55:49.000000000 +0000
8914 @@ -3571,7 +3571,9 @@
8915 if (NS_SUCCEEDED(rv))
8916 mDocShell->SetHasFocus(PR_FALSE);
8917
8918 - return rv;
8919 + // If embedding apps don't implement nsIEmbeddingSiteWindow2, we
8920 + // shouldn't throw to web content.
8921 + return NS_OK;
8922 }
8923
8924 NS_IMETHODIMP
8925
8926
8927
8928 1.1 src/patchsets/xulrunner/1.8.1.19/600_python_dynamic.patch
8929
8930 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/600_python_dynamic.patch?rev=1.1&view=markup
8931 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/600_python_dynamic.patch?rev=1.1&content-type=text/plain
8932
8933 Index: 600_python_dynamic.patch
8934 ===================================================================
8935 --- configure.in.orig 2007-03-25 20:41:24.000000000 +0200
8936 +++ configure.in 2007-03-25 22:09:40.000000000 +0200
8937 @@ -6909,8 +6909,8 @@
8938 else
8939 dnl Non-Windows include and libs
8940 MOZ_PYTHON_DLL_SUFFIX=$DLL_SUFFIX
8941 - PYTHON_INCLUDE_SRC=$MOZ_PYTHON_PREFIX/include/python$MOZ_PYTHON_VER_DOTTED
8942 - PYTHON_LIB_SRC=`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var("LIBPL")'`
8943 + PYTHON_INCLUDE_SRC=`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var("INCLUDEPY")'`
8944 + PYTHON_LIB_SRC=`$PYTHON -c 'from distutils import sysconfig; print sysconfig.get_config_var("LIBDIR")'`
8945 if test ! -f $PYTHON_INCLUDE_SRC/Python.h; then
8946 AC_MSG_ERROR([Include directory $PYTHON_INCLUDE_SRC not found or does not contain development headers])
8947 fi
8948
8949
8950
8951 1.1 src/patchsets/xulrunner/1.8.1.19/610_xpcom_sample.patch
8952
8953 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/610_xpcom_sample.patch?rev=1.1&view=markup
8954 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/610_xpcom_sample.patch?rev=1.1&content-type=text/plain
8955
8956 Index: 610_xpcom_sample.patch
8957 ===================================================================
8958 --- xpcom/sample/Makefile.in.orig 2007-04-18 05:24:25.000000000 +0200
8959 +++ xpcom/sample/Makefile.in 2007-04-18 05:25:16.000000000 +0200
8960 @@ -89,7 +89,7 @@
8961 # from this Makefile. We link against the "dependent glue" and against the
8962 # frozen XPCOM shared library.
8963 EXTRA_DSO_LDOPTS = \
8964 - $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
8965 + $(XPCOM_STANDALONE_GLUE_LDOPTS) \
8966 $(MOZ_COMPONENT_LIBS) \
8967 $(NULL)
8968
8969
8970
8971
8972 1.1 src/patchsets/xulrunner/1.8.1.19/801_fbsd-1.patch
8973
8974 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/801_fbsd-1.patch?rev=1.1&view=markup
8975 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/801_fbsd-1.patch?rev=1.1&content-type=text/plain
8976
8977 Index: 801_fbsd-1.patch
8978 ===================================================================
8979 --- mozilla/config/rules.mk.orig 2007-07-04 17:34:35.000000000 +0000
8980 +++ mozilla/config/rules.mk 2007-07-04 17:34:58.000000000 +0000
8981 @@ -137,9 +137,9 @@
8982
8983 ifdef SO_VERSION
8984 ifneq (,$(findstring $(SONAME),$(MKSHLIB)))
8985 -SO_VERSION_MAJOR := $(shell echo $(SO_VERSION) | sed 's/^\([^.]*\)\(\.[^.]*\)\?\(\.[^.]*\)\?/\1/')
8986 -SO_VERSION_MINOR := $(shell echo $(SO_VERSION) | sed 's/^\([^.]*\)\(\.[^.]*\)\?\(\.[^.]*\)\?/\2/')
8987 -SO_VERSION_MICRO := $(shell echo $(SO_VERSION) | sed 's/^\([^.]*\)\(\.[^.]*\)\?\(\.[^.]*\)\?/\3/')
8988 +SO_VERSION_MAJOR := $(shell echo $(SO_VERSION) | sed -n -e 's/^\([^.]*\).*/\1/p')
8989 +SO_VERSION_MINOR := $(shell echo $(SO_VERSION) | sed -n -e 's/^\([^.]*\)\(\.[^.]*\).*/\2/p')
8990 +SO_VERSION_MICRO := $(shell echo $(SO_VERSION) | sed -n -e 's/^\([^.]*\)\(\.[^.]*\)\(\.[^.]*\).*/\3/p')
8991
8992 SHARED_LIBRARY_LINKS := $(SONAME)
8993 ifdef SO_VERSION_MINOR
8994
8995
8996 1.1 src/patchsets/xulrunner/1.8.1.19/802_fbsd-2.patch
8997
8998 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/802_fbsd-2.patch?rev=1.1&view=markup
8999 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/802_fbsd-2.patch?rev=1.1&content-type=text/plain
9000
9001 Index: 802_fbsd-2.patch
9002 ===================================================================
9003 --- mozilla/configure.in.orig 2007-07-04 17:42:33.000000000 +0000
9004 +++ mozilla/configure.in 2007-07-04 17:43:08.000000000 +0000
9005 @@ -7563,6 +7563,7 @@
9006 AC_CONFIG_HEADER(
9007 gfx/gfx-config.h
9008 netwerk/necko-config.h
9009 +intl/uconv/native/config.h
9010 xpcom/xpcom-config.h
9011 xpcom/xpcom-private.h
9012 )
9013 diff -Nur mozilla/intl/uconv/native/config.h.in mozilla/intl/uconv/native/config.h.in
9014 --- mozilla/intl/uconv/native/config.h.in 1970-01-01 01:00:00 +0100
9015 +++ mozilla/intl/uconv/native/config.h.in 2007-07-03 14:53:53 +0100
9016 @@ -0,0 +1,2 @@
9017 +/* Define if iconv() supports const input */
9018 +#undef HAVE_ICONV_WITH_CONST_INPUT
9019 diff -Nur mozilla/intl/uconv/native/nsNativeUConvService.cpp mozilla/intl/uconv/native/nsNativeUConvService.cpp
9020 --- mozilla/intl/uconv/native/nsNativeUConvService.cpp 2007-07-03 15:10:08 +0100
9021 +++ mozilla/intl/uconv/native/nsNativeUConvService.cpp 2007-07-03 15:05:07 +0100
9022 @@ -37,6 +37,7 @@
9023
9024
9025 #ifdef MOZ_USE_NATIVE_UCONV
9026 +#include "config.h"
9027 #include "nsString.h"
9028 #include "nsIGenericFactory.h"
9029
9030 @@ -227,7 +228,11 @@
9031
9032 do {
9033 if ( iconv(mConverter,
9034 +#ifdef HAVE_ICONV_WITH_CONST_INPUT
9035 + (const char **)&aSrc,
9036 +#else
9037 (char **)&aSrc,
9038 +#endif
9039 &inLeft,
9040 (char **)&aDest,
9041 &outLeft) == (size_t) -1 ) {
9042 @@ -374,7 +379,11 @@
9043
9044 do {
9045 if ( iconv(mConverter,
9046 +#ifdef HAVE_ICONV_WITH_CONST_INPUT
9047 + (const char **)&aSrc,
9048 +#else
9049 (char **)&aSrc,
9050 +#endif
9051 &inLeft,
9052 (char **)&aDest,
9053 &outLeft) == (size_t) -1 ) {
9054
9055
9056 1.1 src/patchsets/xulrunner/1.8.1.19/803_fbsd-3.patch
9057
9058 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/803_fbsd-3.patch?rev=1.1&view=markup
9059 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/803_fbsd-3.patch?rev=1.1&content-type=text/plain
9060
9061 Index: 803_fbsd-3.patch
9062 ===================================================================
9063 --- a/config/rules.mk 2007-07-03 17:39:53 +0100
9064 +++ b/config/rules.mk 2007-07-03 17:41:50 +0100
9065 @@ -462,6 +462,8 @@
9066 endif
9067
9068 ifeq ($(OS_ARCH),FreeBSD)
9069 +DSO_LDOPTS += -Wl,-rpath,'$(mozappdir)'
9070 +OS_LDFLAGS += -Wl,-rpath,'$(mozappdir)'
9071 EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc
9072 endif
9073
9074
9075
9076
9077 1.1 src/patchsets/xulrunner/1.8.1.19/811_fbsd7-1.patch
9078
9079 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/811_fbsd7-1.patch?rev=1.1&view=markup
9080 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/xulrunner/1.8.1.19/811_fbsd7-1.patch?rev=1.1&content-type=text/plain
9081
9082 Index: 811_fbsd7-1.patch
9083 ===================================================================
9084 --- mozilla/security/coreconf/FreeBSD.mk.old 2009-01-25 14:34:25 +0000
9085 +++ mozilla/security/coreconf/FreeBSD.mk 2009-01-25 14:34:42 +0000
9086 @@ -65,7 +65,7 @@
9087
9088 ARCH = freebsd
9089
9090 -MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo aout)
9091 +MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo elf)
9092
9093 ifeq ($(MOZ_OBJFORMAT),elf)
9094 DLL_SUFFIX = so
9095 --- mozilla/nsprpub/configure.in.old 2009-01-25 14:34:52 +0000
9096 +++ mozilla/nsprpub/configure.in 2009-01-25 14:35:04 +0000
9097 @@ -1137,7 +1137,7 @@
9098 AC_DEFINE(HAVE_BSD_FLOCK)
9099 AC_DEFINE(HAVE_SOCKLEN_T)
9100 CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
9101 - MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
9102 + MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
9103 if test "$MOZ_OBJFORMAT" = "elf"; then
9104 DLL_SUFFIX=so
9105 else
9106 --- mozilla/directory/c-sdk/config/FreeBSD.mk.old 2009-01-25 14:35:25 +0000
9107 +++ mozilla/directory/c-sdk/config/FreeBSD.mk 2009-01-25 14:35:41 +0000
9108 @@ -70,7 +70,7 @@
9109
9110 ARCH = freebsd
9111
9112 -MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo aout)
9113 +MOZ_OBJFORMAT := $(shell test -x /usr/bin/objformat && /usr/bin/objformat || echo elf)
9114
9115 ifeq ($(MOZ_OBJFORMAT),elf)
9116 DLL_SUFFIX = so
9117 --- mozilla/directory/c-sdk/configure.in.old 2009-01-25 14:35:16 +0000
9118 +++ mozilla/directory/c-sdk/configure.in 2009-01-25 14:35:34 +0000
9119 @@ -1037,7 +1037,7 @@
9120 AC_DEFINE(FREEBSD)
9121 AC_DEFINE(HAVE_BSD_FLOCK)
9122 CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
9123 - MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
9124 + MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf`
9125 if test "$MOZ_OBJFORMAT" = "elf"; then
9126 DLL_SUFFIX=so
9127 else
9128 --- mozilla/configure.in.old 2009-01-25 13:53:32 +0000
9129 +++ mozilla/configure.in 2009-01-25 13:53:39 +0000
9130 @@ -1556,7 +1556,7 @@
9131 ;;
9132
9133 *-freebsd*)
9134 - if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` != "elf"; then
9135 + if test `test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` != "elf"; then
9136 DLL_SUFFIX=".so.1.0"
9137 DSO_LDOPTS="-shared"
9138 fi