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