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