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/seamonkey/1.1.5: 000_flex-configure-LANG.patch 001_firefox-1.0-prdtoa.patch 002_seamonkey-disable-visibility.patch 003_firefox-arm.patch 004_mozilla-hppa.patch 005_mozilla-firefox-1.1a2-ia64.patch 007_seamonkey-1.0.1-dumpstack.patch 008_seamonkey-gentoo-pkgconfig.patch 020_firefox-0.7.3-default-plugin-less-annoying.patch 021_seamonkey-1.1-include-cairo-libs.patch 030_pango-cairo-1.patch 031_firefox-1.1-uriloader-1.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 063_mozilla-rpath-3.patch 064_mozilla-1.7.10-nsplugins-v2.patch 101_thunderbird-0.7.3-gnome-uriloader.patch 220_seamonkey-gentoo-homepage.patch 225_mozilla-nspr-packages.patch 301_mozilla-1.7.3-gnome-vfs-default-app.patch 303_mozilla-1.7.13-as-needed.patch 304_mozilla-1.7.5-g-application-name.patch
Date: Sat, 20 Oct 2007 15:09:58
Message-Id: E1IjFnD-00083k-W1@stork.gentoo.org
1 armin76 07/10/20 14:59:11
2
3 Added: 000_flex-configure-LANG.patch
4 001_firefox-1.0-prdtoa.patch
5 002_seamonkey-disable-visibility.patch
6 003_firefox-arm.patch 004_mozilla-hppa.patch
7 005_mozilla-firefox-1.1a2-ia64.patch
8 007_seamonkey-1.0.1-dumpstack.patch
9 008_seamonkey-gentoo-pkgconfig.patch
10 020_firefox-0.7.3-default-plugin-less-annoying.patch
11 021_seamonkey-1.1-include-cairo-libs.patch
12 030_pango-cairo-1.patch
13 031_firefox-1.1-uriloader-1.patch
14 032_firefox-2.0_ppc64-1.patch
15 033_firefox-2.0_ppc_powerpc.patch
16 050_respect-host-variable.patch
17 055_firefox-2.0_gfbsd-pthreads.patch
18 063_mozilla-rpath-3.patch
19 064_mozilla-1.7.10-nsplugins-v2.patch
20 101_thunderbird-0.7.3-gnome-uriloader.patch
21 220_seamonkey-gentoo-homepage.patch
22 225_mozilla-nspr-packages.patch
23 301_mozilla-1.7.3-gnome-vfs-default-app.patch
24 303_mozilla-1.7.13-as-needed.patch
25 304_mozilla-1.7.5-g-application-name.patch
26 Log:
27 Add patches for 1.1.5
28
29 Revision Changes Path
30 1.1 src/patchsets/seamonkey/1.1.5/000_flex-configure-LANG.patch
31
32 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/000_flex-configure-LANG.patch?rev=1.1&view=markup
33 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/000_flex-configure-LANG.patch?rev=1.1&content-type=text/plain
34
35 Index: 000_flex-configure-LANG.patch
36 ===================================================================
37 The LANG vars aren't reset early enough so when sed tries to use [a-zA-Z] in
38 option parsing, it may break.
39
40 http://bugs.gentoo.org/103483
41
42 --- configure
43 +++ configure
44 @@ -54,6 +54,16 @@
45 infodir='${prefix}/info'
46 mandir='${prefix}/man'
47
48 +# NLS nuisances.
49 +# Only set these to C if already set. These must not be set unconditionally
50 +# because not all systems understand e.g. LANG=C (notably SCO).
51 +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
52 +# Non-C LC_CTYPE values break the ctype check.
53 +if test "${LANG+set}" = set; then LANG=C; export LANG; fi
54 +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
55 +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
56 +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
57 +
58 # Initialize some other variables.
59 subdirs=
60 MFLAGS= MAKEFLAGS=
61 @@ -452,16 +463,6 @@
62 esac
63 done
64
65 -# NLS nuisances.
66 -# Only set these to C if already set. These must not be set unconditionally
67 -# because not all systems understand e.g. LANG=C (notably SCO).
68 -# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
69 -# Non-C LC_CTYPE values break the ctype check.
70 -if test "${LANG+set}" = set; then LANG=C; export LANG; fi
71 -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
72 -if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
73 -if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
74 -
75 # confdefs.h avoids OS command line length limits that DEFS can exceed.
76 rm -rf conftest* confdefs.h
77 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
78
79
80
81 1.1 src/patchsets/seamonkey/1.1.5/001_firefox-1.0-prdtoa.patch
82
83 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/001_firefox-1.0-prdtoa.patch?rev=1.1&view=markup
84 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/001_firefox-1.0-prdtoa.patch?rev=1.1&content-type=text/plain
85
86 Index: 001_firefox-1.0-prdtoa.patch
87 ===================================================================
88 Index: nsprpub/pr/src/misc/Makefile.in
89 ===================================================================
90 RCS file: /cvsroot/mozilla/nsprpub/pr/src/misc/Makefile.in,v
91 retrieving revision 1.15.2.2
92 diff -u -r1.15.2.2 Makefile.in
93 --- nsprpub/pr/src/misc/Makefile.in 6 Jun 2003 03:09:17 -0000 1.15.2.2
94 +++ nsprpub/pr/src/misc/Makefile.in 19 Nov 2004 00:58:35 -0000
95 @@ -82,6 +82,15 @@
96
97 include $(topsrcdir)/config/rules.mk
98
99 +ifneq (,$(filter Linuxs390 Linuxs390x,$(OS_ARCH)$(OS_TEST)))
100 +
101 +NONOPT_CFLAGS=$(filter-out -O%, $(CFLAGS))
102 +
103 +$(OBJDIR)/prdtoa.$(OBJ_SUFFIX): prdtoa.c
104 + @$(MAKE_OBJDIR)
105 + $(CC) -o $@ -c $(NONOPT_CFLAGS) -ffloat-store $<
106 +endif
107 +
108 # Prevent floating point errors caused by MSVC 6.0 Processor Pack
109 # optimizations (bug 207421). This disables optimizations that
110 # could change the precision of floating-point calculations for
111
112
113
114 1.1 src/patchsets/seamonkey/1.1.5/002_seamonkey-disable-visibility.patch
115
116 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/002_seamonkey-disable-visibility.patch?rev=1.1&view=markup
117 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/002_seamonkey-disable-visibility.patch?rev=1.1&content-type=text/plain
118
119 Index: 002_seamonkey-disable-visibility.patch
120 ===================================================================
121 Index: mozilla/configure.in
122 ===================================================================
123 RCS file: /cvsroot/mozilla/configure.in,v
124 retrieving revision 1.1503.2.15.2.3
125 diff -u -r1.1503.2.15.2.3 configure.in
126 --- mozilla/configure.in 10 Jan 2006 03:11:42 -0000 1.1503.2.15.2.3
127 +++ mozilla/configure.in 21 Jan 2006 09:00:24 -0000
128 @@ -2383,7 +2383,7 @@
129 dnl Check for .hidden assembler directive and visibility attribute.
130 dnl Borrowed from glibc configure.in
131 dnl ===============================================================
132 -if test "$GNU_CC"; then
133 +if /bin/false; then
134 AC_CACHE_CHECK(for visibility(hidden) attribute,
135 ac_cv_visibility_hidden,
136 [cat > conftest.c <<EOF
137
138
139
140 1.1 src/patchsets/seamonkey/1.1.5/003_firefox-arm.patch
141
142 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/003_firefox-arm.patch?rev=1.1&view=markup
143 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/003_firefox-arm.patch?rev=1.1&content-type=text/plain
144
145 Index: 003_firefox-arm.patch
146 ===================================================================
147 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=336183
148
149 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2006-05-17 02:02:51.000000000 -0400
150 +++ mozilla-16052006/xpcom/reflect/xptcall/src/md/unix/xptcstubs_arm.cpp 2006-05-17 01:17:16.000000000 -0400
151 @@ -39,18 +39,31 @@
152 /* Implement shared vtbl methods. */
153
154 #include "xptcprivate.h"
155
156 #if !defined(LINUX) || !defined(__arm__)
157 #error "This code is for Linux ARM only. Please check if it works for you, too.\nDepends strongly on gcc behaviour."
158 #endif
159
160 +#if (__GNUC__ > 3) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 4))
161 +/* This tells gcc3.4+ not to optimize away symbols.
162 + * @see http://gcc.gnu.org/gcc-3.4/changes.html
163 + */
164 +#define DONT_DROP_OR_WARN __attribute__((used))
165 +#else
166 +/* This tells older gccs not to warn about unused vairables.
167 + * @see http://docs.freebsd.org/info/gcc/gcc.info.Variable_Attributes.html
168 + */
169 +#define DONT_DROP_OR_WARN __attribute__((unused))
170 +#endif
171 +
172 /* Specify explicitly a symbol for this function, don't try to guess the c++ mangled symbol. */
173 -static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch");
174 +static nsresult PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args) asm("_PrepareAndDispatch")
175 +DONT_DROP_OR_WARN;
176
177 static nsresult
178 PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint32* args)
179 {
180 #define PARAM_BUFFER_COUNT 16
181
182 nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
183 nsXPTCMiniVariant* dispatchParams = NULL;
184
185
186
187 1.1 src/patchsets/seamonkey/1.1.5/004_mozilla-hppa.patch
188
189 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/004_mozilla-hppa.patch?rev=1.1&view=markup
190 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/004_mozilla-hppa.patch?rev=1.1&content-type=text/plain
191
192 Index: 004_mozilla-hppa.patch
193 ===================================================================
194 diff -uNr mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in
195 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2004-12-21 13:37:00.503842544 +0000
196 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2004-12-21 13:41:49.439917584 +0000
197 @@ -167,6 +167,19 @@
198 endif
199 endif
200
201 +#
202 +# Linux/HPPA/gcc
203 +#
204 +ifeq ($(OS_ARCH),Linux)
205 +ifneq (,$(filter parisc parisc64,$(OS_TEST)))
206 +#ifeq ($(CC),gcc) # Do not check for gcc since there is only this compiler on linux for hppa
207 +CPPSRCS := xptcinvoke_pa32.cpp xptcstubs_pa32.cpp
208 +ASFILES := xptcstubs_asm_parisc_linux.s xptcinvoke_asm_parisc_linux.s
209 +#endif
210 +endif
211 +endif
212 +
213 +
214 ######################################################################
215 # M68k
216 ######################################################################
217 diff -uNr mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s
218 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s 1970-01-01 00:00:00.000000000 +0000
219 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_parisc_linux.s 2004-12-21 13:39:03.390160984 +0000
220 @@ -0,0 +1,128 @@
221 +
222 + .LEVEL 1.1
223 + .text
224 + .align 4
225 +
226 +framesz:
227 + .equ 128
228 +
229 +; XPTC_InvokeByIndex(nsISuppots* that, PRUint32 methodIndex,
230 +; PRUint32 paramCount, nsXPTCVariant* params);
231 +
232 +.globl XPTC_InvokeByIndex
233 + .type XPTC_InvokeByIndex, @function
234 +
235 +
236 +XPTC_InvokeByIndex:
237 + .PROC
238 + .CALLINFO FRAME=72, CALLER,SAVE_RP, SAVE_SP, ENTRY_GR=3
239 + .ENTRY
240 +
241 + ; frame marker takes 48 bytes,
242 + ; register spill area takes 8 bytes,
243 + ; local stack area takes 72 bytes result in 128 bytes total
244 +
245 + STW %rp,-20(%sp)
246 + STW,MA %r3,128(%sp)
247 +
248 + LDO -framesz(%r30),%r28
249 + STW %r28,-4(%r30) ; save previous sp
250 + STW %r19,-32(%r30)
251 +
252 + STW %r26,-36-framesz(%r30) ; save argument registers in
253 + STW %r25,-40-framesz(%r30) ; in PREVIOUS frame
254 + STW %r24,-44-framesz(%r30) ;
255 + STW %r23,-48-framesz(%r30) ;
256 +
257 +; B,L .+8,%r2
258 +; ADDIL L'invoke_count_bytes-$PIC_pcrel$1+4,%r2,%r1
259 +; ; LDO R'invoke_count_bytes-$PIC_pcrel$2+8(%r1),%r1
260 +;$PIC_pcrel$1
261 +; LDSID (%r1),%r31
262 +;$PIC_pcrel$2
263 +; MTSP %r31,%sr0
264 +
265 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26;out=28
266 + BL invoke_count_bytes,%r31
267 + COPY %r31,%r2
268 +
269 + CMPIB,>= 0,%r28, .+76
270 + COPY %r30,%r3 ; copy stack ptr to saved stack ptr
271 + ADD %r30,%r28,%r30 ; extend stack frame
272 + LDW -4(%r3),%r28 ; move frame
273 + STW %r28,-4(%r30)
274 + LDW -8(%r3),%r28
275 + STW %r28,-8(%r30)
276 + LDW -12(%r3),%r28
277 + STW %r28,-12(%r30)
278 + LDW -16(%r3),%r28
279 + STW %r28,-16(%r30)
280 + LDW -20(%r3),%r28
281 + STW %r28,-20(%r30)
282 + LDW -24(%r3),%r28
283 + STW %r28,-24(%r30)
284 + LDW -28(%r3),%r28
285 + STW %r28,-28(%r30)
286 + LDW -32(%r3),%r28
287 + STW %r28,-32(%r30)
288 +
289 + LDO -40(%r30),%r26 ; load copy address
290 + LDW -44-framesz(%r3),%r25 ; load rest of 2 arguments
291 + LDW -48-framesz(%r3),%r24 ;
292 +
293 + LDW -32(%r30),%r19 ; shared lib call destroys r19; reload
294 +; B,L .+8,%r2
295 +; ADDIL L'invoke_copy_to_stack-$PIC_pcrel$3+4,%r2,%r1
296 +; LDO R'invoke_copy_to_stack-$PIC_pcrel$4+8(%r1),%r1
297 +;$PIC_pcrel$3
298 +; LDSID (%r1),%r31
299 +;$PIC_pcrel$4
300 +; MTSP %r31,%sr0
301 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR ;in=24,25,26
302 + BL invoke_copy_to_stack,%r31
303 + COPY %r31,%r2
304 +
305 + LDO -48(%r30),%r20
306 + EXTRW,U,= %r28,31,1,%r22
307 + FLDD 0(%r20),%fr7 ; load double arg 1
308 + EXTRW,U,= %r28,30,1,%r22
309 + FLDW 8(%r20),%fr5L ; load float arg 1
310 + EXTRW,U,= %r28,29,1,%r22
311 + FLDW 4(%r20),%fr6L ; load float arg 2
312 + EXTRW,U,= %r28,28,1,%r22
313 + FLDW 0(%r20),%fr7L ; load float arg 3
314 +
315 + LDW -36-framesz(%r3),%r26 ; load ptr to 'that'
316 + LDW -40(%r30),%r25 ; load the rest of dispatch argument registers
317 + LDW -44(%r30),%r24
318 + LDW -48(%r30),%r23
319 +
320 + LDW -36-framesz(%r3),%r20 ; load vtable addr
321 + LDW -40-framesz(%r3),%r28 ; load index
322 + LDW 0(%r20),%r20 ; follow vtable
323 +; LDO 0(%r20),%r20 ; offset vtable by 16 bytes (g++: 8, aCC: 16)
324 + SH2ADDL %r28,%r20,%r28 ; add 4*index to vtable entry
325 + LDW 0(%r28),%r22 ; load vtable entry
326 +
327 +; B,L .+8,%r2
328 +; ADDIL L'$$dyncall_external-$PIC_pcrel$5+4,%r2,%r1
329 +; LDO R'$$dyncall_external-$PIC_pcrel$6+8(%r1),%r1
330 +;$PIC_pcrel$5
331 +; LDSID (%r1),%r31
332 +;$PIC_pcrel$6
333 +; MTSP %r31,%sr0
334 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=22-26;out=28;
335 + BL $$dyncall,%r31
336 + COPY %r31,%r2
337 +
338 + LDW -32(%r30),%r19
339 + COPY %r3,%r30 ; restore saved stack ptr
340 +
341 + LDW -148(%sp),%rp
342 + LDWM -128(%sp),%r3
343 + BV,N (%rp)
344 + NOP
345 + .EXIT
346 + .PROCEND ;in=23,24,25,26;
347 + .SIZE XPTC_InvokeByIndex, .-XPTC_InvokeByIndex
348 +
349 diff -uNr mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s
350 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s 1970-01-01 00:00:00.000000000 +0000
351 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_parisc_linux.s 2004-12-21 13:39:03.392160680 +0000
352 @@ -0,0 +1,73 @@
353 + .LEVEL 1.1
354 + .TEXT
355 + .ALIGN 4
356 +
357 +curframesz:
358 + .EQU 128
359 +
360 +
361 +; SharedStub has stack size of 128 bytes
362 +
363 +lastframesz:
364 + .EQU 64
365 +
366 +; the StubN C++ function has a small stack size of 64 bytes
367 +
368 +
369 +.globl SharedStub
370 + .type SharedStub, @function
371 +
372 +SharedStub:
373 + .PROC
374 + .CALLINFO CALLER,FRAME=80,SAVE_RP
375 +
376 + .ENTRY
377 + STW %rp,-20(%sp)
378 + LDO 128(%sp),%sp
379 +
380 + STW %r19,-32(%r30)
381 + STW %r26,-36-curframesz(%r30) ; save arg0 in previous frame
382 +
383 + LDO -80(%r30),%r28
384 + FSTD,MA %fr5,8(%r28) ; save darg0
385 + FSTD,MA %fr7,8(%r28) ; save darg1
386 + FSTW,MA %fr4L,4(%r28) ; save farg0
387 + FSTW,MA %fr5L,4(%r28) ; save farg1
388 + FSTW,MA %fr6L,4(%r28) ; save farg2
389 + FSTW,MA %fr7L,4(%r28) ; save farg3
390 +
391 + ; Former value of register 26 is already properly saved by StubN,
392 + ; but register 25-23 are not because of the arguments mismatch
393 + STW %r25,-40-curframesz-lastframesz(%r30) ; save r25
394 + STW %r24,-44-curframesz-lastframesz(%r30) ; save r24
395 + STW %r23,-48-curframesz-lastframesz(%r30) ; save r23
396 + COPY %r26,%r25 ; method index is arg1
397 + LDW -36-curframesz-lastframesz(%r30),%r26 ; self is arg0
398 + LDO -40-curframesz-lastframesz(%r30),%r24 ; normal args is arg2
399 + LDO -80(%r30),%r23 ; floating args is arg3
400 +
401 +; BL .+8,%r2
402 +; ADDIL L'PrepareAndDispatch-$PIC_pcrel$0+4,%r2
403 +; LDO R'PrepareAndDispatch-$PIC_pcrel$1+8(%r1),%r1
404 +;$PIC_pcrel$0
405 +; LDSID (%r1),%r31
406 +;$PIC_pcrel$1
407 +; MTSP %r31,%sr0
408 + .CALL ARGW0=GR,ARGW1=GR,ARGW2=GR,ARGW3=GR,RTNVAL=GR ;in=23-26;out=28;
409 + BL PrepareAndDispatch, %r31
410 + COPY %r31,%r2
411 +
412 + LDW -32(%r30),%r19
413 +
414 + LDW -148(%sp),%rp
415 + LDO -128(%sp),%sp
416 +
417 +
418 + BV,N (%rp)
419 + NOP
420 + NOP
421 +
422 + .EXIT
423 + .PROCEND ;in=26;out=28;
424 +
425 + .SIZE SharedStub, .-SharedStub
426
427
428
429 1.1 src/patchsets/seamonkey/1.1.5/005_mozilla-firefox-1.1a2-ia64.patch
430
431 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/005_mozilla-firefox-1.1a2-ia64.patch?rev=1.1&view=markup
432 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/005_mozilla-firefox-1.1a2-ia64.patch?rev=1.1&content-type=text/plain
433
434 Index: 005_mozilla-firefox-1.1a2-ia64.patch
435 ===================================================================
436 --- mozilla.orig/extensions/transformiix/source/base/Double.cpp
437 +++ mozilla/extensions/transformiix/source/base/Double.cpp
438 @@ -75,14 +75,7 @@
439 #define CPU_IS_ARM
440 #endif
441
442 -#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
443 -/**
444 - * This version of the macros is safe for the alias optimizations
445 - * that gcc does, but uses gcc-specific extensions.
446 - */
447 -
448 typedef union txdpun {
449 - PRFloat64 d;
450 struct {
451 #if defined(IS_LITTLE_ENDIAN) && !defined(CPU_IS_ARM)
452 PRUint32 lo, hi;
453 @@ -90,8 +83,14 @@
454 PRUint32 hi, lo;
455 #endif
456 } s;
457 + PRFloat64 d;
458 } txdpun;
459
460 +#if (__GNUC__ == 2 && __GNUC_MINOR__ > 95) || __GNUC__ > 2
461 +/**
462 + * This version of the macros is safe for the alias optimizations
463 + * that gcc does, but uses gcc-specific extensions.
464 + */
465 #define TX_DOUBLE_HI32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.hi; }))
466 #define TX_DOUBLE_LO32(x) (__extension__ ({ txdpun u; u.d = (x); u.s.lo; }))
467
468 @@ -117,20 +116,20 @@
469
470 //-- Initialize Double related constants
471 #ifdef IS_BIG_ENDIAN
472 -const PRUint32 nanMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK,
473 - 0xffffffff};
474 -const PRUint32 infMask[2] = {TX_DOUBLE_HI32_EXPMASK, 0};
475 -const PRUint32 negInfMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0};
476 +const txdpun nanMask = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK,
477 + 0xffffffff};
478 +const txdpun infMask = {TX_DOUBLE_HI32_EXPMASK, 0};
479 +const txdpun negInfMask = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0};
480 #else
481 -const PRUint32 nanMask[2] = {0xffffffff,
482 - TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK};
483 -const PRUint32 infMask[2] = {0, TX_DOUBLE_HI32_EXPMASK};
484 -const PRUint32 negInfMask[2] = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT};
485 +const txdpun nanMask = {0xffffffff,
486 + TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK};
487 +const txdpun infMask = {0, TX_DOUBLE_HI32_EXPMASK};
488 +const txdpun negInfMask = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT};
489 #endif
490
491 -const double Double::NaN = *((double*)nanMask);
492 -const double Double::POSITIVE_INFINITY = *((double*)infMask);
493 -const double Double::NEGATIVE_INFINITY = *((double*)negInfMask);
494 +const double Double::NaN = nanMask.d;
495 +const double Double::POSITIVE_INFINITY = infMask.d;
496 +const double Double::NEGATIVE_INFINITY = negInfMask.d;
497
498 /*
499 * Determines whether the given double represents positive or negative
500
501
502
503 1.1 src/patchsets/seamonkey/1.1.5/007_seamonkey-1.0.1-dumpstack.patch
504
505 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/007_seamonkey-1.0.1-dumpstack.patch?rev=1.1&view=markup
506 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/007_seamonkey-1.0.1-dumpstack.patch?rev=1.1&content-type=text/plain
507
508 Index: 007_seamonkey-1.0.1-dumpstack.patch
509 ===================================================================
510 --- mozilla/xpcom/base/nsStackFrameUnix.cpp.prestackdisable 2006-04-14 02:30:15.000000000 +0200
511 +++ mozilla/xpcom/base/nsStackFrameUnix.cpp 2006-04-14 02:31:02.000000000 +0200
512 @@ -88,6 +88,9 @@
513
514 void DumpStackToFile(FILE* aStream)
515 {
516 + fprintf(aStream, "Stacktrace disabled for now.\n"
517 + "See https://bugzilla.mozilla.org/show_bug.cgi?id=323853\n");
518 +#if 0
519 // Stack walking code courtesy Kipp's "leaky".
520
521 // Get the frame pointer
522 @@ -128,6 +131,7 @@
523 symbol, off, info.dli_fname, foff);
524 }
525 }
526 +#endif
527 }
528
529 #elif defined(__sun) && (defined(__sparc) || defined(sparc) || defined(__i386) || defined(i386))
530
531
532
533 1.1 src/patchsets/seamonkey/1.1.5/008_seamonkey-gentoo-pkgconfig.patch
534
535 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/008_seamonkey-gentoo-pkgconfig.patch?rev=1.1&view=markup
536 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/008_seamonkey-gentoo-pkgconfig.patch?rev=1.1&content-type=text/plain
537
538 Index: 008_seamonkey-gentoo-pkgconfig.patch
539 ===================================================================
540 --- mozilla/config/autoconf.mk.in 2005-08-17 19:17:17.000000000 +0200
541 +++ mozilla/config/autoconf.mk.in 2005-11-17 14:23:11.000000000 +0100
542 @@ -54,13 +54,13 @@
543 prefix = @prefix@
544 exec_prefix = @exec_prefix@
545 bindir = @bindir@
546 -includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
547 +includedir = $(mozappdir)/include
548 libdir = @libdir@
549 datadir = @datadir@
550 mandir = @mandir@
551 -idldir = @datadir@/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
552 +idldir = $(mozappdir)/idl
553
554 -mozappdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
555 +mozappdir = $(libdir)/$(MOZ_APP_NAME)
556 mredir = $(libdir)/mre/mre-$(MOZ_APP_VERSION)
557 mrelibdir = $(mredir)/lib
558
559 --- mozilla/build/unix/Makefile.in 2005-07-07 20:24:39.000000000 +0200
560 +++ mozilla/build/unix/Makefile.in 2005-11-17 21:41:47.000000000 +0100
561 @@ -61,6 +61,19 @@
562 NSPR_VERSION=$(shell $(DEPTH)/nsprpub/config/nspr-config --version)
563 endif
564
565 +# Hack to make sure that mozilla-nss.pc has the proper nss dependencies
566 +ifdef MOZ_NATIVE_NSS
567 +FULL_NSS_CFLAGS=$(shell $(NSS_CONFIG) --cflags)
568 +FULL_NSS_LIBS=$(shell $(NSS_CONFIG) --libs)
569 +NSS_NAME=nss
570 +NSS_VERSION=$(shell $(NSS_CONFIG) --version)
571 +else
572 +FULL_NSS_CFLAGS=-I$(includedir)/nss
573 +FULL_NSS_LIBS=-L$(mozappdir)/nss -lnss3 -lsmime3 -lssl3 -lsoftokn3
574 +NSS_NAME=$(MOZ_APP_NAME)-nss
575 +NSS_VERSION=$(MOZ_APP_VERSION)
576 +endif
577 +
578 ifdef MOZ_ENABLE_GTK
579 SUPERWIN_LIBS=-lgtksuperwin
580 endif
581 @@ -82,7 +82,8 @@
582 -e "s|%MOZILLA_VERSION%|$(MOZ_APP_VERSION)|" \
583 -e "s|%DEFS%|$(_DEFS)|" \
584 -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
585 - -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" > $@
586 + -e 's|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|' \
587 + -e 's|\(echo -L.*\)\($$\)|\1 -Wl,-R$(mozappdir)\2|' > $@
588
589 $(MOZ_APP_NAME)-%.pc : mozilla-%.pc.in Makefile.in Makefile $(DEPTH)/config/autoconf.mk
590 cat $< | sed \
591 @@ -99,7 +112,12 @@
592 -e "s|%FULL_NSPR_LIBS%|$(FULL_NSPR_LIBS)|" \
593 -e "s|%FULL_NSPR_CFLAGS%|$(FULL_NSPR_CFLAGS)|" \
594 -e "s|%NSPR_NAME%|$(NSPR_NAME)|" \
595 - -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" > $@
596 + -e "s|%NSPR_VERSION%|$(NSPR_VERSION)|" \
597 + -e "s|%FULL_NSS_LIBS%|$(FULL_NSS_LIBS)|" \
598 + -e "s|%FULL_NSS_CFLAGS%|$(FULL_NSS_CFLAGS)|" \
599 + -e "s|%NSS_NAME%|$(NSS_NAME)|" \
600 + -e "s|%NSS_VERSION%|$(NSS_VERSION)|" \
601 + -e "s|\(^Libs: -L.*\)|\1 -Wl,-R\$$\{libdir}|" > $@
602
603 libs:: $(MOZ_APP_NAME)-config
604 chmod 755 $<
605 --- mozilla/build/unix/mozilla-js.pc.in.orig 2005-07-05 23:21:52.000000000 +0000
606 +++ mozilla/build/unix/mozilla-js.pc.in 2006-01-15 10:03:00.000000000 +0000
607 @@ -6,6 +6,6 @@
608 Name: JavaScript
609 Description: The Mozilla JavaScript Library
610 Version: %MOZILLA_VERSION%
611 -Requires: %NSPR_NAME% >= %NSPR_VERSION%
612 +Requires: %MOZ_APP_NAME%-%NSPR_NAME% >= %NSPR_VERSION%
613 Libs: -L${libdir} -lmozjs
614 Cflags: -I${includedir}/js -DXP_UNIX
615 --- mozilla/build/unix/mozilla-nspr.pc.in.orig 2005-07-05 23:21:52.000000000 +0000
616 +++ mozilla/build/unix/mozilla-nspr.pc.in 2006-01-15 10:01:16.000000000 +0000
617 @@ -1,12 +1,5 @@
618 -prefix=%prefix%
619 -exec_prefix=%exec_prefix%
620 -libdir=%libdir%
621 -includedir=%includedir%
622 -
623 Name: NSPR
624 Description: The Netscape Portable Runtime
625 Version: %NSPR_VERSION%
626 -Libs: %FULL_NSPR_LIBS%
627 -Cflags: %FULL_NSPR_CFLAGS%
628 -
629 +Requires: %NSPR_NAME% >= %NSPR_VERSION%
630
631 --- mozilla/build/unix/mozilla-xpcom.pc.in.orig 2005-07-05 23:21:52.000000000 +0000
632 +++ mozilla/build/unix/mozilla-xpcom.pc.in 2006-01-15 10:02:34.000000000 +0000
633 @@ -7,6 +7,6 @@
634 Name: XPCOM
635 Description: The Mozilla Cross Platform Component Library
636 Version: %MOZILLA_VERSION%
637 -Requires: %NSPR_NAME% >= %NSPR_VERSION%
638 +Requires: %MOZ_APP_NAME%-%NSPR_NAME% >= %NSPR_VERSION%
639 Libs: -L${libdir} -lxpcom
640 Cflags: -I${includedir} -I${includedir}/xpcom -I${includedir}/string
641 --- mozilla/build/unix/mozilla-nss.pc.in.orig 2005-07-05 23:21:52.000000000 +0000
642 +++ mozilla/build/unix/mozilla-nss.pc.in 2006-01-15 10:26:13.000000000 +0000
643 @@ -1,11 +1,4 @@
644 -prefix=%prefix%
645 -exec_prefix=%exec_prefix%
646 -libdir=%libdir%
647 -includedir=%includedir%
648 -
649 Name: NSS
650 Description: Mozilla Network Security Services
651 -Version: %MOZILLA_VERSION%
652 -Requires: %NSPR_NAME% >= %NSPR_VERSION%
653 -Libs: -L${libdir} -lnss3 -lsmime3 -lssl3 -lsoftokn3
654 -Cflags: -I${includedir}/nss
655 +Version: %NSS_VERSION%
656 +Requires: %NSS_NAME% >= %NSS_VERSION%
657
658
659
660 1.1 src/patchsets/seamonkey/1.1.5/020_firefox-0.7.3-default-plugin-less-annoying.patch
661
662 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/020_firefox-0.7.3-default-plugin-less-annoying.patch?rev=1.1&view=markup
663 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/020_firefox-0.7.3-default-plugin-less-annoying.patch?rev=1.1&content-type=text/plain
664
665 Index: 020_firefox-0.7.3-default-plugin-less-annoying.patch
666 ===================================================================
667 --- mozilla/modules/plugin/samples/default/unix/npshell.c.foo Tue May 7 14:18:45 2002
668 +++ mozilla/modules/plugin/samples/default/unix/npshell.c Tue May 7 14:49:55 2002
669 @@ -224,7 +224,7 @@
670 This->depth = ws_info->depth;
671 This->colormap = ws_info->colormap;
672 makePixmap(This);
673 - makeWidget(This);
674 + /* makeWidget(This); */
675 }
676 return NPERR_NO_ERROR;
677 }
678 --- mozilla/modules/plugin/samples/default/unix/nullplugin.c.foo Tue May 7 14:18:45 2002
679 +++ mozilla/modules/plugin/samples/default/unix/nullplugin.c Tue May 7 14:48:33 2002
680 @@ -70,6 +70,8 @@
681
682 gtk_object_remove_data(GTK_OBJECT(button), DIALOGID);
683
684 +#if 0
685 +
686 if (This->pluginsFileUrl != NULL)
687 {
688 /* Get the JavaScript command string */
689 @@ -110,6 +112,7 @@
690 NPN_MemFree(url);
691 }
692 }
693 +#endif
694 destroyWidget(This);
695 }
696
697 @@ -265,14 +268,14 @@
698 GTK_DIALOG(dialogWindow)->action_area);
699 gtk_object_set_data(GTK_OBJECT(okButton), DIALOGID, dialogWindow);
700
701 - cancelButton= AddWidget(gtk_button_new_with_label (CANCEL_BUTTON),
702 - GTK_DIALOG(dialogWindow)->action_area);
703 + /* cancelButton= AddWidget(gtk_button_new_with_label (CANCEL_BUTTON),
704 + GTK_DIALOG(dialogWindow)->action_area); */
705
706 gtk_signal_connect (GTK_OBJECT(okButton), "clicked",
707 GTK_SIGNAL_FUNC(DialogOKClicked), This);
708
709 - gtk_signal_connect (GTK_OBJECT(cancelButton), "clicked",
710 - GTK_SIGNAL_FUNC(DialogCancelClicked), This);
711 + /* gtk_signal_connect (GTK_OBJECT(cancelButton), "clicked",
712 + GTK_SIGNAL_FUNC(DialogCancelClicked), This); */
713
714 /* hookup to when the dialog is destroyed */
715 gtk_signal_connect(GTK_OBJECT(dialogWindow), "destroy",
716 --- mozilla/modules/plugin/samples/default/unix/nullplugin.h.foo Tue May 7 14:46:48 2002
717 +++ mozilla/modules/plugin/samples/default/unix/nullplugin.h Tue May 7 14:47:08 2002
718 @@ -53,9 +53,7 @@
719 #define JVM_MINETYPE "application/x-java-vm"
720 #define MESSAGE "\
721 This page contains information of a type (%s) that can\n\
722 -only be viewed with the appropriate Plug-in.\n\
723 -\n\
724 -Click OK to download Plugin."
725 +only be viewed with the appropriate Plug-in."
726
727 #define GET 1
728 #define REFRESH 2
729
730
731
732 1.1 src/patchsets/seamonkey/1.1.5/021_seamonkey-1.1-include-cairo-libs.patch
733
734 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/021_seamonkey-1.1-include-cairo-libs.patch?rev=1.1&view=markup
735 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/021_seamonkey-1.1-include-cairo-libs.patch?rev=1.1&content-type=text/plain
736
737 Index: 021_seamonkey-1.1-include-cairo-libs.patch
738 ===================================================================
739 --- mozilla/configure.in.orig 2007-01-11 19:45:06.000000000 +0100
740 +++ mozilla/configure.in 2007-01-23 21:18:26.905154656 +0100
741 @@ -6730,7 +6730,7 @@
742 else
743 PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION)
744 MOZ_CAIRO_CFLAGS=$CAIRO_CFLAGS
745 - MOZ_CAIRO_LIBS=$CAIRO_LIBS
746 + MOZ_CAIRO_LIBS="$CAIRO_LIBS -lXrender $XLIBS -lfontconfig -lfreetype"
747 fi
748 fi
749
750
751
752
753 1.1 src/patchsets/seamonkey/1.1.5/030_pango-cairo-1.patch
754
755 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/030_pango-cairo-1.patch?rev=1.1&view=markup
756 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/030_pango-cairo-1.patch?rev=1.1&content-type=text/plain
757
758 Index: 030_pango-cairo-1.patch
759 ===================================================================
760 --- config/autoconf.mk.in.old 2007-01-20 21:19:33.000000000 +0100
761 +++ config/autoconf.mk.in 2007-01-20 21:20:16.000000000 +0100
762 @@ -479,6 +479,7 @@
763 MOZ_ENABLE_PANGO = @MOZ_ENABLE_PANGO@
764 MOZ_PANGO_CFLAGS = @MOZ_PANGO_CFLAGS@
765 MOZ_PANGO_LIBS = @MOZ_PANGO_LIBS@
766 +MOZ_PANGOCAIRO = @MOZ_PANGOCAIRO@
767
768 MOZ_EXTRA_X11CONVERTERS = @MOZ_EXTRA_X11CONVERTERS@
769
770 --- gfx/src/gtk/mozilla-decoder.cpp.old 2007-01-20 21:21:30.000000000 +0100
771 +++ gfx/src/gtk/mozilla-decoder.cpp 2007-01-20 21:24:19.000000000 +0100
772 @@ -40,6 +40,11 @@
773 #define PANGO_ENABLE_ENGINE
774
775 #include "mozilla-decoder.h"
776 +#ifdef MOZ_PANGOCAIRO
777 +#include <pango/pangocairo.h>
778 +#else
779 +#include <pango/pangoxft.h>
780 +#endif
781 #include <pango/pangofc-fontmap.h>
782 #include <pango/pangofc-font.h>
783 #include <gdk/gdkpango.h>
784 @@ -213,8 +218,11 @@
785 printf("unknown suffix used for mapping\n");
786 }
787 }
788 -
789 +#ifdef MOZ_PANGOCAIRO
790 + pango_fc_font_map_add_decoder_find_func(PANGO_FC_FONT_MAP(pango_cairo_font_map_get_default()),
791 +#else
792 pango_fc_font_map_add_decoder_find_func(PANGO_FC_FONT_MAP(fontmap),
793 +#endif
794 mozilla_find_decoder,
795 NULL,
796 NULL);
797 --- configure.in.old 2007-01-20 21:25:20.000000000 +0100
798 +++ configure.in 2007-01-20 21:32:21.000000000 +0100
799 @@ -3923,8 +3923,8 @@
800 MOZ_ENABLE_GTK2=1
801 MOZ_ENABLE_XREMOTE=1
802 MOZ_ENABLE_COREXFONTS=${MOZ_ENABLE_COREXFONTS-}
803 - TK_CFLAGS='$(MOZ_GTK2_CFLAGS)'
804 - TK_LIBS='$(MOZ_GTK2_LIBS)'
805 + TK_CFLAGS='$(MOZ_GTK2_CFLAGS) $(MOZ_PANGO_CFLAGS)'
806 + TK_LIBS='$(MOZ_GTK2_LIBS) $(MOD_PANGO_LIBS)'
807 AC_DEFINE(MOZ_WIDGET_GTK2)
808 ;;
809
810 @@ -4581,12 +4581,14 @@
811 then
812 AC_DEFINE(MOZ_ENABLE_XFT)
813 PKG_CHECK_MODULES(MOZ_XFT, xft)
814 - PKG_CHECK_MODULES(_PANGOCHK, pango >= 1.1.0)
815 + PKG_CHECK_MODULES(MOZ_PANGO, pangoxft >= 1.1.0 pangox)
816 fi
817
818 AC_SUBST(MOZ_ENABLE_XFT)
819 AC_SUBST(MOZ_XFT_CFLAGS)
820 AC_SUBST(MOZ_XFT_LIBS)
821 +AC_SUBST(MOZ_PANGO_CFLAGS)
822 +AC_SUBST(MOZ_PANGO_LIBS)
823
824 dnl ========================================================
825 dnl = pango font rendering
826 @@ -4600,8 +4602,17 @@
827 then
828 AC_DEFINE(MOZ_ENABLE_PANGO)
829 PKG_CHECK_MODULES(MOZ_PANGO, pangoxft >= 1.6.0)
830 + PKG_CHECK_MODULES(PANGOCAIRO_CHK, pangocairo >= 1.10.0,
831 + [
832 + MOZ_PANGOCAIRO=1
833 + AC_DEFINE(MOZ_PANGOCAIRO)
834 + MOZ_PANGO_CFLAGS="$PANGOCAIRO_CHK_CFLAGS $MOZ_PANGO_CFLAGS"
835 + MOZ_PANGO_LIBS="$PANGOCAIRO_CHK_LIBS $MOZ_PANGO_LIBS"
836 + ],
837 + [:])
838
839 AC_SUBST(MOZ_ENABLE_PANGO)
840 + AC_SUBST(MOZ_PANGOCAIRO)
841 AC_SUBST(MOZ_PANGO_CFLAGS)
842 AC_SUBST(MOZ_PANGO_LIBS)
843 fi
844
845
846
847 1.1 src/patchsets/seamonkey/1.1.5/031_firefox-1.1-uriloader-1.patch
848
849 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/031_firefox-1.1-uriloader-1.patch?rev=1.1&view=markup
850 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/031_firefox-1.1-uriloader-1.patch?rev=1.1&content-type=text/plain
851
852 Index: 031_firefox-1.1-uriloader-1.patch
853 ===================================================================
854 Index: uriloader/exthandler/Makefile.in
855 ===================================================================
856 RCS file: /cvsroot/mozilla/uriloader/exthandler/Makefile.in,v
857 retrieving revision 1.60
858 diff -d -u -p -r1.60 Makefile.in
859 --- uriloader/exthandler/Makefile.in 2 May 2005 16:30:03 -0000 1.60
860 +++ uriloader/exthandler/Makefile.in 21 Jul 2005 03:07:39 -0000
861 @@ -102,7 +102,7 @@ endif
862 LOCAL_INCLUDES = -I$(srcdir)
863
864 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
865 -OSHELPER += nsGNOMERegistry.cpp
866 +OSHELPER += nsMIMEInfoUnix.cpp nsGNOMERegistry.cpp
867 endif
868
869 ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
870 Index: uriloader/exthandler/unix/nsGNOMERegistry.cpp
871 ===================================================================
872 RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp,v
873 retrieving revision 1.10
874 diff -d -u -p -r1.10 nsGNOMERegistry.cpp
875 --- uriloader/exthandler/unix/nsGNOMERegistry.cpp 16 Oct 2004 13:46:17 -0000 1.10
876 +++ uriloader/exthandler/unix/nsGNOMERegistry.cpp 21 Jul 2005 03:07:40 -0000
877 @@ -42,7 +42,7 @@
878 #include "nsString.h"
879 #include "nsIComponentManager.h"
880 #include "nsILocalFile.h"
881 -#include "nsMIMEInfoImpl.h"
882 +#include "nsMIMEInfoUnix.h"
883 #include "nsAutoPtr.h"
884
885 #include <glib.h>
886 @@ -56,12 +56,12 @@ typedef struct _GConfClient GConfClient;
887 typedef struct _GnomeProgram GnomeProgram;
888 typedef struct _GnomeModuleInfo GnomeModuleInfo;
889
890 -typedef struct {
891 +struct GnomeVFSMimeApplication {
892 char *id;
893 char *name;
894 char *command;
895 /* there is more here, but we don't need it */
896 -} GnomeVFSMimeApplication;
897 +};
898
899 typedef GConfClient * (*_gconf_client_get_default_fn)();
900 typedef gchar * (*_gconf_client_get_string_fn)(GConfClient *,
901 @@ -264,7 +264,7 @@ nsGNOMERegistry::GetAppDescForScheme(con
902 }
903
904
905 -/* static */ already_AddRefed<nsMIMEInfoBase>
906 +/* static */ already_AddRefed<nsMIMEInfoUnix>
907 nsGNOMERegistry::GetFromExtension(const char *aFileExt)
908 {
909 if (!gconfLib)
910 @@ -286,7 +286,7 @@ nsGNOMERegistry::GetFromExtension(const
911 return GetFromType(mimeType);
912 }
913
914 -/* static */ already_AddRefed<nsMIMEInfoBase>
915 +/* static */ already_AddRefed<nsMIMEInfoUnix>
916 nsGNOMERegistry::GetFromType(const char *aMIMEType)
917 {
918 if (!gconfLib)
919 @@ -296,9 +296,11 @@ nsGNOMERegistry::GetFromType(const char
920 if (!handlerApp)
921 return nsnull;
922
923 - nsRefPtr<nsMIMEInfoImpl> mimeInfo = new nsMIMEInfoImpl(aMIMEType);
924 + nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix(aMIMEType);
925 NS_ENSURE_TRUE(mimeInfo, nsnull);
926
927 + mimeInfo->SetDefaultGnomeVFSMimeApplication(handlerApp);
928 +
929 // Get the list of extensions and append then to the mimeInfo.
930 GList *extensions = _gnome_vfs_mime_get_extensions_list(aMIMEType);
931 for (GList *extension = extensions; extension; extension = extension->next)
932 @@ -320,11 +322,21 @@ nsGNOMERegistry::GetFromType(const char
933 return nsnull;
934 }
935
936 - gchar *commandPath = g_find_program_in_path(nativeCommand);
937 + gchar **argv;
938 + gboolean res = g_shell_parse_argv(nativeCommand, NULL, &argv, NULL);
939 + if (!res) {
940 + NS_ERROR("Could not convert helper app command to filesystem encoding");
941 + _gnome_vfs_mime_application_free(handlerApp);
942 + return nsnull;
943 + }
944 +
945 + gchar *commandPath = g_find_program_in_path(argv[0]);
946
947 g_free(nativeCommand);
948 + g_strfreev(argv);
949
950 if (!commandPath) {
951 + NS_WARNING("could not find command in path");
952 _gnome_vfs_mime_application_free(handlerApp);
953 return nsnull;
954 }
955 @@ -342,7 +354,7 @@ nsGNOMERegistry::GetFromType(const char
956
957 _gnome_vfs_mime_application_free(handlerApp);
958
959 - nsMIMEInfoBase* retval;
960 + nsMIMEInfoUnix* retval;
961 NS_ADDREF((retval = mimeInfo));
962 return retval;
963 }
964 Index: uriloader/exthandler/unix/nsGNOMERegistry.h
965 ===================================================================
966 RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.h,v
967 retrieving revision 1.3
968 diff -d -u -p -r1.3 nsGNOMERegistry.h
969 --- uriloader/exthandler/unix/nsGNOMERegistry.h 16 Oct 2004 13:46:17 -0000 1.3
970 +++ uriloader/exthandler/unix/nsGNOMERegistry.h 21 Jul 2005 03:07:40 -0000
971 @@ -35,10 +35,13 @@
972 *
973 * ***** END LICENSE BLOCK ***** */
974
975 +#ifndef nsGNOMERegistry_h__
976 +#define nsGNOMERegistry_h__
977 +
978 #include "nsIURI.h"
979 #include "nsCOMPtr.h"
980
981 -class nsMIMEInfoBase;
982 +class nsMIMEInfoUnix;
983
984 class nsGNOMERegistry
985 {
986 @@ -52,7 +55,9 @@ class nsGNOMERegistry
987 static void GetAppDescForScheme(const nsACString& aScheme,
988 nsAString& aDesc);
989
990 - static already_AddRefed<nsMIMEInfoBase> GetFromExtension(const char *aFileExt);
991 + static already_AddRefed<nsMIMEInfoUnix> GetFromExtension(const char *aFileExt);
992
993 - static already_AddRefed<nsMIMEInfoBase> GetFromType(const char *aMIMEType);
994 + static already_AddRefed<nsMIMEInfoUnix> GetFromType(const char *aMIMEType);
995 };
996 +
997 +#endif // nsGNOMERegistry_h__
998 Index: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
999 ===================================================================
1000 RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
1001 diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
1002 --- /dev/null 1 Jan 1970 00:00:00 -0000
1003 +++ uriloader/exthandler/unix/nsMIMEInfoUnix.cpp 21 Jul 2005 03:07:40 -0000
1004 @@ -0,0 +1,196 @@
1005 +/* ***** BEGIN LICENSE BLOCK *****
1006 + * Version: MPL 1.1
1007 + *
1008 + * The contents of this file are subject to the Mozilla Public License Version
1009 + * 1.1 (the "License"); you may not use this file except in compliance with
1010 + * the License. You may obtain a copy of the License at
1011 + * http://www.mozilla.org/MPL/
1012 + *
1013 + * Software distributed under the License is distributed on an "AS IS" basis,
1014 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1015 + * for the specific language governing rights and limitations under the
1016 + * License.
1017 + *
1018 + * The Original Code is mozilla.org Code.
1019 + *
1020 + * The Initial Developer of the Original Code is
1021 + * Red Hat, Inc.
1022 + * Portions created by the Initial Developer are Copyright (C) 2005
1023 + * the Initial Developer. All Rights Reserved.
1024 + *
1025 + * Contributor(s):
1026 + * Christopher Aillon <caillon@××××××.com> (Original author)
1027 + *
1028 + *
1029 + * ***** END LICENSE BLOCK ***** */
1030 +
1031 +#include "nsMIMEInfoUnix.h"
1032 +#include "prlink.h"
1033 +#include "prmem.h"
1034 +#include <glib.h>
1035 +#include <glib-object.h>
1036 +
1037 +static PRLibrary *gnomeLib;
1038 +static PRLibrary *vfsLib;
1039 +
1040 +typedef struct _GnomeProgram GnomeProgram;
1041 +typedef struct _GnomeModuleInfo GnomeModuleInfo;
1042 +
1043 +typedef enum {
1044 + GNOME_VFS_OK // there's more but we don't care about them.
1045 +} GnomeVFSResult;
1046 +
1047 +typedef GnomeVFSResult (*_gnome_vfs_mime_application_launch_fn)
1048 + (GnomeVFSMimeApplication *app,
1049 + GList *uris);
1050 +typedef void (*_gnome_vfs_mime_application_free_fn)(GnomeVFSMimeApplication *);
1051 +typedef GnomeVFSMimeApplication * (*_gnome_vfs_mime_application_copy_fn)(GnomeVFSMimeApplication *);
1052 +typedef GnomeProgram * (*_gnome_program_init_fn)(const char *, const char *,
1053 + const GnomeModuleInfo *, int,
1054 + char **, const char *, ...);
1055 +typedef const char * (*_gnome_vfs_mime_application_get_name_fn)(GnomeVFSMimeApplication *);
1056 +typedef const GnomeModuleInfo * (*_libgnome_module_info_get_fn)();
1057 +typedef GnomeProgram * (*_gnome_program_get_fn)();
1058 +typedef char * (*_gnome_vfs_make_uri_from_input_fn)(const char *);
1059 +
1060 +#define DECL_FUNC_PTR(func) static _##func##_fn _##func
1061 +
1062 +DECL_FUNC_PTR(gnome_vfs_mime_application_launch);
1063 +DECL_FUNC_PTR(gnome_vfs_mime_application_free);
1064 +DECL_FUNC_PTR(gnome_vfs_mime_application_copy);
1065 +DECL_FUNC_PTR(gnome_vfs_mime_application_get_name);
1066 +DECL_FUNC_PTR(gnome_program_init);
1067 +DECL_FUNC_PTR(gnome_program_get);
1068 +DECL_FUNC_PTR(libgnome_module_info_get);
1069 +DECL_FUNC_PTR(gnome_vfs_make_uri_from_input);
1070 +
1071 +static PRLibrary *
1072 +LoadVersionedLibrary(const char* libName, const char* libVersion)
1073 +{
1074 + char *platformLibName = PR_GetLibraryName(nsnull, libName);
1075 + nsCAutoString versionLibName(platformLibName);
1076 + versionLibName.Append(libVersion);
1077 + PR_Free(platformLibName);
1078 + return PR_LoadLibrary(versionLibName.get());
1079 +}
1080 +
1081 +static void
1082 +Cleanup()
1083 +{
1084 + // Unload all libraries
1085 + if (gnomeLib)
1086 + PR_UnloadLibrary(gnomeLib);
1087 + if (vfsLib)
1088 + PR_UnloadLibrary(vfsLib);
1089 +
1090 + gnomeLib = vfsLib = nsnull;
1091 +}
1092 +
1093 +static void
1094 +InitGnomeVFS()
1095 +{
1096 + static PRBool initialized = PR_FALSE;
1097 +
1098 + if (initialized)
1099 + return;
1100 +
1101 + #define ENSURE_LIB(lib) \
1102 + PR_BEGIN_MACRO \
1103 + if (!lib) { \
1104 + Cleanup(); \
1105 + return; \
1106 + } \
1107 + PR_END_MACRO
1108 +
1109 + #define GET_LIB_FUNCTION(lib, func, failure) \
1110 + PR_BEGIN_MACRO \
1111 + _##func = (_##func##_fn) PR_FindFunctionSymbol(lib##Lib, #func); \
1112 + if (!_##func) { \
1113 + failure; \
1114 + } \
1115 + PR_END_MACRO
1116 +
1117 + // Attempt to open libgnome
1118 + gnomeLib = LoadVersionedLibrary("gnome-2", ".0");
1119 + ENSURE_LIB(gnomeLib);
1120 +
1121 + GET_LIB_FUNCTION(gnome, gnome_program_init, return Cleanup());
1122 + GET_LIB_FUNCTION(gnome, libgnome_module_info_get, return Cleanup());
1123 + GET_LIB_FUNCTION(gnome, gnome_program_get, return Cleanup());
1124 +
1125 + // Attempt to open libgnomevfs
1126 + vfsLib = LoadVersionedLibrary("gnomevfs-2", ".0");
1127 + ENSURE_LIB(vfsLib);
1128 +
1129 + GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_launch, /* do nothing */);
1130 + GET_LIB_FUNCTION(vfs, gnome_vfs_make_uri_from_input, return Cleanup());
1131 + GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_get_name, return Cleanup());
1132 + GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_free, return Cleanup());
1133 + GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_copy, return Cleanup());
1134 +
1135 + // Initialize GNOME, if it's not already initialized. It's not
1136 + // necessary to tell GNOME about our actual command line arguments.
1137 +
1138 + if (!_gnome_program_get()) {
1139 + char *argv[1] = { "gecko" };
1140 + _gnome_program_init("Gecko", "1.0", _libgnome_module_info_get(),
1141 + 1, argv, NULL);
1142 + }
1143 +
1144 + // Note: after GNOME has been initialized, do not ever unload these
1145 + // libraries. They register atexit handlers, so if they are unloaded, we'll
1146 + // crash on exit.
1147 +}
1148 +
1149 +void
1150 +nsMIMEInfoUnix::SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication* app)
1151 +{
1152 + if (_gnome_vfs_mime_application_copy && _gnome_vfs_mime_application_free) {
1153 + mDefaultVFSApplication = _gnome_vfs_mime_application_copy(app);
1154 +
1155 + mPreferredAction = nsIMIMEInfo::useSystemDefault;
1156 +
1157 + const gchar * name = _gnome_vfs_mime_application_get_name(mDefaultVFSApplication);
1158 + if (name)
1159 + mDefaultAppDescription = NS_ConvertUTF8toUCS2(name);
1160 + }
1161 +}
1162 +
1163 +nsMIMEInfoUnix::~nsMIMEInfoUnix()
1164 +{
1165 + if (mDefaultVFSApplication)
1166 + _gnome_vfs_mime_application_free(mDefaultVFSApplication);
1167 +}
1168 +
1169 +nsresult
1170 +nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile* aFile)
1171 +{
1172 + NS_ENSURE_ARG_POINTER(aFile);
1173 +
1174 + InitGnomeVFS();
1175 +
1176 + if (_gnome_vfs_mime_application_launch && mDefaultVFSApplication) {
1177 + nsCAutoString nativePath;
1178 + aFile->GetNativePath(nativePath);
1179 +
1180 + gchar *uri = _gnome_vfs_make_uri_from_input(nativePath.get());
1181 +
1182 + GList *uris = NULL;
1183 + uris = g_list_append(uris, uri);
1184 +
1185 + GnomeVFSResult result = _gnome_vfs_mime_application_launch(mDefaultVFSApplication, uris);
1186 +
1187 + g_free(uri);
1188 + g_list_free(uris);
1189 +
1190 + if (result != GNOME_VFS_OK)
1191 + return NS_ERROR_FAILURE;
1192 +
1193 + return NS_OK;
1194 + }
1195 +
1196 + if (!mDefaultApplication)
1197 + return NS_ERROR_FILE_NOT_FOUND;
1198 +
1199 + return LaunchWithIProcess(mDefaultApplication, aFile);
1200 +}
1201 Index: uriloader/exthandler/unix/nsMIMEInfoUnix.h
1202 ===================================================================
1203 RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.h
1204 diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.h
1205 --- /dev/null 1 Jan 1970 00:00:00 -0000
1206 +++ uriloader/exthandler/unix/nsMIMEInfoUnix.h 21 Jul 2005 03:07:40 -0000
1207 @@ -0,0 +1,50 @@
1208 +/* ***** BEGIN LICENSE BLOCK *****
1209 + * Version: MPL 1.1
1210 + *
1211 + * The contents of this file are subject to the Mozilla Public License Version
1212 + * 1.1 (the "License"); you may not use this file except in compliance with
1213 + * the License. You may obtain a copy of the License at
1214 + * http://www.mozilla.org/MPL/
1215 + *
1216 + * Software distributed under the License is distributed on an "AS IS" basis,
1217 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1218 + * for the specific language governing rights and limitations under the
1219 + * License.
1220 + *
1221 + * The Original Code is mozilla.org Code.
1222 + *
1223 + * The Initial Developer of the Original Code is
1224 + * Red Hat, Inc.
1225 + * Portions created by the Initial Developer are Copyright (C) 2005
1226 + * the Initial Developer. All Rights Reserved.
1227 + *
1228 + * Contributor(s):
1229 + * Christopher Aillon <caillon@××××××.com> (Original author)
1230 + *
1231 + *
1232 + * ***** END LICENSE BLOCK ***** */
1233 +
1234 +#ifndef nsMimeInfoUnix_h__
1235 +#define nsMimeInfoUnix_h__
1236 +
1237 +#include "nsMIMEInfoImpl.h"
1238 +
1239 +struct GnomeVFSMimeApplication;
1240 +
1241 +class nsMIMEInfoUnix : public nsMIMEInfoImpl
1242 +{
1243 +public:
1244 + nsMIMEInfoUnix(const char* aType = "") : nsMIMEInfoImpl(aType), mDefaultVFSApplication(nsnull) {}
1245 + nsMIMEInfoUnix(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) {};
1246 +
1247 + virtual ~nsMIMEInfoUnix();
1248 +
1249 + void SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication *app);
1250 +
1251 +protected:
1252 + virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile* aFile);
1253 +
1254 + GnomeVFSMimeApplication *mDefaultVFSApplication;
1255 +};
1256 +
1257 +#endif // nsMimeInfoUnix_h__
1258 Index: uriloader/exthandler/unix/nsOSHelperAppService.cpp
1259 ===================================================================
1260 RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp,v
1261 retrieving revision 1.58
1262 diff -d -u -p -r1.58 nsOSHelperAppService.cpp
1263 --- uriloader/exthandler/unix/nsOSHelperAppService.cpp 25 Oct 2004 07:46:01 -0000 1.58
1264 +++ uriloader/exthandler/unix/nsOSHelperAppService.cpp 21 Jul 2005 03:07:40 -0000
1265 @@ -44,6 +44,7 @@
1266 #include "nsOSHelperAppService.h"
1267 #ifdef MOZ_WIDGET_GTK2
1268 #include "nsGNOMERegistry.h"
1269 +#include "nsMIMEInfoUnix.h"
1270 #endif
1271 #include "nsISupports.h"
1272 #include "nsString.h"
1273
1274
1275
1276 1.1 src/patchsets/seamonkey/1.1.5/032_firefox-2.0_ppc64-1.patch
1277
1278 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/032_firefox-2.0_ppc64-1.patch?rev=1.1&view=markup
1279 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/032_firefox-2.0_ppc64-1.patch?rev=1.1&content-type=text/plain
1280
1281 Index: 032_firefox-2.0_ppc64-1.patch
1282 ===================================================================
1283 # Upstream https://bugzilla.mozilla.org/show_bug.cgi?id=361415
1284
1285 unchanged:
1286 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-21 17:09:28.000000000 +0000
1287 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2006-11-20 10:13:38.000000000 +0000
1288 @@ -267,6 +267,11 @@
1289 ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
1290 AS := $(CC) -c -x assembler-with-cpp
1291 endif
1292 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc64)
1293 +CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
1294 +ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
1295 +AS := $(CC) -c -x assembler-with-cpp
1296 +endif
1297
1298 #
1299 # NetBSD/PPC
1300 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
1301 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-21 14:01:45.000000000 +0000
1302 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_asm_ppc64_linux.s 2006-11-22 10:43:26.000000000 +0000
1303 @@ -0,0 +1,154 @@
1304 +// -*- Mode: Asm -*-
1305 +//
1306 +// The contents of this file are subject to the Netscape Public
1307 +// License Version 1.1 (the "License"); you may not use this file
1308 +// except in compliance with the License. You may obtain a copy of
1309 +// the License at http://www.mozilla.org/NPL/
1310 +//
1311 +// Software distributed under the License is distributed on an "AS
1312 +// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
1313 +// implied. See the License for the specific language governing
1314 +// rights and limitations under the License.
1315 +//
1316 +// The Original Code is mozilla.org code.
1317 +//
1318 +// The Initial Developer of the Original Code is Netscape
1319 +// Communications Corporation. Portions created by Netscape are
1320 +// Copyright (C) 1999 Netscape Communications Corporation. All
1321 +// Rights Reserved.
1322 +//
1323 +// Contributor(s):
1324 +// dwmw2@×××××××××.org (David Woodhouse)
1325 +// Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
1326 +// beard@××××××××.com (Patrick Beard)
1327 +// waterson@××××××××.com (Chris Waterson)
1328 +//
1329 +
1330 +.set r0,0; .set r1,1; .set r2,2; .set r3,3; .set r4,4
1331 +.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
1332 +.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
1333 +.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
1334 +.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
1335 +.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
1336 +.set r30,30; .set r31,31
1337 +.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
1338 +.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
1339 +.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
1340 +.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
1341 +.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
1342 +.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
1343 +.set f30,30; .set f31,31
1344 +
1345 +
1346 +//
1347 +// XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
1348 +// PRUint32 paramCount, nsXPTCVariant* params)
1349 +//
1350 +
1351 + .section ".toc","aw"
1352 + .section ".text"
1353 + .align 2
1354 + .globl XPTC_InvokeByIndex
1355 + .section ".opd","aw"
1356 + .align 3
1357 +XPTC_InvokeByIndex:
1358 + .quad .XPTC_InvokeByIndex,.TOC.@tocbase
1359 + .previous
1360 + .type XPTC_InvokeByIndex,@function
1361 +.XPTC_InvokeByIndex:
1362 + mflr 0
1363 + std 0,16(r1)
1364 +
1365 + std r29,-24(r1)
1366 + std r30,-16(r1)
1367 + std r31,-8(r1)
1368 +
1369 + mr r29,r3 // Save 'that' in r29
1370 + mr r30,r4 // Save 'methodIndex' in r30
1371 + mr r31,r1 // Save old frame
1372 +
1373 + // Allocate stack frame with space for params. Since at least the
1374 + // first 7 parameters (not including 'that') will be in registers,
1375 + // we don't actually need stack space for those. We must ensure
1376 + // that the stack remains 16-byte aligned.
1377 + //
1378 + // | ..128-byte stack frame.. | | 7 GP | 13 FP | 3 NV |
1379 + // | |(params)........| regs | regs | regs |
1380 + // (r1)...........(+112)....(+128)
1381 + // (-23*8).(-16*8).(-3*8)..(r31)
1382 +
1383 + // +stack frame, -unused stack params, +regs storage, +1 for alignment
1384 + addi r7,r5,((112/8)-7+7+13+3+1)
1385 + rldicr r7,r7,3,59 // multiply by 8 and mask with ~15
1386 + neg r7,r7
1387 + stdux r1,r1,r7
1388 +
1389 +
1390 + // Call invoke_copy_to_stack(PRUint64* gpregs, double* fpregs,
1391 + // PRUint32 paramCount, nsXPTCVariant* s,
1392 + // PRUint64* d))
1393 +
1394 + // r5, r6 are passed through intact (paramCount, params)
1395 + // r7 (d) has to be r1+112 -- where parameters are passed on the stack.
1396 + // r3, r4 are above that, easier to address from r31 than from r1
1397 +
1398 + subi r3,r31,(23*8) // r3 --> GPRS
1399 + subi r4,r31,(16*8) // r4 --> FPRS
1400 + addi r7,r1,112 // r7 --> params
1401 + bl invoke_copy_to_stack
1402 + nop
1403 +
1404 + // Set up to invoke function
1405 +
1406 + ld r9,0(r29) // vtable (r29 is 'that')
1407 + mr r3,r29 // self is first arg, obviously
1408 +
1409 + sldi r30,r30,3 // Find function descriptor
1410 + add r9,r9,r30
1411 + ld r9,0(r9)
1412 +
1413 + ld r0,0(r9) // Actual address from fd.
1414 + std r2,40(r1) // Save r2 (TOC pointer)
1415 +
1416 + mtctr 0
1417 + ld r11,16(r9) // Environment pointer from fd.
1418 + ld r2,8(r9) // TOC pointer from fd.
1419 +
1420 + // Load FP and GP registers as required
1421 + ld r4, -(23*8)(r31)
1422 + ld r5, -(22*8)(r31)
1423 + ld r6, -(21*8)(r31)
1424 + ld r7, -(20*8)(r31)
1425 + ld r8, -(19*8)(r31)
1426 + ld r9, -(18*8)(r31)
1427 + ld r10, -(17*8)(r31)
1428 +
1429 + lfd f1, -(16*8)(r31)
1430 + lfd f2, -(15*8)(r31)
1431 + lfd f3, -(14*8)(r31)
1432 + lfd f4, -(13*8)(r31)
1433 + lfd f5, -(12*8)(r31)
1434 + lfd f6, -(11*8)(r31)
1435 + lfd f7, -(10*8)(r31)
1436 + lfd f8, -(9*8)(r31)
1437 + lfd f9, -(8*8)(r31)
1438 + lfd f10, -(7*8)(r31)
1439 + lfd f11, -(6*8)(r31)
1440 + lfd f12, -(5*8)(r31)
1441 + lfd f13, -(4*8)(r31)
1442 +
1443 + bctrl // Do it
1444 +
1445 + ld r2,40(r1) // Load our own TOC pointer
1446 + ld r1,0(r1) // Revert stack frame
1447 + ld 0,16(r1) // Reload lr
1448 + ld 29,-24(r1) // Restore NVGPRS
1449 + ld 30,-16(r1)
1450 + ld 31,-8(r1)
1451 + mtlr 0
1452 + blr
1453 +
1454 + .size XPTC_InvokeByIndex,.-.XPTC_InvokeByIndex
1455 +
1456 + /* Magic indicating no need for an executable stack */
1457 + .section .note.GNU-stack, "", @progbits ; .previous
1458 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 1970-01-01 01:00:00.000000000 +0100
1459 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_ppc64_linux.cpp 2006-11-21 17:00:06.000000000 +0000
1460 @@ -0,0 +1,127 @@
1461 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
1462 +/* ***** BEGIN LICENSE BLOCK *****
1463 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1464 + *
1465 + * The contents of this file are subject to the Mozilla Public License Version
1466 + * 1.1 (the "License"); you may not use this file except in compliance with
1467 + * the License. You may obtain a copy of the License at
1468 + * http://www.mozilla.org/MPL/
1469 + *
1470 + * Software distributed under the License is distributed on an "AS IS" basis,
1471 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1472 + * for the specific language governing rights and limitations under the
1473 + * License.
1474 + *
1475 + * The Original Code is mozilla.org code.
1476 + *
1477 + * The Initial Developer of the Original Code is
1478 + * Netscape Communications Corporation.
1479 + * Portions created by the Initial Developer are Copyright (C) 1998
1480 + * the Initial Developer. All Rights Reserved.
1481 + *
1482 + * Contributor(s):
1483 + * dwmw2@×××××××××.org (David Woodhouse)
1484 + * Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
1485 + * beard@××××××××.com (Patrick Beard)
1486 + * waterson@××××××××.com (Chris Waterson)
1487 + *
1488 + * Alternatively, the contents of this file may be used under the terms of
1489 + * either of the GNU General Public License Version 2 or later (the "GPL"),
1490 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1491 + * in which case the provisions of the GPL or the LGPL are applicable instead
1492 + * of those above. If you wish to allow use of your version of this file only
1493 + * under the terms of either the GPL or the LGPL, and not to allow others to
1494 + * use your version of this file under the terms of the MPL, indicate your
1495 + * decision by deleting the provisions above and replace them with the notice
1496 + * and other provisions required by the GPL or the LGPL. If you do not delete
1497 + * the provisions above, a recipient may use your version of this file under
1498 + * the terms of any one of the MPL, the GPL or the LGPL.
1499 + *
1500 + * ***** END LICENSE BLOCK ***** */
1501 +
1502 +// Platform specific code to invoke XPCOM methods on native objects
1503 +
1504 +// The purpose of XPTC_InvokeByIndex() is to map a platform
1505 +// independent call to the platform ABI. To do that,
1506 +// XPTC_InvokeByIndex() has to determine the method to call via vtable
1507 +// access. The parameters for the method are read from the
1508 +// nsXPTCVariant* and prepared for the native ABI.
1509 +
1510 +#include <stdio.h>
1511 +#include "xptcprivate.h"
1512 +
1513 +// 8 integral parameters are passed in registers, not including 'that'
1514 +#define GPR_COUNT 7
1515 +
1516 +// 8 floating point parameters are passed in registers, floats are
1517 +// promoted to doubles when passed in registers
1518 +#define FPR_COUNT 13
1519 +
1520 +extern "C" PRUint32
1521 +invoke_count_words(PRUint32 paramCount, nsXPTCVariant* s)
1522 +{
1523 + return PRUint32(((paramCount * 2) + 3) & ~3);
1524 +}
1525 +
1526 +extern "C" void
1527 +invoke_copy_to_stack(PRUint64* gpregs,
1528 + double* fpregs,
1529 + PRUint32 paramCount,
1530 + nsXPTCVariant* s,
1531 + PRUint64* d)
1532 +{
1533 + PRUint64 tempu64;
1534 +
1535 + for(uint32 i = 0; i < paramCount; i++, s++) {
1536 + if(s->IsPtrData())
1537 + tempu64 = (PRUint64) s->ptr;
1538 + else {
1539 + switch(s->type) {
1540 + case nsXPTType::T_FLOAT: break;
1541 + case nsXPTType::T_DOUBLE: break;
1542 + case nsXPTType::T_I8: tempu64 = s->val.i8; break;
1543 + case nsXPTType::T_I16: tempu64 = s->val.i16; break;
1544 + case nsXPTType::T_I32: tempu64 = s->val.i32; break;
1545 + case nsXPTType::T_I64: tempu64 = s->val.i64; break;
1546 + case nsXPTType::T_U8: tempu64 = s->val.u8; break;
1547 + case nsXPTType::T_U16: tempu64 = s->val.u16; break;
1548 + case nsXPTType::T_U32: tempu64 = s->val.u32; break;
1549 + case nsXPTType::T_U64: tempu64 = s->val.u64; break;
1550 + case nsXPTType::T_BOOL: tempu64 = s->val.b; break;
1551 + case nsXPTType::T_CHAR: tempu64 = s->val.c; break;
1552 + case nsXPTType::T_WCHAR: tempu64 = s->val.wc; break;
1553 + default: tempu64 = (PRUint64) s->val.p; break;
1554 + }
1555 + }
1556 +
1557 + if (!s->IsPtrData() && s->type == nsXPTType::T_DOUBLE) {
1558 + if (i < FPR_COUNT)
1559 + fpregs[i] = s->val.d;
1560 + else
1561 + *(double *)d = s->val.d;
1562 + }
1563 + else if (!s->IsPtrData() && s->type == nsXPTType::T_FLOAT) {
1564 + if (i < FPR_COUNT) {
1565 + fpregs[i] = s->val.f; // if passed in registers, floats are promoted to doubles
1566 + } else {
1567 + float *p = (float *)d;
1568 + p++;
1569 + *p = s->val.f;
1570 + }
1571 + }
1572 + else {
1573 + if (i < GPR_COUNT)
1574 + gpregs[i] = tempu64;
1575 + else
1576 + *d = tempu64;
1577 + }
1578 + if (i >= 7)
1579 + d++;
1580 + }
1581 +}
1582 +
1583 +extern "C"
1584 +XPTC_PUBLIC_API(nsresult)
1585 +XPTC_InvokeByIndex(nsISupports* that, PRUint32 methodIndex,
1586 + PRUint32 paramCount, nsXPTCVariant* params);
1587 +
1588 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
1589 --- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-21 16:38:52.000000000 +0000
1590 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_asm_ppc64_linux.s 2006-11-22 10:51:14.000000000 +0000
1591 @@ -0,0 +1,102 @@
1592 +// -*- Mode: Asm -*-
1593 +//
1594 +// The contents of this file are subject to the Netscape Public
1595 +// License Version 1.1 (the "License"); you may not use this file
1596 +// except in compliance with the License. You may obtain a copy of
1597 +// the License at http://www.mozilla.org/NPL/
1598 +//
1599 +// Software distributed under the License is distributed on an "AS
1600 +// IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
1601 +// implied. See the License for the specific language governing
1602 +// rights and limitations under the License.
1603 +//
1604 +// The Original Code is mozilla.org code.
1605 +//
1606 +// The Initial Developer of the Original Code is Netscape
1607 +// Communications Corporation. Portions created by Netscape are
1608 +// Copyright (C) 1999 Netscape Communications Corporation. All
1609 +// Rights Reserved.
1610 +//
1611 +// Contributor(s):
1612 +// dwmw2@×××××××××.org (David Woodhouse)
1613 +// Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
1614 +// beard@××××××××.com (Patrick Beard)
1615 +// waterson@××××××××.com (Chris Waterson)
1616 +//
1617 +
1618 +.set r0,0; .set r1,1; .set RTOC,2; .set r3,3; .set r4,4
1619 +.set r5,5; .set r6,6; .set r7,7; .set r8,8; .set r9,9
1620 +.set r10,10; .set r11,11; .set r12,12; .set r13,13; .set r14,14
1621 +.set r15,15; .set r16,16; .set r17,17; .set r18,18; .set r19,19
1622 +.set r20,20; .set r21,21; .set r22,22; .set r23,23; .set r24,24
1623 +.set r25,25; .set r26,26; .set r27,27; .set r28,28; .set r29,29
1624 +.set r30,30; .set r31,31
1625 +.set f0,0; .set f1,1; .set f2,2; .set f3,3; .set f4,4
1626 +.set f5,5; .set f6,6; .set f7,7; .set f8,8; .set f9,9
1627 +.set f10,10; .set f11,11; .set f12,12; .set f13,13; .set f14,14
1628 +.set f15,15; .set f16,16; .set f17,17; .set f18,18; .set f19,19
1629 +.set f20,20; .set f21,21; .set f22,22; .set f23,23; .set f24,24
1630 +.set f25,25; .set f26,26; .set f27,27; .set f28,28; .set f29,29
1631 +.set f30,30; .set f31,31
1632 +
1633 + .section ".text"
1634 + .align 2
1635 + .globl SharedStub
1636 + .section ".opd","aw"
1637 + .align 3
1638 +
1639 +SharedStub:
1640 + .quad .SharedStub,.TOC.@tocbase
1641 + .previous
1642 + .type SharedStub,@function
1643 +
1644 +.SharedStub:
1645 + mflr r0
1646 +
1647 + std r4, -56(r1) // Save all GPRS
1648 + std r5, -48(r1)
1649 + std r6, -40(r1)
1650 + std r7, -32(r1)
1651 + std r8, -24(r1)
1652 + std r9, -16(r1)
1653 + std r10, -8(r1)
1654 +
1655 + stfd f13, -64(r1) // ... and FPRS
1656 + stfd f12, -72(r1)
1657 + stfd f11, -80(r1)
1658 + stfd f10, -88(r1)
1659 + stfd f9, -96(r1)
1660 + stfd f8, -104(r1)
1661 + stfd f7, -112(r1)
1662 + stfd f6, -120(r1)
1663 + stfd f5, -128(r1)
1664 + stfd f4, -136(r1)
1665 + stfd f3, -144(r1)
1666 + stfd f2, -152(r1)
1667 + stfd f1, -160(r1)
1668 +
1669 + subi r6,r1,56 // r6 --> gprData
1670 + subi r7,r1,160 // r7 --> fprData
1671 + addi r5,r1,112 // r5 --> extra stack args
1672 +
1673 + std r0, 16(r1)
1674 +
1675 + stdu r1,-288(r1)
1676 + // r3 has the 'self' pointer already
1677 +
1678 + mr r4,r11 // r4 is methodIndex selector, passed
1679 + // via r11 in the nsXPTCStubBase::StubXX() call
1680 +
1681 + bl PrepareAndDispatch
1682 + nop
1683 +
1684 + ld 1,0(r1) // restore stack
1685 + ld r0,16(r1) // restore LR
1686 + mtlr r0
1687 + blr
1688 +
1689 + .size SharedStub,.-.SharedStub
1690 +
1691 +
1692 +/* Magic indicating no need for an executable stack */
1693 +.section .note.GNU-stack, "", @progbits ; .previous
1694 unchanged:
1695 --- mozilla.orig/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 1970-01-01 01:00:00.000000000 +0100
1696 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_ppc64_linux.cpp 2006-11-21 16:59:46.000000000 +0000
1697 @@ -0,0 +1,247 @@
1698 +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
1699 +/* ***** BEGIN LICENSE BLOCK *****
1700 + * Version: MPL 1.1/GPL 2.0/LGPL 2.1
1701 + *
1702 + * The contents of this file are subject to the Mozilla Public License Version
1703 + * 1.1 (the "License"); you may not use this file except in compliance with
1704 + * the License. You may obtain a copy of the License at
1705 + * http://www.mozilla.org/MPL/
1706 + *
1707 + * Software distributed under the License is distributed on an "AS IS" basis,
1708 + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
1709 + * for the specific language governing rights and limitations under the
1710 + * License.
1711 + *
1712 + * The Original Code is mozilla.org code.
1713 + *
1714 + * The Initial Developer of the Original Code is
1715 + * Netscape Communications Corporation.
1716 + * Portions created by the Initial Developer are Copyright (C) 1999
1717 + * the Initial Developer. All Rights Reserved.
1718 + *
1719 + * Contributor(s):
1720 + * dwmw2@×××××××××.org (David Woodhouse)
1721 + * Franz.Sirl-kernel@××××××××××.com (Franz Sirl)
1722 + * beard@××××××××.com (Patrick Beard)
1723 + * waterson@××××××××.com (Chris Waterson)
1724 + *
1725 + * Alternatively, the contents of this file may be used under the terms of
1726 + * either of the GNU General Public License Version 2 or later (the "GPL"),
1727 + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
1728 + * in which case the provisions of the GPL or the LGPL are applicable instead
1729 + * of those above. If you wish to allow use of your version of this file only
1730 + * under the terms of either the GPL or the LGPL, and not to allow others to
1731 + * use your version of this file under the terms of the MPL, indicate your
1732 + * decision by deleting the provisions above and replace them with the notice
1733 + * and other provisions required by the GPL or the LGPL. If you do not delete
1734 + * the provisions above, a recipient may use your version of this file under
1735 + * the terms of any one of the MPL, the GPL or the LGPL.
1736 + *
1737 + * ***** END LICENSE BLOCK ***** */
1738 +
1739 +// Implement shared vtbl methods.
1740 +
1741 +#include "xptcprivate.h"
1742 +
1743 +// The Linux/PPC ABI (aka PPC/SYSV ABI) passes the first 8 integral
1744 +// parameters and the first 13 floating point parameters in registers
1745 +// (r3-r10 and f1-f13), no stack space is allocated for these by the
1746 +// caller. The rest of the parameters are passed in the callers stack
1747 +// area. The stack pointer has to retain 16-byte alignment, longlongs
1748 +// and doubles are aligned on 8-byte boundaries.
1749 +
1750 +#define PARAM_BUFFER_COUNT 16
1751 +#define GPR_COUNT 7
1752 +#define FPR_COUNT 13
1753 +
1754 +// PrepareAndDispatch() is called by SharedStub() and calls the actual method.
1755 +//
1756 +// - 'args[]' contains the arguments passed on stack
1757 +// - 'gprData[]' contains the arguments passed in integer registers
1758 +// - 'fprData[]' contains the arguments passed in floating point registers
1759 +//
1760 +// The parameters are mapped into an array of type 'nsXPTCMiniVariant'
1761 +// and then the method gets called.
1762 +#include <stdio.h>
1763 +extern "C" nsresult
1764 +PrepareAndDispatch(nsXPTCStubBase* self,
1765 + PRUint64 methodIndex,
1766 + PRUint64* args,
1767 + PRUint64 *gprData,
1768 + double *fprData)
1769 +{
1770 + nsXPTCMiniVariant paramBuffer[PARAM_BUFFER_COUNT];
1771 + nsXPTCMiniVariant* dispatchParams = NULL;
1772 + nsIInterfaceInfo* iface_info = NULL;
1773 + const nsXPTMethodInfo* info;
1774 + PRUint32 paramCount;
1775 + PRUint32 i;
1776 + nsresult result = NS_ERROR_FAILURE;
1777 +
1778 + NS_ASSERTION(self,"no self");
1779 +
1780 + self->GetInterfaceInfo(&iface_info);
1781 + NS_ASSERTION(iface_info,"no interface info");
1782 + if (! iface_info)
1783 + return NS_ERROR_UNEXPECTED;
1784 +
1785 + iface_info->GetMethodInfo(PRUint16(methodIndex), &info);
1786 + NS_ASSERTION(info,"no method info");
1787 + if (! info)
1788 + return NS_ERROR_UNEXPECTED;
1789 +
1790 + paramCount = info->GetParamCount();
1791 +
1792 + // setup variant array pointer
1793 + if(paramCount > PARAM_BUFFER_COUNT)
1794 + dispatchParams = new nsXPTCMiniVariant[paramCount];
1795 + else
1796 + dispatchParams = paramBuffer;
1797 +
1798 + NS_ASSERTION(dispatchParams,"no place for params");
1799 + if (! dispatchParams)
1800 + return NS_ERROR_OUT_OF_MEMORY;
1801 +
1802 + PRUint64* ap = args;
1803 + PRUint64 tempu64;
1804 +
1805 + for(i = 0; i < paramCount; i++) {
1806 + const nsXPTParamInfo& param = info->GetParam(i);
1807 + const nsXPTType& type = param.GetType();
1808 + nsXPTCMiniVariant* dp = &dispatchParams[i];
1809 +
1810 + if (!param.IsOut() && type == nsXPTType::T_DOUBLE) {
1811 + if (i < FPR_COUNT)
1812 + dp->val.d = fprData[i];
1813 + else
1814 + dp->val.d = *(double*) ap;
1815 + } else if (!param.IsOut() && type == nsXPTType::T_FLOAT) {
1816 + if (i < FPR_COUNT)
1817 + dp->val.f = (float) fprData[i]; // in registers floats are passed as doubles
1818 + else {
1819 + float *p = (float *)ap;
1820 + p++;
1821 + dp->val.f = *p;
1822 + }
1823 + } else { /* integer type or pointer */
1824 + if (i < GPR_COUNT)
1825 + tempu64 = gprData[i];
1826 + else
1827 + tempu64 = *ap;
1828 +
1829 + if (param.IsOut() || !type.IsArithmetic())
1830 + dp->val.p = (void*) tempu64;
1831 + else if (type ==nsXPTType::T_I8)
1832 + dp->val.i8 = (PRInt8) tempu64;
1833 + else if (type ==nsXPTType::T_I16)
1834 + dp->val.i16 = (PRInt16) tempu64;
1835 + else if (type ==nsXPTType::T_I32)
1836 + dp->val.i32 = (PRInt32) tempu64;
1837 + else if (type ==nsXPTType::T_I64)
1838 + dp->val.i64 = (PRInt64) tempu64;
1839 + else if (type ==nsXPTType::T_U8)
1840 + dp->val.u8 = (PRUint8) tempu64;
1841 + else if (type ==nsXPTType::T_U16)
1842 + dp->val.u16 = (PRUint16) tempu64;
1843 + else if (type ==nsXPTType::T_U32)
1844 + dp->val.u32 = (PRUint32) tempu64;
1845 + else if (type ==nsXPTType::T_U64)
1846 + dp->val.u64 = (PRUint64) tempu64;
1847 + else if (type ==nsXPTType::T_BOOL)
1848 + dp->val.b = (PRBool) tempu64;
1849 + else if (type ==nsXPTType::T_CHAR)
1850 + dp->val.c = (char) tempu64;
1851 + else if (type ==nsXPTType::T_WCHAR)
1852 + dp->val.wc = (wchar_t) tempu64;
1853 + else
1854 + NS_ASSERTION(0, "bad type");
1855 + }
1856 +
1857 + if (i >= 7)
1858 + ap++;
1859 + }
1860 +
1861 + result = self->CallMethod((PRUint16) methodIndex, info, dispatchParams);
1862 +
1863 + NS_RELEASE(iface_info);
1864 +
1865 + if (dispatchParams != paramBuffer)
1866 + delete [] dispatchParams;
1867 +
1868 + return result;
1869 +}
1870 +
1871 +// Load r11 with the constant 'n' and branch to SharedStub().
1872 +//
1873 +// XXX Yes, it's ugly that we're relying on gcc's name-mangling here;
1874 +// however, it's quick, dirty, and'll break when the ABI changes on
1875 +// us, which is what we want ;-).
1876 +
1877 +#if __GXX_ABI_VERSION < 100
1878 +#error Prehistoric GCC not supported here
1879 +#else
1880 +// gcc-3 version
1881 +//
1882 +// As G++3 ABI contains the length of the functionname in the mangled
1883 +// name, it is difficult to get a generic assembler mechanism like
1884 +// in the G++ 2.95 case.
1885 +// Create names would be like:
1886 +// _ZN14nsXPTCStubBase5Stub1Ev
1887 +// _ZN14nsXPTCStubBase6Stub12Ev
1888 +// _ZN14nsXPTCStubBase7Stub123Ev
1889 +// _ZN14nsXPTCStubBase8Stub1234Ev
1890 +// etc.
1891 +// Use assembler directives to get the names right...
1892 +
1893 +# define STUB_ENTRY(n) \
1894 +__asm__ ( \
1895 + ".section \".toc\",\"aw\" \n\t" \
1896 + ".section \".text\" \n\t" \
1897 + ".align 2 \n\t" \
1898 + ".if "#n" < 10 \n\t" \
1899 + ".globl _ZN14nsXPTCStubBase5Stub"#n"Ev \n\t" \
1900 + ".section \".opd\",\"aw\" \n\t" \
1901 + ".align 3 \n\t" \
1902 +"_ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
1903 + ".quad ._ZN14nsXPTCStubBase5Stub"#n"Ev,.TOC.@tocbase \n\t" \
1904 + ".previous \n\t" \
1905 + ".type _ZN14nsXPTCStubBase5Stub"#n"Ev,@function \n\n" \
1906 +"._ZN14nsXPTCStubBase5Stub"#n"Ev: \n\t" \
1907 + \
1908 + ".elseif "#n" < 100 \n\t" \
1909 + ".globl _ZN14nsXPTCStubBase6Stub"#n"Ev \n\t" \
1910 + ".section \".opd\",\"aw\" \n\t" \
1911 + ".align 3 \n\t" \
1912 +"_ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
1913 + ".quad ._ZN14nsXPTCStubBase6Stub"#n"Ev,.TOC.@tocbase \n\t" \
1914 + ".previous \n\t" \
1915 + ".type _ZN14nsXPTCStubBase6Stub"#n"Ev,@function \n\n" \
1916 +"._ZN14nsXPTCStubBase6Stub"#n"Ev: \n\t" \
1917 + \
1918 + ".elseif "#n" < 1000 \n\t" \
1919 + ".globl _ZN14nsXPTCStubBase7Stub"#n"Ev \n\t" \
1920 + ".section \".opd\",\"aw\" \n\t" \
1921 + ".align 3 \n\t" \
1922 +"_ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
1923 + ".quad ._ZN14nsXPTCStubBase7Stub"#n"Ev,.TOC.@tocbase \n\t" \
1924 + ".previous \n\t" \
1925 + ".type _ZN14nsXPTCStubBase7Stub"#n"Ev,@function \n\n" \
1926 +"._ZN14nsXPTCStubBase7Stub"#n"Ev: \n\t" \
1927 + \
1928 + ".else \n\t" \
1929 + ".err \"stub number "#n" >= 1000 not yet supported\"\n" \
1930 + ".endif \n\t" \
1931 + \
1932 + "li 11,"#n" \n\t" \
1933 + "b SharedStub \n" \
1934 +);
1935 +#endif
1936 +
1937 +#define SENTINEL_ENTRY(n) \
1938 +nsresult nsXPTCStubBase::Sentinel##n() \
1939 +{ \
1940 + NS_ASSERTION(0,"nsXPTCStubBase::Sentinel called"); \
1941 + return NS_ERROR_NOT_IMPLEMENTED; \
1942 +}
1943 +
1944 +#include "xptcstubsdef.inc"
1945
1946
1947
1948 1.1 src/patchsets/seamonkey/1.1.5/033_firefox-2.0_ppc_powerpc.patch
1949
1950 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/033_firefox-2.0_ppc_powerpc.patch?rev=1.1&view=markup
1951 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/033_firefox-2.0_ppc_powerpc.patch?rev=1.1&content-type=text/plain
1952
1953 Index: 033_firefox-2.0_ppc_powerpc.patch
1954 ===================================================================
1955 --- mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig 2007-03-05 13:46:38.000000000 +0100
1956 +++ mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in 2007-03-05 13:47:30.000000000 +0100
1957 @@ -288,12 +288,12 @@
1958 #
1959 # Linux/PPC
1960 #
1961 -ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc)
1962 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
1963 CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
1964 ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
1965 AS := $(CC) -c -x assembler-with-cpp
1966 endif
1967 -ifeq ($(OS_ARCH)$(OS_TEST),Linuxppc64)
1968 +ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
1969 CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
1970 ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
1971 AS := $(CC) -c -x assembler-with-cpp
1972
1973
1974
1975 1.1 src/patchsets/seamonkey/1.1.5/050_respect-host-variable.patch
1976
1977 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/050_respect-host-variable.patch?rev=1.1&view=markup
1978 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/050_respect-host-variable.patch?rev=1.1&content-type=text/plain
1979
1980 Index: 050_respect-host-variable.patch
1981 ===================================================================
1982 # https://bugs.gentoo.org/show_bug.cgi?id=168893
1983
1984 --- mozilla/configure.in.old 2007-03-02 23:28:27.000000000 +0200
1985 +++ mozilla/configure.in 2007-03-02 23:29:23.000000000 +0200
1986 @@ -825,7 +825,6 @@
1987 OS_TARGET="${target_os}"
1988 OS_ARCH=`echo $target_os | sed -e 's|/|_|g'`
1989 OS_RELEASE=
1990 - OS_TEST="${target_cpu}"
1991 case "${target_os}" in
1992 linux*) OS_ARCH=Linux ;;
1993 solaris*) OS_ARCH=SunOS OS_RELEASE=5 ;;
1994 @@ -837,8 +836,10 @@
1995 OS_TARGET=`uname -s`
1996 OS_ARCH=`uname -s | sed -e 's|/|_|g'`
1997 OS_RELEASE=`uname -r`
1998 - OS_TEST=`uname -m`
1999 fi
2000 +
2001 +OS_TEST="${target_cpu}"
2002 +
2003 _COMPILER_PREFIX=
2004
2005 HOST_OS_ARCH=`echo $host_os | sed -e 's|/|_|g'`
2006
2007
2008
2009 1.1 src/patchsets/seamonkey/1.1.5/055_firefox-2.0_gfbsd-pthreads.patch
2010
2011 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&view=markup
2012 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/055_firefox-2.0_gfbsd-pthreads.patch?rev=1.1&content-type=text/plain
2013
2014 Index: 055_firefox-2.0_gfbsd-pthreads.patch
2015 ===================================================================
2016 # https://bugs.gentoo.org/show_bug.cgi?id=169825
2017
2018 --- mozilla/config/rules.mk.orig Thu Sep 14 14:07:03 2006
2019 +++ mozilla/config/rules.mk Wed Oct 18 11:00:09 2006
2020 @@ -442,9 +442,7 @@
2021 endif
2022
2023 ifeq ($(OS_ARCH),FreeBSD)
2024 -ifdef IS_COMPONENT
2025 -EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
2026 -endif
2027 +EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic -lc
2028 endif
2029
2030 ifeq ($(OS_ARCH),NetBSD)
2031 --- mozilla/configure.in.orig 2007-02-06 02:37:37 -0300
2032 +++ mozilla/configure.in 2007-03-07 15:35:41 -0300
2033 @@ -2667,7 +2667,7 @@
2034 *-hpux11.*)
2035 ;;
2036 *)
2037 - AC_CHECK_LIB(c_r, gethostbyname_r)
2038 + AC_SEARCH_LIBS([gethostbyname_r], [c_r])
2039 ;;
2040 esac
2041 AC_CHECK_LIB(m, atan)
2042 --- mozilla/configure.in.orig 2007-02-06 02:37:37 -0300
2043 +++ mozilla/configure.in 2007-03-07 13:59:53 -0300
2044 @@ -2839,11 +2839,12 @@
2045 *-*-freebsd*)
2046 AC_DEFINE(_REENTRANT)
2047 AC_DEFINE(_THREAD_SAFE)
2048 - dnl -pthread links in -lc_r, so don't specify it explicitly.
2049 - if test "$ac_cv_have_dash_pthread" = "yes"; then
2050 - _PTHREAD_LDFLAGS="-pthread"
2051 + dnl use the environment PTHREAD_LIBS
2052 + if test -n "$PTHREAD_LIBS"; then
2053 + _PTHREAD_LDFLAGS="$PTHREAD_LIBS"
2054 else
2055 - _PTHREAD_LDFLAGS="-lc_r"
2056 + _PTHREAD_LDFLAGS="-lpthread"
2057 fi
2058 + LDFLAGS="${_PTHREAD_LDFLAGS} ${LDFLAGS}"
2059 ;;
2060
2061
2062
2063 1.1 src/patchsets/seamonkey/1.1.5/063_mozilla-rpath-3.patch
2064
2065 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/063_mozilla-rpath-3.patch?rev=1.1&view=markup
2066 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/063_mozilla-rpath-3.patch?rev=1.1&content-type=text/plain
2067
2068 Index: 063_mozilla-rpath-3.patch
2069 ===================================================================
2070 --- config/rules.mk.orig 2005-07-28 01:45:18.000000000 +0000
2071 +++ config/rules.mk 2005-07-28 01:45:21.000000000 +0000
2072 @@ -507,5 +507,10 @@
2073 #
2074 ifeq ($(OS_ARCH),Linux)
2075 ifdef IS_COMPONENT
2076 +DSO_LDOPTS += -Wl,-rpath,'$$ORIGIN:$$ORIGIN/..'
2077 +OS_LDFLAGS += -Wl,-rpath,'$$ORIGIN:$$ORIGIN/..'
2078 EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
2079 +else
2080 +DSO_LDOPTS += -Wl,-rpath,'$$ORIGIN'
2081 +OS_LDFLAGS += -Wl,-rpath,'$$ORIGIN'
2082 endif
2083
2084
2085
2086
2087 1.1 src/patchsets/seamonkey/1.1.5/064_mozilla-1.7.10-nsplugins-v2.patch
2088
2089 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/064_mozilla-1.7.10-nsplugins-v2.patch?rev=1.1&view=markup
2090 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/064_mozilla-1.7.10-nsplugins-v2.patch?rev=1.1&content-type=text/plain
2091
2092 Index: 064_mozilla-1.7.10-nsplugins-v2.patch
2093 ===================================================================
2094 This is the second revision of the nsplugins patch. The first revision did not
2095 work. This one does.
2096
2097 This patch adds /usr/$(get_libdir)/nsplugins and /usr/$(get_libdir)/nsbrowser/plugins
2098 to the search path for plugins. The point of this patch is to provide a place
2099 to install netscape-compatible plugins which can be used by any of
2100 mozilla/firefox/thunderbird/seamonkey, for example the acroread plugin. This
2101 obviates the code in nsplugins.eclass except for inst_plugin
2102
2103 Note that mozilla/firefox/thunderbird/seamonkey handle dup plugins like this:
2104 First by mtime order (more recent takes precedence), second by alpha order.
2105
2106 01 Aug 2005 agriffis
2107
2108 --- mozilla/xpcom/io/nsAppFileLocationProvider.cpp.agriffis 2005-08-01 15:53:34.000000000 -0400
2109 +++ mozilla/xpcom/io/nsAppFileLocationProvider.cpp 2005-08-01 22:18:21.766663456 -0400
2110 @@ -196,6 +196,14 @@
2111 if (NS_SUCCEEDED(rv))
2112 rv = localFile->AppendRelativeNativePath(PLUGINS_DIR_NAME);
2113 }
2114 + else if (nsCRT::strcmp(prop, GENTOO_NSPLUGINS_DIR) == 0)
2115 + {
2116 + rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSPLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
2117 + }
2118 + else if (nsCRT::strcmp(prop, GENTOO_NSBROWSER_PLUGINS_DIR) == 0)
2119 + {
2120 + rv = NS_NewNativeLocalFile(nsDependentCString(GENTOO_NSBROWSER_PLUGINS_DIR), PR_TRUE, getter_AddRefs(localFile));
2121 + }
2122 #if defined(XP_MAC) || defined(XP_MACOSX)
2123 else if (nsCRT::strcmp(prop, NS_MACOSX_USER_PLUGIN_DIR) == 0)
2124 {
2125 @@ -579,7 +587,7 @@
2126
2127 *_retval = new nsAppDirectoryEnumerator(this, keys);
2128 #else
2129 - static const char* keys[] = { nsnull, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
2130 + static const char* keys[] = { nsnull, GENTOO_NSPLUGINS_DIR, GENTOO_NSBROWSER_PLUGINS_DIR, NS_USER_PLUGINS_DIR, NS_APP_PLUGINS_DIR, nsnull };
2131 if (!keys[0] && !(keys[0] = PR_GetEnv("MOZ_PLUGIN_PATH"))) {
2132 static const char nullstr = 0;
2133 keys[0] = &nullstr;
2134
2135
2136
2137 1.1 src/patchsets/seamonkey/1.1.5/101_thunderbird-0.7.3-gnome-uriloader.patch
2138
2139 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/101_thunderbird-0.7.3-gnome-uriloader.patch?rev=1.1&view=markup
2140 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/101_thunderbird-0.7.3-gnome-uriloader.patch?rev=1.1&content-type=text/plain
2141
2142 Index: 101_thunderbird-0.7.3-gnome-uriloader.patch
2143 ===================================================================
2144 --- mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp.foo 2004-01-05 18:38:48.000000000 -0500
2145 +++ mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp 2004-01-05 19:14:51.000000000 -0500
2146 @@ -39,6 +39,7 @@
2147 #include "nsGNOMERegistry.h"
2148 #include "prlink.h"
2149 #include "prmem.h"
2150 +#include "prenv.h"
2151 #include "nsString.h"
2152 #include "nsIComponentManager.h"
2153 #include "nsILocalFile.h"
2154 @@ -137,6 +138,10 @@
2155 } \
2156 PR_END_MACRO
2157
2158 + // Don't even use this code if an env var is set
2159 + if (PR_GetEnv("MOZ_DISABLE_GNOME"))
2160 + return;
2161 +
2162 // Attempt to open libgconf
2163 gconfLib = LoadVersionedLibrary("gconf-2", ".4");
2164 ENSURE_LIB(gconfLib);
2165
2166
2167
2168 1.1 src/patchsets/seamonkey/1.1.5/220_seamonkey-gentoo-homepage.patch
2169
2170 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/220_seamonkey-gentoo-homepage.patch?rev=1.1&view=markup
2171 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/220_seamonkey-gentoo-homepage.patch?rev=1.1&content-type=text/plain
2172
2173 Index: 220_seamonkey-gentoo-homepage.patch
2174 ===================================================================
2175 --- xpfe/browser/resources/locale/en-US/region.properties.old 2007-01-20 21:11:14.000000000 +0100
2176 +++ xpfe/browser/resources/locale/en-US/region.properties 2007-01-20 21:12:31.000000000 +0100
2177 @@ -1,5 +1,5 @@
2178 # navigator.properties
2179 -homePageDefault=http://www.mozilla.org/
2180 +homePageDefault=http://www.gentoo.org/
2181 keywordList=http://home.netscape.com/escapes/keywords
2182 webmailKeyword=http://webmail.netscape.com
2183 fallbackDefaultSearchURL=http://www.google.com/search?q=
2184 @@ -7,7 +7,7 @@
2185 #
2186 # all.js
2187 #
2188 -browser.startup.homepage=http://www.mozilla.org/projects/seamonkey/start/
2189 +browser.startup.homepage=http://www.gentoo.org
2190 browser.throbber.url=http://www.mozilla.org/projects/seamonkey/
2191 browser.search.defaulturl=http://www.google.com/search?q=
2192 general.useragent.contentlocale=US
2193 @@ -17,4 +17,4 @@
2194
2195 #config.js
2196 #
2197 -startup.homepage_override_url=http://www.mozilla.org/projects/seamonkey/start/
2198 +startup.homepage_override_url=http://www.gentoo.org
2199
2200
2201
2202 1.1 src/patchsets/seamonkey/1.1.5/225_mozilla-nspr-packages.patch
2203
2204 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/225_mozilla-nspr-packages.patch?rev=1.1&view=markup
2205 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/225_mozilla-nspr-packages.patch?rev=1.1&content-type=text/plain
2206
2207 Index: 225_mozilla-nspr-packages.patch
2208 ===================================================================
2209 --- xpinstall/packager/packages-unix.old 2007-01-20 21:14:14.000000000 +0100
2210 +++ xpinstall/packager/packages-unix 2007-01-20 21:17:57.000000000 +0100
2211 @@ -45,9 +45,6 @@
2212
2213 [xpcom]
2214 bin/libmozjs.so
2215 -bin/libnspr4.so
2216 -bin/libplc4.so
2217 -bin/libplds4.so
2218 bin/cpu/sparcv8plus/libnspr_flt4.so
2219 bin/libxpcom.so
2220 bin/libxpcom_core.so
2221 @@ -469,17 +466,13 @@
2222 bin/components/talkback/*
2223
2224 [psm]
2225 -bin/libnssckbi.so
2226 bin/components/libpipboot.so
2227 bin/components/pipboot.xpt
2228 bin/components/libpipnss.so
2229 bin/components/pipnss.xpt
2230 bin/components/libpippki.so
2231 bin/components/pippki.xpt
2232 -bin/libnss3.so
2233 -bin/libsmime3.so
2234 bin/libsoftokn3.chk
2235 -bin/libsoftokn3.so
2236 bin/libfreebl3.chk
2237 bin/libfreebl3.so
2238 bin/libfreebl_32fpu_3.chk
2239 @@ -492,7 +485,6 @@
2240 bin/libfreebl_64fpu_3.so
2241 bin/libfreebl_64int_3.chk
2242 bin/libfreebl_64int_3.so
2243 -bin/libssl3.so
2244 bin/chrome/pipnss.jar
2245 bin/chrome/pippki.jar
2246
2247 @@ -510,5 +502,17 @@
2248 bin/components/spellchecker.xpt
2249 bin/dictionaries/*
2250
2251 +[nspr]
2252 +bin/libnspr4.so
2253 +bin/libplc4.so
2254 +bin/libplds4.so
2255 +
2256 +[nss]
2257 +bin/libnssckbi.so
2258 +bin/libnss3.so
2259 +bin/libsmime3.so
2260 +bin/libsoftokn3.so
2261 +bin/libssl3.so
2262 +
2263 [reporter]
2264 bin/chrome/reporter.jar
2265
2266
2267
2268 1.1 src/patchsets/seamonkey/1.1.5/301_mozilla-1.7.3-gnome-vfs-default-app.patch
2269
2270 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/301_mozilla-1.7.3-gnome-vfs-default-app.patch?rev=1.1&view=markup
2271 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/301_mozilla-1.7.3-gnome-vfs-default-app.patch?rev=1.1&content-type=text/plain
2272
2273 Index: 301_mozilla-1.7.3-gnome-vfs-default-app.patch
2274 ===================================================================
2275 --- mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp.foo 2004-03-06 09:41:00.000000000 -0500
2276 +++ mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp 2004-10-18 18:55:55.000000000 -0400
2277 @@ -283,6 +283,11 @@
2278
2279 gchar *nativeCommand = g_filename_from_utf8(handlerApp->command,
2280 -1, NULL, NULL, NULL);
2281 +
2282 + // Some versions of the mime stuff will add whitespace to the end or
2283 + // beginning of the command
2284 + nativeCommand = g_strstrip(nativeCommand);
2285 +
2286 if (!nativeCommand) {
2287 NS_ERROR("Could not convert helper app command to filesystem encoding");
2288 _gnome_vfs_mime_application_free(handlerApp);
2289
2290
2291
2292 1.1 src/patchsets/seamonkey/1.1.5/303_mozilla-1.7.13-as-needed.patch
2293
2294 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/303_mozilla-1.7.13-as-needed.patch?rev=1.1&view=markup
2295 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/303_mozilla-1.7.13-as-needed.patch?rev=1.1&content-type=text/plain
2296
2297 Index: 303_mozilla-1.7.13-as-needed.patch
2298 ===================================================================
2299 --- embedding/browser/gtk/tests/Makefile.in.orig 2006-04-29 22:56:46.000000000 -0500
2300 +++ embedding/browser/gtk/tests/Makefile.in 2006-04-29 22:57:17.000000000 -0500
2301 @@ -58,6 +58,8 @@
2302 endif
2303 endif
2304
2305 +OS_LDFLAGS += -Wl,-rpath-link,'$(DEPTH)/dist/bin'
2306 +
2307 ifdef MOZ_ENABLE_GTK
2308 LIBS += \
2309 -lgtkembedmoz \
2310
2311
2312
2313 1.1 src/patchsets/seamonkey/1.1.5/304_mozilla-1.7.5-g-application-name.patch
2314
2315 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/304_mozilla-1.7.5-g-application-name.patch?rev=1.1&view=markup
2316 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/seamonkey/1.1.5/304_mozilla-1.7.5-g-application-name.patch?rev=1.1&content-type=text/plain
2317
2318 Index: 304_mozilla-1.7.5-g-application-name.patch
2319 ===================================================================
2320 Index: xpfe/bootstrap/nsAppRunner.cpp
2321 ===================================================================
2322 RCS file: /cvsroot/mozilla/xpfe/bootstrap/nsAppRunner.cpp,v
2323 retrieving revision 1.428
2324 diff -d -u -p -r1.428 nsAppRunner.cpp
2325 --- xpfe/bootstrap/nsAppRunner.cpp 20 Dec 2004 21:53:33 -0000 1.428
2326 +++ xpfe/bootstrap/nsAppRunner.cpp 5 Mar 2005 08:39:12 -0000
2327 @@ -1612,6 +1612,11 @@ static PRBool GetWantSplashScreen(int ar
2328 return dosplash;
2329 }
2330
2331 +#ifdef MOZ_WIDGET_GTK2
2332 +#include "prlink.h"
2333 +typedef void (*_g_set_application_name_fn)(const gchar *application_name);
2334 +#endif
2335 +
2336 int main(int argc, char* argv[])
2337 {
2338 NS_TIMELINE_MARK("enter main");
2339 @@ -1712,6 +1717,19 @@ int main(int argc, char* argv[])
2340 #endif
2341 gtk_init(&argc, &argv);
2342
2343 +#if defined(MOZ_WIDGET_GTK2)
2344 + // g_set_application_name () is only defined in glib2.2 and higher.
2345 + PRLibrary *glib2;
2346 + _g_set_application_name_fn _g_set_application_name =
2347 + (_g_set_application_name_fn)PR_FindFunctionSymbolAndLibrary("g_set_application_name", &glib2);
2348 + if (_g_set_application_name) {
2349 + _g_set_application_name("seamonkey"); /* MOZ_APP_NAME */
2350 + }
2351 + if (glib2) {
2352 + PR_UnloadLibrary(glib2);
2353 + }
2354 +#endif
2355 +
2356 gtk_widget_set_default_visual(gdk_rgb_get_visual());
2357 gtk_widget_set_default_colormap(gdk_rgb_get_cmap());
2358 #endif /* MOZ_WIDGET_GTK || MOZ_WIDGET_GTK2 */
2359
2360
2361
2362 --
2363 gentoo-commits@g.o mailing list