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