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