-AUX firefox-1.1-uriloader-1.patch 13902 RMD160 cb816967a91e0a60a238ad11736eec5ac5da3754 SHA1 cbb5303137bf7f94ff1cfae760d5a64a810b3021 SHA256 ac9ef7ec790856d35609a051596579b0cc5a327542614ab420505a2669b388bb
-MD5 b92734c051b7734d459e23f7c4a01b63 files/firefox-1.1-uriloader-1.patch 13902
-RMD160 cb816967a91e0a60a238ad11736eec5ac5da3754 files/firefox-1.1-uriloader-1.patch 13902
-SHA256 ac9ef7ec790856d35609a051596579b0cc5a327542614ab420505a2669b388bb files/firefox-1.1-uriloader-1.patch 13902
-AUX firefox-1.1-uriloader.patch 15300 RMD160 46565d8f558cb3d5b3a45b97dec00c69c076ee9d SHA1 830d757f480bc21b44ef34921296b2f62d71c9bc SHA256 f9fb3bc8ecf6705e485252d3988988919d071695ad6da6bb1730e243805c694a
-MD5 2bd0dd9035dcb875b8340be358347e8d files/firefox-1.1-uriloader.patch 15300
-RMD160 46565d8f558cb3d5b3a45b97dec00c69c076ee9d files/firefox-1.1-uriloader.patch 15300
-SHA256 f9fb3bc8ecf6705e485252d3988988919d071695ad6da6bb1730e243805c694a files/firefox-1.1-uriloader.patch 15300
-AUX firefox-1.1-visibility.patch 930 RMD160 9d369c6348ce0fe6f4b63bd251dac1812b2f1c8a SHA1 431c40d0347c4bc654aaf6c1946b6e2e00b8e257 SHA256 96b259301defc82535326a40b2a9146c458a0299cf87e3769ea0616b25d64a7e
-MD5 cc5756b8c7af5c88b248b86c73fc5c8d files/firefox-1.1-visibility.patch 930
-RMD160 9d369c6348ce0fe6f4b63bd251dac1812b2f1c8a files/firefox-1.1-visibility.patch 930
-SHA256 96b259301defc82535326a40b2a9146c458a0299cf87e3769ea0616b25d64a7e files/firefox-1.1-visibility.patch 930
-AUX firefox-1.5-visibility-check.patch 10955 RMD160 9a5db3a7d6f5539ca77e116aed276d833925a43a SHA1 b43088167a5a9f86986030979f0a572edc445b73 SHA256 439355e899ea43fd2f82adae6fb4dc7363ca526ce307ce0faba76e533af1dc7c
-MD5 c00ea2b2717491804ceababb4c14cc5b files/firefox-1.5-visibility-check.patch 10955
-RMD160 9a5db3a7d6f5539ca77e116aed276d833925a43a files/firefox-1.5-visibility-check.patch 10955
-SHA256 439355e899ea43fd2f82adae6fb4dc7363ca526ce307ce0faba76e533af1dc7c files/firefox-1.5-visibility-check.patch 10955
-AUX firefox-1.5-visibility-fix.patch 485 RMD160 86461454b4723c19c43bb81b77a7067656e0f0ff SHA1 53ad985dfd359edad05ae4be23be553bf13d5648 SHA256 9d9afd53a6c16d81e43b779371bc7d38a95a44c599fe500e368c4024652c058a
-MD5 9c2b48ceea1c5ec25a32bf5225946f7b files/firefox-1.5-visibility-fix.patch 485
-RMD160 86461454b4723c19c43bb81b77a7067656e0f0ff files/firefox-1.5-visibility-fix.patch 485
-SHA256 9d9afd53a6c16d81e43b779371bc7d38a95a44c599fe500e368c4024652c058a files/firefox-1.5-visibility-fix.patch 485
-AUX firefox-bus-error.patch 4959 RMD160 99b7fd5ca78039c726d727352d4fb6f67c3169c5 SHA1 578445ebe1789d53dd83dce9a1961530a9808fde SHA256 e86a249c739bb2a90b1719db1afa5ae40a381e82e6595737394fe00a87161c7c
-MD5 d1856a2f534676ca597db22afedf824a files/firefox-bus-error.patch 4959
-RMD160 99b7fd5ca78039c726d727352d4fb6f67c3169c5 files/firefox-bus-error.patch 4959
-SHA256 e86a249c739bb2a90b1719db1afa5ae40a381e82e6595737394fe00a87161c7c files/firefox-bus-error.patch 4959
AUX icon/mozillathunderbird.desktop 184 RMD160 77953b3d9f191b94611a9953464ffd04d3e4148b SHA1 a19de7fcabb5be6339731d12e2f469d13e2a3ea2 SHA256 46dce3eb853408a169f5755faf63d973d69c21b47c641442a0e7c666e213aab3
MD5 1c810870d0c92c730341e491c310e2d4 files/icon/mozillathunderbird.desktop 184
RMD160 77953b3d9f191b94611a9953464ffd04d3e4148b files/icon/mozillathunderbird.desktop 184
MD5 04115f0e204444eac76a092a63c89027 files/icon/thunderbird-icon.png 6499
RMD160 1aeece7719c1c1629b98fc11870641769681a048 files/icon/thunderbird-icon.png 6499
SHA256 ff9749e42b82b80425bb52883d63baa53298af7be98870ee6b73f0a6cf0ab22d files/icon/thunderbird-icon.png 6499
-AUX mozilla-alpha-xpcom-subs-fix.patch 4953 RMD160 8703ed9d22d35fc6a95ca1607c3dedcfb377c267 SHA1 131abd5bc314b5a509b234bbcd1937d63520a29c SHA256 7ad36d16f9811742bdb95e838afb5f2d1cc9c58a7d180fc8f304b4d10bf53197
-MD5 23d6b685fd5e49a07cc4a1786871bf47 files/mozilla-alpha-xpcom-subs-fix.patch 4953
-RMD160 8703ed9d22d35fc6a95ca1607c3dedcfb377c267 files/mozilla-alpha-xpcom-subs-fix.patch 4953
-SHA256 7ad36d16f9811742bdb95e838afb5f2d1cc9c58a7d180fc8f304b4d10bf53197 files/mozilla-alpha-xpcom-subs-fix.patch 4953
-AUX mozilla-thunderbird-1.0.6-gcc4.patch 6131 RMD160 7b4e7a6a493cca427c1cfb2b4097db60e65b1fca SHA1 bd4940e89c2f1f5cb68c15969a24a268309bc9b6 SHA256 6ce4807f90ed77063cd4f4b2046e5323727798d676f1957e589ba035c00fd702
-MD5 07a5a1ce0146f1badc4e04849a9b1830 files/mozilla-thunderbird-1.0.6-gcc4.patch 6131
-RMD160 7b4e7a6a493cca427c1cfb2b4097db60e65b1fca files/mozilla-thunderbird-1.0.6-gcc4.patch 6131
-SHA256 6ce4807f90ed77063cd4f4b2046e5323727798d676f1957e589ba035c00fd702 files/mozilla-thunderbird-1.0.6-gcc4.patch 6131
-AUX mozilla-thunderbird-1.0.7-draft-template.patch 761 RMD160 e04a550771a0c39f69648ca8a53d4ce7cc4eba91 SHA1 1fec9bb1a8b44538abe8fd8ce1e6e3a579ba012c SHA256 de8df94dd6e8eda1743f22408826b282487ed0f4d4aa3ec83642ddb1074ed7aa
-MD5 30b381b5ba910ec5ffa7b9eafbfe86ef files/mozilla-thunderbird-1.0.7-draft-template.patch 761
-RMD160 e04a550771a0c39f69648ca8a53d4ce7cc4eba91 files/mozilla-thunderbird-1.0.7-draft-template.patch 761
-SHA256 de8df94dd6e8eda1743f22408826b282487ed0f4d4aa3ec83642ddb1074ed7aa files/mozilla-thunderbird-1.0.7-draft-template.patch 761
-AUX mozilla-thunderbird-1.0.7-gcc-4.0.2.patch 6861 RMD160 7bb61b353a84ae5798fb4c5766e154fd7957e1cd SHA1 7c65f1392a9d4b9db36bf25c132059be98c21593 SHA256 3dd142b65c76769f6781f296d02ee4222d3dc32df93395d307d4c94de7341711
-MD5 1783f8e4678fb4731ccc67b4bfba1981 files/mozilla-thunderbird-1.0.7-gcc-4.0.2.patch 6861
-RMD160 7bb61b353a84ae5798fb4c5766e154fd7957e1cd files/mozilla-thunderbird-1.0.7-gcc-4.0.2.patch 6861
-SHA256 3dd142b65c76769f6781f296d02ee4222d3dc32df93395d307d4c94de7341711 files/mozilla-thunderbird-1.0.7-gcc-4.0.2.patch 6861
-AUX mozilla-thunderbird-1.0.8-gcc-4.patch 5043 RMD160 ed0cfa69d9660a410f0433d82ab0a2e40541beba SHA1 0559fed9d3f9079c94982ace37eba78d3378d504 SHA256 d5c449a59d336a0017183ed2daac6368c1f16ebc223cba15823d7e41c8f9f26d
-MD5 7ee71876f41b10be9b68093bbd41817f files/mozilla-thunderbird-1.0.8-gcc-4.patch 5043
-RMD160 ed0cfa69d9660a410f0433d82ab0a2e40541beba files/mozilla-thunderbird-1.0.8-gcc-4.patch 5043
-SHA256 d5c449a59d336a0017183ed2daac6368c1f16ebc223cba15823d7e41c8f9f26d files/mozilla-thunderbird-1.0.8-gcc-4.patch 5043
-AUX pango-cairo-1.patch 4372 RMD160 53bb1177dcfed87152fc4114a29eaf606f90b931 SHA1 330332b58ab53713a3d44ad4953459c2def9e6f1 SHA256 72569e102da702f102be32e70747ec28eb86625312954d9e99ec79f0f3a87930
-MD5 d2386bbbf480062153de1b154cb63e6c files/pango-cairo-1.patch 4372
-RMD160 53bb1177dcfed87152fc4114a29eaf606f90b931 files/pango-cairo-1.patch 4372
-SHA256 72569e102da702f102be32e70747ec28eb86625312954d9e99ec79f0f3a87930 files/pango-cairo-1.patch 4372
-AUX thunderbird-cairo-canvas.patch 446 RMD160 d2387063069bdec617c9596d20e6cc69b5589d1a SHA1 691b2da041ceda726a483d65ff3b1099d3fbc83d SHA256 b239605715f3ec8af3671237cd2cedecf0221cc23b31c8f5bada08ef3bd1880b
-MD5 7847d262e628dcac303586fe02f2e8c4 files/thunderbird-cairo-canvas.patch 446
-RMD160 d2387063069bdec617c9596d20e6cc69b5589d1a files/thunderbird-cairo-canvas.patch 446
-SHA256 b239605715f3ec8af3671237cd2cedecf0221cc23b31c8f5bada08ef3bd1880b files/thunderbird-cairo-canvas.patch 446
-AUX thunderbird-nopangoxft.patch 839 RMD160 847b068b2242826a75da5548f1062966300d6b83 SHA1 bfc9331a4b804de536fe3a69e18292f267bfb8cf SHA256 da4c937226082e784eae24152ffff32bad3cc5d3556744dc21f5f88f67f109f4
-MD5 91661761f2f232b08b74f5adc4f1eff0 files/thunderbird-nopangoxft.patch 839
-RMD160 847b068b2242826a75da5548f1062966300d6b83 files/thunderbird-nopangoxft.patch 839
-SHA256 da4c937226082e784eae24152ffff32bad3cc5d3556744dc21f5f88f67f109f4 files/thunderbird-nopangoxft.patch 839
-AUX thunderbird-rpath-1.patch 1716 RMD160 23bf20d57b996f6c86658aad378682497a07544c SHA1 5079624a2927f5c4bac1387e64e2632351092305 SHA256 e34d5bae7787b76253add7ec03de19a85919d42dd949f6dd4d8e0fe3ed7fc620
-MD5 07f9a980afa2dde67554657c00b8be18 files/thunderbird-rpath-1.patch 1716
-RMD160 23bf20d57b996f6c86658aad378682497a07544c files/thunderbird-rpath-1.patch 1716
-SHA256 e34d5bae7787b76253add7ec03de19a85919d42dd949f6dd4d8e0fe3ed7fc620 files/thunderbird-rpath-1.patch 1716
DIST mozilla-thunderbird-1.5.0.8-patches-0.1.tar.bz2 30722 RMD160 d9ddc81daa4f87e3c64ce12d03e79fc3ea1a2549 SHA1 d80950316e1c8d2f64c92f471fc4ed14fb4da576 SHA256 144bfee7862df5229628710c45943d4ca33423cc68a51484a99c56318071950d
DIST mozilla-thunderbird-1.5.0.9-bg.xpi 220781 RMD160 ebb51f3c0b187b18c804aa93a5d477c4e55a4bfb SHA1 3699d9b2da7e622af523c2a7e0dc36ad91aeb1ef SHA256 23488d9e32bc17f41b7e0fda5fc389d88a17c15decd31e5b7312762f60a8653a
DIST mozilla-thunderbird-1.5.0.9-ca.xpi 183258 RMD160 b74766969302f66db5e115fd0a852d0976079feb SHA1 34d144599c187556e82f8f2350696629555071d3 SHA256 4eba3b161d7acf292173a13ebe9abfdba77dc165dedb3181dfcf9fa2f3e62a56
MD5 72916a14e61c1e0a9cad2079b680a9dc mozilla-thunderbird-2.0_beta1.ebuild 7890
RMD160 971cb80bf82c0ed35b4dd98ca17d54c6f4bdbaef mozilla-thunderbird-2.0_beta1.ebuild 7890
SHA256 4502b9496c0be5fd5434e4137529667c7411af30096d4fb4a385ba470158ff5d mozilla-thunderbird-2.0_beta1.ebuild 7890
-MISC ChangeLog 25108 RMD160 24e2095cd2e5fc10f574036e93b52bdee422ac27 SHA1 2e50d6298c682bcb45aa40b08b0c096130818f98 SHA256 fedc513d93f0ec668983bded7c60d74c1620cc804293ddb6f063a00e5e50cbc9
-MD5 caf9226aba13128d4c4a4d23eeeb2aa2 ChangeLog 25108
-RMD160 24e2095cd2e5fc10f574036e93b52bdee422ac27 ChangeLog 25108
-SHA256 fedc513d93f0ec668983bded7c60d74c1620cc804293ddb6f063a00e5e50cbc9 ChangeLog 25108
+MISC ChangeLog 25892 RMD160 a9c6fcc19dd78a3936729b26f6fb2de5bb6aea2b SHA1 05a19cd67baf59d6270a7533ae0bba8961f1cac1 SHA256 f32baa33f3c17f185a5ccffce1f5f09d7f596dfac6dfe57273960c1589430e3a
+MD5 0e9db24be312fa5ddb411b0624c5d3cb ChangeLog 25892
+RMD160 a9c6fcc19dd78a3936729b26f6fb2de5bb6aea2b ChangeLog 25892
+SHA256 f32baa33f3c17f185a5ccffce1f5f09d7f596dfac6dfe57273960c1589430e3a ChangeLog 25892
MISC metadata.xml 160 RMD160 d5a9f0bf8989621c2bde30facb53bcae00aba709 SHA1 5015c07af2083f20f9552d7fb11afb5ea69af345 SHA256 0cc5126362a12cee42ec1197c528a804cf36859329dd2c6d9225726831d14b8b
MD5 ce23390351fe8020387d93ee29e09a3d metadata.xml 160
RMD160 d5a9f0bf8989621c2bde30facb53bcae00aba709 metadata.xml 160
+++ /dev/null
-Index: uriloader/exthandler/Makefile.in
-===================================================================
-RCS file: /cvsroot/mozilla/uriloader/exthandler/Makefile.in,v
-retrieving revision 1.60
-diff -d -u -p -r1.60 Makefile.in
---- uriloader/exthandler/Makefile.in 2 May 2005 16:30:03 -0000 1.60
-+++ uriloader/exthandler/Makefile.in 21 Jul 2005 03:07:39 -0000
-@@ -102,7 +102,7 @@ endif
- LOCAL_INCLUDES = -I$(srcdir)
-
- ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
--OSHELPER += nsGNOMERegistry.cpp
-+OSHELPER += nsMIMEInfoUnix.cpp nsGNOMERegistry.cpp
- endif
-
- ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
-Index: uriloader/exthandler/unix/nsGNOMERegistry.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp,v
-retrieving revision 1.10
-diff -d -u -p -r1.10 nsGNOMERegistry.cpp
---- uriloader/exthandler/unix/nsGNOMERegistry.cpp 16 Oct 2004 13:46:17 -0000 1.10
-+++ uriloader/exthandler/unix/nsGNOMERegistry.cpp 21 Jul 2005 03:07:40 -0000
-@@ -42,7 +42,7 @@
- #include "nsString.h"
- #include "nsIComponentManager.h"
- #include "nsILocalFile.h"
--#include "nsMIMEInfoImpl.h"
-+#include "nsMIMEInfoUnix.h"
- #include "nsAutoPtr.h"
-
- #include <glib.h>
-@@ -56,12 +56,12 @@ typedef struct _GConfClient GConfClient;
- typedef struct _GnomeProgram GnomeProgram;
- typedef struct _GnomeModuleInfo GnomeModuleInfo;
-
--typedef struct {
-+struct GnomeVFSMimeApplication {
- char *id;
- char *name;
- char *command;
- /* there is more here, but we don't need it */
--} GnomeVFSMimeApplication;
-+};
-
- typedef GConfClient * (*_gconf_client_get_default_fn)();
- typedef gchar * (*_gconf_client_get_string_fn)(GConfClient *,
-@@ -264,7 +264,7 @@ nsGNOMERegistry::GetAppDescForScheme(con
- }
-
-
--/* static */ already_AddRefed<nsMIMEInfoBase>
-+/* static */ already_AddRefed<nsMIMEInfoUnix>
- nsGNOMERegistry::GetFromExtension(const char *aFileExt)
- {
- if (!gconfLib)
-@@ -286,7 +286,7 @@ nsGNOMERegistry::GetFromExtension(const
- return GetFromType(mimeType);
- }
-
--/* static */ already_AddRefed<nsMIMEInfoBase>
-+/* static */ already_AddRefed<nsMIMEInfoUnix>
- nsGNOMERegistry::GetFromType(const char *aMIMEType)
- {
- if (!gconfLib)
-@@ -296,9 +296,11 @@ nsGNOMERegistry::GetFromType(const char
- if (!handlerApp)
- return nsnull;
-
-- nsRefPtr<nsMIMEInfoImpl> mimeInfo = new nsMIMEInfoImpl(aMIMEType);
-+ nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix(aMIMEType);
- NS_ENSURE_TRUE(mimeInfo, nsnull);
-
-+ mimeInfo->SetDefaultGnomeVFSMimeApplication(handlerApp);
-+
- // Get the list of extensions and append then to the mimeInfo.
- GList *extensions = _gnome_vfs_mime_get_extensions_list(aMIMEType);
- for (GList *extension = extensions; extension; extension = extension->next)
-@@ -320,11 +322,21 @@ nsGNOMERegistry::GetFromType(const char
- return nsnull;
- }
-
-- gchar *commandPath = g_find_program_in_path(nativeCommand);
-+ gchar **argv;
-+ gboolean res = g_shell_parse_argv(nativeCommand, NULL, &argv, NULL);
-+ if (!res) {
-+ NS_ERROR("Could not convert helper app command to filesystem encoding");
-+ _gnome_vfs_mime_application_free(handlerApp);
-+ return nsnull;
-+ }
-+
-+ gchar *commandPath = g_find_program_in_path(argv[0]);
-
- g_free(nativeCommand);
-+ g_strfreev(argv);
-
- if (!commandPath) {
-+ NS_WARNING("could not find command in path");
- _gnome_vfs_mime_application_free(handlerApp);
- return nsnull;
- }
-@@ -342,7 +354,7 @@ nsGNOMERegistry::GetFromType(const char
-
- _gnome_vfs_mime_application_free(handlerApp);
-
-- nsMIMEInfoBase* retval;
-+ nsMIMEInfoUnix* retval;
- NS_ADDREF((retval = mimeInfo));
- return retval;
- }
-Index: uriloader/exthandler/unix/nsGNOMERegistry.h
-===================================================================
-RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.h,v
-retrieving revision 1.3
-diff -d -u -p -r1.3 nsGNOMERegistry.h
---- uriloader/exthandler/unix/nsGNOMERegistry.h 16 Oct 2004 13:46:17 -0000 1.3
-+++ uriloader/exthandler/unix/nsGNOMERegistry.h 21 Jul 2005 03:07:40 -0000
-@@ -35,10 +35,13 @@
- *
- * ***** END LICENSE BLOCK ***** */
-
-+#ifndef nsGNOMERegistry_h__
-+#define nsGNOMERegistry_h__
-+
- #include "nsIURI.h"
- #include "nsCOMPtr.h"
-
--class nsMIMEInfoBase;
-+class nsMIMEInfoUnix;
-
- class nsGNOMERegistry
- {
-@@ -52,7 +55,9 @@ class nsGNOMERegistry
- static void GetAppDescForScheme(const nsACString& aScheme,
- nsAString& aDesc);
-
-- static already_AddRefed<nsMIMEInfoBase> GetFromExtension(const char *aFileExt);
-+ static already_AddRefed<nsMIMEInfoUnix> GetFromExtension(const char *aFileExt);
-
-- static already_AddRefed<nsMIMEInfoBase> GetFromType(const char *aMIMEType);
-+ static already_AddRefed<nsMIMEInfoUnix> GetFromType(const char *aMIMEType);
- };
-+
-+#endif // nsGNOMERegistry_h__
-Index: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
-===================================================================
-RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
-diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ uriloader/exthandler/unix/nsMIMEInfoUnix.cpp 21 Jul 2005 03:07:40 -0000
-@@ -0,0 +1,196 @@
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is mozilla.org Code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Red Hat, Inc.
-+ * Portions created by the Initial Developer are Copyright (C) 2005
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ * Christopher Aillon <caillon@redhat.com> (Original author)
-+ *
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+#include "nsMIMEInfoUnix.h"
-+#include "prlink.h"
-+#include "prmem.h"
-+#include <glib.h>
-+#include <glib-object.h>
-+
-+static PRLibrary *gnomeLib;
-+static PRLibrary *vfsLib;
-+
-+typedef struct _GnomeProgram GnomeProgram;
-+typedef struct _GnomeModuleInfo GnomeModuleInfo;
-+
-+typedef enum {
-+ GNOME_VFS_OK // there's more but we don't care about them.
-+} GnomeVFSResult;
-+
-+typedef GnomeVFSResult (*_gnome_vfs_mime_application_launch_fn)
-+ (GnomeVFSMimeApplication *app,
-+ GList *uris);
-+typedef void (*_gnome_vfs_mime_application_free_fn)(GnomeVFSMimeApplication *);
-+typedef GnomeVFSMimeApplication * (*_gnome_vfs_mime_application_copy_fn)(GnomeVFSMimeApplication *);
-+typedef GnomeProgram * (*_gnome_program_init_fn)(const char *, const char *,
-+ const GnomeModuleInfo *, int,
-+ char **, const char *, ...);
-+typedef const char * (*_gnome_vfs_mime_application_get_name_fn)(GnomeVFSMimeApplication *);
-+typedef const GnomeModuleInfo * (*_libgnome_module_info_get_fn)();
-+typedef GnomeProgram * (*_gnome_program_get_fn)();
-+typedef char * (*_gnome_vfs_make_uri_from_input_fn)(const char *);
-+
-+#define DECL_FUNC_PTR(func) static _##func##_fn _##func
-+
-+DECL_FUNC_PTR(gnome_vfs_mime_application_launch);
-+DECL_FUNC_PTR(gnome_vfs_mime_application_free);
-+DECL_FUNC_PTR(gnome_vfs_mime_application_copy);
-+DECL_FUNC_PTR(gnome_vfs_mime_application_get_name);
-+DECL_FUNC_PTR(gnome_program_init);
-+DECL_FUNC_PTR(gnome_program_get);
-+DECL_FUNC_PTR(libgnome_module_info_get);
-+DECL_FUNC_PTR(gnome_vfs_make_uri_from_input);
-+
-+static PRLibrary *
-+LoadVersionedLibrary(const char* libName, const char* libVersion)
-+{
-+ char *platformLibName = PR_GetLibraryName(nsnull, libName);
-+ nsCAutoString versionLibName(platformLibName);
-+ versionLibName.Append(libVersion);
-+ PR_Free(platformLibName);
-+ return PR_LoadLibrary(versionLibName.get());
-+}
-+
-+static void
-+Cleanup()
-+{
-+ // Unload all libraries
-+ if (gnomeLib)
-+ PR_UnloadLibrary(gnomeLib);
-+ if (vfsLib)
-+ PR_UnloadLibrary(vfsLib);
-+
-+ gnomeLib = vfsLib = nsnull;
-+}
-+
-+static void
-+InitGnomeVFS()
-+{
-+ static PRBool initialized = PR_FALSE;
-+
-+ if (initialized)
-+ return;
-+
-+ #define ENSURE_LIB(lib) \
-+ PR_BEGIN_MACRO \
-+ if (!lib) { \
-+ Cleanup(); \
-+ return; \
-+ } \
-+ PR_END_MACRO
-+
-+ #define GET_LIB_FUNCTION(lib, func, failure) \
-+ PR_BEGIN_MACRO \
-+ _##func = (_##func##_fn) PR_FindFunctionSymbol(lib##Lib, #func); \
-+ if (!_##func) { \
-+ failure; \
-+ } \
-+ PR_END_MACRO
-+
-+ // Attempt to open libgnome
-+ gnomeLib = LoadVersionedLibrary("gnome-2", ".0");
-+ ENSURE_LIB(gnomeLib);
-+
-+ GET_LIB_FUNCTION(gnome, gnome_program_init, return Cleanup());
-+ GET_LIB_FUNCTION(gnome, libgnome_module_info_get, return Cleanup());
-+ GET_LIB_FUNCTION(gnome, gnome_program_get, return Cleanup());
-+
-+ // Attempt to open libgnomevfs
-+ vfsLib = LoadVersionedLibrary("gnomevfs-2", ".0");
-+ ENSURE_LIB(vfsLib);
-+
-+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_launch, /* do nothing */);
-+ GET_LIB_FUNCTION(vfs, gnome_vfs_make_uri_from_input, return Cleanup());
-+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_get_name, return Cleanup());
-+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_free, return Cleanup());
-+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_copy, return Cleanup());
-+
-+ // Initialize GNOME, if it's not already initialized. It's not
-+ // necessary to tell GNOME about our actual command line arguments.
-+
-+ if (!_gnome_program_get()) {
-+ char *argv[1] = { "gecko" };
-+ _gnome_program_init("Gecko", "1.0", _libgnome_module_info_get(),
-+ 1, argv, NULL);
-+ }
-+
-+ // Note: after GNOME has been initialized, do not ever unload these
-+ // libraries. They register atexit handlers, so if they are unloaded, we'll
-+ // crash on exit.
-+}
-+
-+void
-+nsMIMEInfoUnix::SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication* app)
-+{
-+ if (_gnome_vfs_mime_application_copy && _gnome_vfs_mime_application_free) {
-+ mDefaultVFSApplication = _gnome_vfs_mime_application_copy(app);
-+
-+ mPreferredAction = nsIMIMEInfo::useSystemDefault;
-+
-+ const gchar * name = _gnome_vfs_mime_application_get_name(mDefaultVFSApplication);
-+ if (name)
-+ mDefaultAppDescription = NS_ConvertUTF8toUCS2(name);
-+ }
-+}
-+
-+nsMIMEInfoUnix::~nsMIMEInfoUnix()
-+{
-+ if (mDefaultVFSApplication)
-+ _gnome_vfs_mime_application_free(mDefaultVFSApplication);
-+}
-+
-+nsresult
-+nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile* aFile)
-+{
-+ NS_ENSURE_ARG_POINTER(aFile);
-+
-+ InitGnomeVFS();
-+
-+ if (_gnome_vfs_mime_application_launch && mDefaultVFSApplication) {
-+ nsCAutoString nativePath;
-+ aFile->GetNativePath(nativePath);
-+
-+ gchar *uri = _gnome_vfs_make_uri_from_input(nativePath.get());
-+
-+ GList *uris = NULL;
-+ uris = g_list_append(uris, uri);
-+
-+ GnomeVFSResult result = _gnome_vfs_mime_application_launch(mDefaultVFSApplication, uris);
-+
-+ g_free(uri);
-+ g_list_free(uris);
-+
-+ if (result != GNOME_VFS_OK)
-+ return NS_ERROR_FAILURE;
-+
-+ return NS_OK;
-+ }
-+
-+ if (!mDefaultApplication)
-+ return NS_ERROR_FILE_NOT_FOUND;
-+
-+ return LaunchWithIProcess(mDefaultApplication, aFile);
-+}
-Index: uriloader/exthandler/unix/nsMIMEInfoUnix.h
-===================================================================
-RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.h
-diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.h
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ uriloader/exthandler/unix/nsMIMEInfoUnix.h 21 Jul 2005 03:07:40 -0000
-@@ -0,0 +1,50 @@
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is mozilla.org Code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Red Hat, Inc.
-+ * Portions created by the Initial Developer are Copyright (C) 2005
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ * Christopher Aillon <caillon@redhat.com> (Original author)
-+ *
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+#ifndef nsMimeInfoUnix_h__
-+#define nsMimeInfoUnix_h__
-+
-+#include "nsMIMEInfoImpl.h"
-+
-+struct GnomeVFSMimeApplication;
-+
-+class nsMIMEInfoUnix : public nsMIMEInfoImpl
-+{
-+public:
-+ nsMIMEInfoUnix(const char* aType = "") : nsMIMEInfoImpl(aType), mDefaultVFSApplication(nsnull) {}
-+ nsMIMEInfoUnix(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) {};
-+
-+ virtual ~nsMIMEInfoUnix();
-+
-+ void SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication *app);
-+
-+protected:
-+ virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile* aFile);
-+
-+ GnomeVFSMimeApplication *mDefaultVFSApplication;
-+};
-+
-+#endif // nsMimeInfoUnix_h__
-Index: uriloader/exthandler/unix/nsOSHelperAppService.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp,v
-retrieving revision 1.58
-diff -d -u -p -r1.58 nsOSHelperAppService.cpp
---- uriloader/exthandler/unix/nsOSHelperAppService.cpp 25 Oct 2004 07:46:01 -0000 1.58
-+++ uriloader/exthandler/unix/nsOSHelperAppService.cpp 21 Jul 2005 03:07:40 -0000
-@@ -44,6 +44,7 @@
- #include "nsOSHelperAppService.h"
- #ifdef MOZ_WIDGET_GTK2
- #include "nsGNOMERegistry.h"
-+#include "nsMIMEInfoUnix.h"
- #endif
- #include "nsISupports.h"
- #include "nsString.h"
+++ /dev/null
-Index: uriloader/exthandler/Makefile.in
-===================================================================
-RCS file: /cvsroot/mozilla/uriloader/exthandler/Makefile.in,v
-retrieving revision 1.60
-diff -d -u -p -r1.60 Makefile.in
---- uriloader/exthandler/Makefile.in 2 May 2005 16:30:03 -0000 1.60
-+++ uriloader/exthandler/Makefile.in 21 Jul 2005 03:07:39 -0000
-@@ -102,7 +102,7 @@ endif
- LOCAL_INCLUDES = -I$(srcdir)
-
- ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
--OSHELPER += nsGNOMERegistry.cpp
-+OSHELPER += nsMIMEInfoUnix.cpp nsGNOMERegistry.cpp
- endif
-
- ifeq ($(MOZ_WIDGET_TOOLKIT),beos)
-Index: uriloader/exthandler/unix/nsGNOMERegistry.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.cpp,v
-retrieving revision 1.10
-diff -d -u -p -r1.10 nsGNOMERegistry.cpp
---- uriloader/exthandler/unix/nsGNOMERegistry.cpp 16 Oct 2004 13:46:17 -0000 1.10
-+++ uriloader/exthandler/unix/nsGNOMERegistry.cpp 21 Jul 2005 03:07:40 -0000
-@@ -42,7 +42,7 @@
- #include "nsString.h"
- #include "nsIComponentManager.h"
- #include "nsILocalFile.h"
--#include "nsMIMEInfoImpl.h"
-+#include "nsMIMEInfoUnix.h"
- #include "nsAutoPtr.h"
-
- #include <glib.h>
-@@ -56,12 +56,12 @@ typedef struct _GConfClient GConfClient;
- typedef struct _GnomeProgram GnomeProgram;
- typedef struct _GnomeModuleInfo GnomeModuleInfo;
-
--typedef struct {
-+struct GnomeVFSMimeApplication {
- char *id;
- char *name;
- char *command;
- /* there is more here, but we don't need it */
--} GnomeVFSMimeApplication;
-+};
-
- typedef GConfClient * (*_gconf_client_get_default_fn)();
- typedef gchar * (*_gconf_client_get_string_fn)(GConfClient *,
-@@ -264,7 +264,7 @@ nsGNOMERegistry::GetAppDescForScheme(con
- }
-
-
--/* static */ already_AddRefed<nsMIMEInfoBase>
-+/* static */ already_AddRefed<nsMIMEInfoUnix>
- nsGNOMERegistry::GetFromExtension(const char *aFileExt)
- {
- if (!gconfLib)
-@@ -286,7 +286,7 @@ nsGNOMERegistry::GetFromExtension(const
- return GetFromType(mimeType);
- }
-
--/* static */ already_AddRefed<nsMIMEInfoBase>
-+/* static */ already_AddRefed<nsMIMEInfoUnix>
- nsGNOMERegistry::GetFromType(const char *aMIMEType)
- {
- if (!gconfLib)
-@@ -296,9 +296,11 @@ nsGNOMERegistry::GetFromType(const char
- if (!handlerApp)
- return nsnull;
-
-- nsRefPtr<nsMIMEInfoImpl> mimeInfo = new nsMIMEInfoImpl(aMIMEType);
-+ nsRefPtr<nsMIMEInfoUnix> mimeInfo = new nsMIMEInfoUnix(aMIMEType);
- NS_ENSURE_TRUE(mimeInfo, nsnull);
-
-+ mimeInfo->SetDefaultGnomeVFSMimeApplication(handlerApp);
-+
- // Get the list of extensions and append then to the mimeInfo.
- GList *extensions = _gnome_vfs_mime_get_extensions_list(aMIMEType);
- for (GList *extension = extensions; extension; extension = extension->next)
-@@ -320,11 +322,21 @@ nsGNOMERegistry::GetFromType(const char
- return nsnull;
- }
-
-- gchar *commandPath = g_find_program_in_path(nativeCommand);
-+ gchar **argv;
-+ gboolean res = g_shell_parse_argv(nativeCommand, NULL, &argv, NULL);
-+ if (!res) {
-+ NS_ERROR("Could not convert helper app command to filesystem encoding");
-+ _gnome_vfs_mime_application_free(handlerApp);
-+ return nsnull;
-+ }
-+
-+ gchar *commandPath = g_find_program_in_path(argv[0]);
-
- g_free(nativeCommand);
-+ g_strfreev(argv);
-
- if (!commandPath) {
-+ NS_WARNING("could not find command in path");
- _gnome_vfs_mime_application_free(handlerApp);
- return nsnull;
- }
-@@ -342,7 +354,7 @@ nsGNOMERegistry::GetFromType(const char
-
- _gnome_vfs_mime_application_free(handlerApp);
-
-- nsMIMEInfoBase* retval;
-+ nsMIMEInfoUnix* retval;
- NS_ADDREF((retval = mimeInfo));
- return retval;
- }
-Index: uriloader/exthandler/unix/nsGNOMERegistry.h
-===================================================================
-RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsGNOMERegistry.h,v
-retrieving revision 1.3
-diff -d -u -p -r1.3 nsGNOMERegistry.h
---- uriloader/exthandler/unix/nsGNOMERegistry.h 16 Oct 2004 13:46:17 -0000 1.3
-+++ uriloader/exthandler/unix/nsGNOMERegistry.h 21 Jul 2005 03:07:40 -0000
-@@ -35,10 +35,13 @@
- *
- * ***** END LICENSE BLOCK ***** */
-
-+#ifndef nsGNOMERegistry_h__
-+#define nsGNOMERegistry_h__
-+
- #include "nsIURI.h"
- #include "nsCOMPtr.h"
-
--class nsMIMEInfoBase;
-+class nsMIMEInfoUnix;
-
- class nsGNOMERegistry
- {
-@@ -52,7 +55,9 @@ class nsGNOMERegistry
- static void GetAppDescForScheme(const nsACString& aScheme,
- nsAString& aDesc);
-
-- static already_AddRefed<nsMIMEInfoBase> GetFromExtension(const char *aFileExt);
-+ static already_AddRefed<nsMIMEInfoUnix> GetFromExtension(const char *aFileExt);
-
-- static already_AddRefed<nsMIMEInfoBase> GetFromType(const char *aMIMEType);
-+ static already_AddRefed<nsMIMEInfoUnix> GetFromType(const char *aMIMEType);
- };
-+
-+#endif // nsGNOMERegistry_h__
-Index: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
-===================================================================
-RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
-diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.cpp
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ uriloader/exthandler/unix/nsMIMEInfoUnix.cpp 21 Jul 2005 03:07:40 -0000
-@@ -0,0 +1,196 @@
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is mozilla.org Code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Red Hat, Inc.
-+ * Portions created by the Initial Developer are Copyright (C) 2005
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ * Christopher Aillon <caillon@redhat.com> (Original author)
-+ *
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+#include "nsMIMEInfoUnix.h"
-+#include "prlink.h"
-+#include "prmem.h"
-+#include <glib.h>
-+#include <glib-object.h>
-+
-+static PRLibrary *gnomeLib;
-+static PRLibrary *vfsLib;
-+
-+typedef struct _GnomeProgram GnomeProgram;
-+typedef struct _GnomeModuleInfo GnomeModuleInfo;
-+
-+typedef enum {
-+ GNOME_VFS_OK // there's more but we don't care about them.
-+} GnomeVFSResult;
-+
-+typedef GnomeVFSResult (*_gnome_vfs_mime_application_launch_fn)
-+ (GnomeVFSMimeApplication *app,
-+ GList *uris);
-+typedef void (*_gnome_vfs_mime_application_free_fn)(GnomeVFSMimeApplication *);
-+typedef GnomeVFSMimeApplication * (*_gnome_vfs_mime_application_copy_fn)(GnomeVFSMimeApplication *);
-+typedef GnomeProgram * (*_gnome_program_init_fn)(const char *, const char *,
-+ const GnomeModuleInfo *, int,
-+ char **, const char *, ...);
-+typedef const char * (*_gnome_vfs_mime_application_get_name_fn)(GnomeVFSMimeApplication *);
-+typedef const GnomeModuleInfo * (*_libgnome_module_info_get_fn)();
-+typedef GnomeProgram * (*_gnome_program_get_fn)();
-+typedef char * (*_gnome_vfs_make_uri_from_input_fn)(const char *);
-+
-+#define DECL_FUNC_PTR(func) static _##func##_fn _##func
-+
-+DECL_FUNC_PTR(gnome_vfs_mime_application_launch);
-+DECL_FUNC_PTR(gnome_vfs_mime_application_free);
-+DECL_FUNC_PTR(gnome_vfs_mime_application_copy);
-+DECL_FUNC_PTR(gnome_vfs_mime_application_get_name);
-+DECL_FUNC_PTR(gnome_program_init);
-+DECL_FUNC_PTR(gnome_program_get);
-+DECL_FUNC_PTR(libgnome_module_info_get);
-+DECL_FUNC_PTR(gnome_vfs_make_uri_from_input);
-+
-+static PRLibrary *
-+LoadVersionedLibrary(const char* libName, const char* libVersion)
-+{
-+ char *platformLibName = PR_GetLibraryName(nsnull, libName);
-+ nsCAutoString versionLibName(platformLibName);
-+ versionLibName.Append(libVersion);
-+ PR_Free(platformLibName);
-+ return PR_LoadLibrary(versionLibName.get());
-+}
-+
-+static void
-+Cleanup()
-+{
-+ // Unload all libraries
-+ if (gnomeLib)
-+ PR_UnloadLibrary(gnomeLib);
-+ if (vfsLib)
-+ PR_UnloadLibrary(vfsLib);
-+
-+ gnomeLib = vfsLib = nsnull;
-+}
-+
-+static void
-+InitGnomeVFS()
-+{
-+ static PRBool initialized = PR_FALSE;
-+
-+ if (initialized)
-+ return;
-+
-+ #define ENSURE_LIB(lib) \
-+ PR_BEGIN_MACRO \
-+ if (!lib) { \
-+ Cleanup(); \
-+ return; \
-+ } \
-+ PR_END_MACRO
-+
-+ #define GET_LIB_FUNCTION(lib, func, failure) \
-+ PR_BEGIN_MACRO \
-+ _##func = (_##func##_fn) PR_FindFunctionSymbol(lib##Lib, #func); \
-+ if (!_##func) { \
-+ failure; \
-+ } \
-+ PR_END_MACRO
-+
-+ // Attempt to open libgnome
-+ gnomeLib = LoadVersionedLibrary("gnome-2", ".0");
-+ ENSURE_LIB(gnomeLib);
-+
-+ GET_LIB_FUNCTION(gnome, gnome_program_init, return Cleanup());
-+ GET_LIB_FUNCTION(gnome, libgnome_module_info_get, return Cleanup());
-+ GET_LIB_FUNCTION(gnome, gnome_program_get, return Cleanup());
-+
-+ // Attempt to open libgnomevfs
-+ vfsLib = LoadVersionedLibrary("gnomevfs-2", ".0");
-+ ENSURE_LIB(vfsLib);
-+
-+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_launch, /* do nothing */);
-+ GET_LIB_FUNCTION(vfs, gnome_vfs_make_uri_from_input, return Cleanup());
-+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_get_name, return Cleanup());
-+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_free, return Cleanup());
-+ GET_LIB_FUNCTION(vfs, gnome_vfs_mime_application_copy, return Cleanup());
-+
-+ // Initialize GNOME, if it's not already initialized. It's not
-+ // necessary to tell GNOME about our actual command line arguments.
-+
-+ if (!_gnome_program_get()) {
-+ char *argv[1] = { "gecko" };
-+ _gnome_program_init("Gecko", "1.0", _libgnome_module_info_get(),
-+ 1, argv, NULL);
-+ }
-+
-+ // Note: after GNOME has been initialized, do not ever unload these
-+ // libraries. They register atexit handlers, so if they are unloaded, we'll
-+ // crash on exit.
-+}
-+
-+void
-+nsMIMEInfoUnix::SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication* app)
-+{
-+ if (_gnome_vfs_mime_application_copy && _gnome_vfs_mime_application_free) {
-+ mDefaultVFSApplication = _gnome_vfs_mime_application_copy(app);
-+
-+ mPreferredAction = nsIMIMEInfo::useSystemDefault;
-+
-+ const gchar * name = _gnome_vfs_mime_application_get_name(mDefaultVFSApplication);
-+ if (name)
-+ mDefaultAppDescription = NS_ConvertUTF8toUCS2(name);
-+ }
-+}
-+
-+nsMIMEInfoUnix::~nsMIMEInfoUnix()
-+{
-+ if (mDefaultVFSApplication)
-+ _gnome_vfs_mime_application_free(mDefaultVFSApplication);
-+}
-+
-+nsresult
-+nsMIMEInfoUnix::LaunchDefaultWithFile(nsIFile* aFile)
-+{
-+ NS_ENSURE_ARG_POINTER(aFile);
-+
-+ InitGnomeVFS();
-+
-+ if (_gnome_vfs_mime_application_launch && mDefaultVFSApplication) {
-+ nsCAutoString nativePath;
-+ aFile->GetNativePath(nativePath);
-+
-+ gchar *uri = _gnome_vfs_make_uri_from_input(nativePath.get());
-+
-+ GList *uris = NULL;
-+ uris = g_list_append(uris, uri);
-+
-+ GnomeVFSResult result = _gnome_vfs_mime_application_launch(mDefaultVFSApplication, uris);
-+
-+ g_free(uri);
-+ g_list_free(uris);
-+
-+ if (result != GNOME_VFS_OK)
-+ return NS_ERROR_FAILURE;
-+
-+ return NS_OK;
-+ }
-+
-+ if (!mDefaultApplication)
-+ return NS_ERROR_FILE_NOT_FOUND;
-+
-+ return LaunchWithIProcess(mDefaultApplication, aFile);
-+}
-Index: uriloader/exthandler/unix/nsMIMEInfoUnix.h
-===================================================================
-RCS file: uriloader/exthandler/unix/nsMIMEInfoUnix.h
-diff -N uriloader/exthandler/unix/nsMIMEInfoUnix.h
---- /dev/null 1 Jan 1970 00:00:00 -0000
-+++ uriloader/exthandler/unix/nsMIMEInfoUnix.h 21 Jul 2005 03:07:40 -0000
-@@ -0,0 +1,50 @@
-+/* ***** BEGIN LICENSE BLOCK *****
-+ * Version: MPL 1.1
-+ *
-+ * The contents of this file are subject to the Mozilla Public License Version
-+ * 1.1 (the "License"); you may not use this file except in compliance with
-+ * the License. You may obtain a copy of the License at
-+ * http://www.mozilla.org/MPL/
-+ *
-+ * Software distributed under the License is distributed on an "AS IS" basis,
-+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-+ * for the specific language governing rights and limitations under the
-+ * License.
-+ *
-+ * The Original Code is mozilla.org Code.
-+ *
-+ * The Initial Developer of the Original Code is
-+ * Red Hat, Inc.
-+ * Portions created by the Initial Developer are Copyright (C) 2005
-+ * the Initial Developer. All Rights Reserved.
-+ *
-+ * Contributor(s):
-+ * Christopher Aillon <caillon@redhat.com> (Original author)
-+ *
-+ *
-+ * ***** END LICENSE BLOCK ***** */
-+
-+#ifndef nsMimeInfoUnix_h__
-+#define nsMimeInfoUnix_h__
-+
-+#include "nsMIMEInfoImpl.h"
-+
-+struct GnomeVFSMimeApplication;
-+
-+class nsMIMEInfoUnix : public nsMIMEInfoImpl
-+{
-+public:
-+ nsMIMEInfoUnix(const char* aType = "") : nsMIMEInfoImpl(aType), mDefaultVFSApplication(nsnull) {}
-+ nsMIMEInfoUnix(const nsACString& aMIMEType) : nsMIMEInfoImpl(aMIMEType) {};
-+
-+ virtual ~nsMIMEInfoUnix();
-+
-+ void SetDefaultGnomeVFSMimeApplication(GnomeVFSMimeApplication *app);
-+
-+protected:
-+ virtual NS_HIDDEN_(nsresult) LaunchDefaultWithFile(nsIFile* aFile);
-+
-+ GnomeVFSMimeApplication *mDefaultVFSApplication;
-+};
-+
-+#endif // nsMimeInfoUnix_h__
-Index: uriloader/exthandler/unix/nsOSHelperAppService.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/uriloader/exthandler/unix/nsOSHelperAppService.cpp,v
-retrieving revision 1.58
-diff -d -u -p -r1.58 nsOSHelperAppService.cpp
---- uriloader/exthandler/unix/nsOSHelperAppService.cpp 25 Oct 2004 07:46:01 -0000 1.58
-+++ uriloader/exthandler/unix/nsOSHelperAppService.cpp 21 Jul 2005 03:07:40 -0000
-@@ -44,6 +44,7 @@
- #include "nsOSHelperAppService.h"
- #ifdef MOZ_WIDGET_GTK2
- #include "nsGNOMERegistry.h"
-+#include "nsMIMEInfoUnix.h"
- #endif
- #include "nsISupports.h"
- #include "nsString.h"
-@@ -1486,6 +1487,17 @@ nsOSHelperAppService::GetFromType(const
-
- LOG(("Here we do a mimetype lookup for '%s'\n", aMIMEType.get()));
-
-+#ifdef MOZ_WIDGET_GTK2
-+ // Look in GNOME registry first since it is the preferred method in GNOME,
-+ // should trump the mailcap entry
-+ LOG(("Looking in GNOME registry\n"));
-+ nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
-+ if (gnomeInfo) {
-+ LOG(("Got MIMEInfo from GNOME registry\n"));
-+ return gnomeInfo;
-+ }
-+#endif
-+
- // extract the major and minor types
- NS_ConvertASCIItoUTF16 mimeType(aMIMEType);
- nsAString::const_iterator start_iter, end_iter,
-@@ -1522,21 +1534,6 @@ nsOSHelperAppService::GetFromType(const
- mozillaFlags,
- PR_TRUE);
-
--
-- if (handler.IsEmpty() && extensions.IsEmpty() &&
-- mailcap_description.IsEmpty() && mime_types_description.IsEmpty()) {
-- // No useful data yet
--
--#ifdef MOZ_WIDGET_GTK2
-- LOG(("Looking in GNOME registry\n"));
-- nsMIMEInfoBase *gnomeInfo = nsGNOMERegistry::GetFromType(aMIMEType.get()).get();
-- if (gnomeInfo) {
-- LOG(("Got MIMEInfo from GNOME registry\n"));
-- return gnomeInfo;
-- }
--#endif
-- }
--
- if (handler.IsEmpty() && mailcap_description.IsEmpty()) {
- DoLookUpHandlerAndDescription(majorType,
- minorType,
+++ /dev/null
-Index: configure
-===================================================================
-RCS file: /cvsroot/mozilla/configure,v
-retrieving revision 1.1443
-diff -u -p -6 -r1.1443 configure
---- configure 2 Jun 2005 04:00:20 -0000 1.1443
-+++ configure 6 Jun 2005 07:34:06 -0000
-@@ -7303,13 +7303,13 @@ else
- int foo_default = 1;
- EOF
- ac_cv_visibility_pragma=no
- if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
- if grep '\.hidden.*foo_hidden' conftest.s >/dev/null; then
- if ! grep '\.hidden.*foo_default' conftest.s > /dev/null; then
-- ac_cv_visibility_pragma=yes
-+ ac_cv_visibility_pragma=no
- fi
- fi
- fi
- rm -f conftest.cs
-
- fi
+++ /dev/null
-diff -Nur mozilla/configure.in mozilla.bug307168/configure.in
---- mozilla/configure.in 2005-10-04 05:53:49.000000000 +0000
-+++ mozilla.bug307168/configure.in 2005-12-06 16:42:46.000000000 +0000
-@@ -1036,9 +1036,9 @@
- dnl GNU specific defaults
- dnl ========================================================
- if test "$GNU_CC"; then
-- MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
-- MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
-- DSO_LDOPTS='-shared -Wl,-h -Wl,$@'
-+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
-+ MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
-+ DSO_LDOPTS='-shared'
- DSO_CFLAGS=''
- DSO_PIC_CFLAGS='-fPIC'
- _MOZ_RTTI_FLAGS_ON=${_COMPILER_PREFIX}-frtti
-@@ -1063,9 +1063,9 @@
- _DEFINES_CFLAGS='-include $(DEPTH)/mozilla-config.h -DMOZILLA_CLIENT'
- _USE_CPP_INCLUDE_FLAG=1
- else
-- MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
-- MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
-- DSO_LDOPTS='-shared -h $@'
-+ MKSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@'
-+ MKCSHLIB='$(LD) $(DSO_LDOPTS) -h $@ -o $@'
-+ DSO_LDOPTS='-shared'
- DSO_CFLAGS=''
- DSO_PIC_CFLAGS='-KPIC'
- _DEFINES_CFLAGS='$(ACDEFINES) -D_MOZILLA_CONFIG_H_ -DMOZILLA_CLIENT'
-@@ -1292,9 +1292,9 @@
-
- *-beos*)
- no_x=yes
-- MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
-+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -Wl,-h,$@ -o $@'
- _PLATFORM_DEFAULT_TOOLKIT="beos"
-- DSO_LDOPTS='-nostart -Wl,-h -Wl,$@'
-+ DSO_LDOPTS='-nostart'
- TK_LIBS='-lbe -lroot'
- LIBS="$LIBS -lbe"
- if test "$COMPILE_ENVIRONMENT"; then
-@@ -1379,16 +1379,16 @@
- *-hpux*)
- DLL_SUFFIX=".sl"
- if test ! "$GNU_CC"; then
-- DSO_LDOPTS='-b -Wl,+s -L$(DIST)/bin'
-+ DSO_LDOPTS='-b -Wl,+s'
- DSO_CFLAGS=""
- DSO_PIC_CFLAGS="+Z"
-- MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -o $@'
-+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_LDOPTS) -L$(DIST)/bin -o $@'
- MKCSHLIB='$(LD) -b +s -L$(DIST)/bin -o $@'
- CXXFLAGS="$CXXFLAGS -Wc,-ansi_for_scope,on"
- else
-- DSO_LDOPTS='-b -E +s -L$(DIST)/bin -L$(DIST)/lib'
-- MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
-- MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
-+ DSO_LDOPTS='-b -E +s'
-+ MKSHLIB='$(LD) $(DSO_LDOPTS) -L$(DIST)/bin -L$(DIST)/lib -o $@'
-+ MKCSHLIB='$(LD) $(DSO_LDOPTS) -L$(DIST)/bin -L$(DIST)/lib -o $@'
- fi
- MOZ_POST_PROGRAM_COMMAND='chatr +s enable'
- AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
-@@ -1397,11 +1397,16 @@
- *-irix5*)
- AC_DEFINE(IRIX)
- DSO_LDOPTS='-elf -shared'
-+
- if test "$GNU_CC"; then
-+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
-+ MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
- MKSHLIB_FORCE_ALL='-Wl,-all'
- MKSHLIB_UNFORCE_ALL='-Wl,-none'
- CXXFLAGS="$CXXFLAGS -D_LANGUAGE_C_PLUS_PLUS"
- else
-+ MKSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
-+ MKCSHLIB='$(LD) $(DSO_LDOPTS) -o $@'
- MKSHLIB_FORCE_ALL='-all'
- MKSHLIB_UNFORCE_ALL='-none'
- fi
-@@ -1755,7 +1760,7 @@
- if $CC -E - -dM </dev/null | grep __ELF__ >/dev/null; then
- DLL_SUFFIX=".so"
- DSO_PIC_CFLAGS='-fPIC -DPIC'
-- DSO_LDOPTS='-shared -Wl,-soname,lib$(LIBRARY_NAME)$(DLL_SUFFIX)'
-+ DSO_LDOPTS='-shared'
- BIN_FLAGS='-Wl,--export-dynamic'
- else
- DSO_PIC_CFLAGS='-fPIC -DPIC'
-@@ -1768,6 +1773,8 @@
- if test "$LIBRUNPATH"; then
- DSO_LDOPTS="-Wl,-R$LIBRUNPATH $DSO_LDOPTS"
- fi
-+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,lib$(LIBRARY_NAME)$(DLL_SUFFIX) -o $@'
-+ MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,lib$(LIBRARY_NAME)$(DLL_SUFFIX) -o $@'
- ;;
-
- *-nto*)
-@@ -1931,17 +1938,19 @@
-
- alpha*-*-osf*)
- if test "$GNU_CC"; then
-- DSO_LDOPTS='-shared -Wl,-soname -Wl,$@'
-+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$@ -o $@'
-+ MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-soname,$@ -o $@'
-+
- else
- MOZ_DEBUG_FLAGS='-g'
- ASFLAGS='-I$(topsrcdir)/xpcom/reflect/xptcall/public -g'
- CFLAGS="$CFLAGS -ieee"
- CXXFLAGS="$CXXFLAGS "'-noexceptions -ieee -ptr $(DIST)/cxx_repository'
-- DSO_LDOPTS='-shared -msym -expect_unresolved \* -soname $@ -update_registry $(DIST)/so_locations'
-+ DSO_LDOPTS='-shared -msym -expect_unresolved \* -update_registry $(DIST)/so_locations'
- DSO_CFLAGS=
- DSO_PIC_CFLAGS=
-- MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
-- MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -o $@'
-+ MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -soname $@ -o $@'
-+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -soname $@ -o $@'
- MKSHLIB_FORCE_ALL='-all'
- MKSHLIB_UNFORCE_ALL='-none'
- dnl Might fix the libxpcom.so breakage on this platform as well....
-@@ -1973,7 +1982,7 @@
- AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
- CXXFLAGS="$CXXFLAGS -I/usr/include/CC"
- if test ! "$GNU_CC"; then
-- DSO_LDOPTS='-G -h $@'
-+ DSO_LDOPTS='-G'
- fi
- ;;
-
-@@ -1989,11 +1998,11 @@
- CXXFLAGS="$CXXFLAGS -xbuiltin=%all -features=tmplife"
- LDFLAGS="-xildoff -zlazyload -zcombreloc $LDFLAGS"
- MOZ_OPTIMIZE_FLAGS="-xO4"
-- MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -o $@'
-- MKCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) -G -Wl,-z -Wl,muldefs -o $@'
-+ MKSHLIB='$(CXX) $(CXXFLAGS) $(DSO_PIC_FLAGS) $(DSO_LDOPTS) -h $@ -o $@'
-+ KCSHLIB='$(CC) $(CFLAGS) $(DSO_PIC_FLAGS) -G -Wl,-z -Wl,muldefs -h $@ -o $@'
- MKSHLIB_FORCE_ALL='-Qoption ld -z,allextract'
- MKSHLIB_UNFORCE_ALL=''
-- DSO_LDOPTS='-G -Qoption ld -z,muldefs -h $@'
-+ DSO_LDOPTS='-G -Qoption ld -z,muldefs'
- AR_LIST="$AR t"
- AR_EXTRACT="$AR x"
- AR_DELETE="$AR d"
-@@ -2019,7 +2028,7 @@
- AC_MSG_RESULT([$_res])
- else
- ASFLAGS="$ASFLAGS -fPIC"
-- DSO_LDOPTS='-G -h $@'
-+ DSO_LDOPTS='-G'
- _WARNINGS_CFLAGS=''
- _WARNINGS_CXXFLAGS=''
- if test "$OS_RELEASE" = "5.3"; then
-@@ -2378,8 +2387,25 @@
- fi
- rm -f conftest.[cs]
- ])
-- if test "$ac_cv_visibility_hidden" = "yes"; then
-- AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
-+ if test "$ac_cv_visibility_hidden" = "yes"; then
-+ AC_DEFINE(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE)
-+
-+ AC_CACHE_CHECK(for visibility(default) attribute,
-+ ac_cv_visibility_default,
-+ [cat > conftest.c <<EOF
-+ int foo __attribute__ ((visibility ("default"))) = 1;
-+EOF
-+ ac_cv_visibility_default=no
-+ if ${CC-cc} -fvisibility=hidden -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
-+ if ! grep '\.hidden.*foo' conftest.s >/dev/null; then
-+ ac_cv_visibility_default=yes
-+ fi
-+ fi
-+ rm -f conftest.[cs]
-+ ])
-+ if test "$ac_cv_visibility_default" = "yes"; then
-+ AC_DEFINE(HAVE_VISIBILITY_ATTRIBUTE)
-+
- AC_CACHE_CHECK(for visibility pragma support,
- ac_cv_visibility_pragma,
- [cat > conftest.c <<EOF
-@@ -2399,12 +2425,35 @@
- rm -f conftest.[cs]
- ])
- if test "$ac_cv_visibility_pragma" = "yes"; then
-- AC_DEFINE(HAVE_VISIBILITY_PRAGMA)
-- VISIBILITY_FLAGS='-I$(DIST)/include/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
-- WRAP_SYSTEM_INCLUDES=1
-- fi
-- fi
--fi # GNU_CC
-+ AC_CACHE_CHECK(For x86_64 gcc visibility bug with builtins (GCC bug 20297),
-+ ac_cv_have_visibility_builtin_bug,
-+ [cat > conftest.c <<EOF
-+#pragma GCC visibility push(hidden)
-+#pragma GCC visibility push(default)
-+#include <string.h>
-+#pragma GCC visibility pop
-+
-+__attribute__ ((visibility ("default"))) void Func() {
-+ char c[[100]];
-+ memset(c, 0, sizeof(c));
-+}
-+EOF
-+ ac_cv_have_visibility_builtin_bug=no
-+ if ! ${CC-cc} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -o conftest.so conftest.c >/dev/null 2>&1; then
-+ ac_cv_have_visibility_builtin_bug=yes
-+ fi
-+ rm -f conftest.{c,so}
-+ ])
-+ if test "$ac_cv_have_visibility_builtin_bug" = "no"; then
-+ VISIBILITY_FLAGS='-I$(DIST)/include/system_wrappers -include $(topsrcdir)/config/gcc_hidden.h'
-+ WRAP_SYSTEM_INCLUDES=1
-+ else
-+ VISIBILITY_FLAGS='-fvisibility=hidden -fvisibility-inlines-hidden'
-+ fi # have visibility pragma bug
-+ fi # have visibility pragma
-+ fi # have visibility(default) attribute
-+ fi # have visibility(hidden) attribute
-+fi # GNU_CC
-
- AC_SUBST(WRAP_SYSTEM_INCLUDES)
- AC_SUBST(VISIBILITY_FLAGS)
-diff -Nur mozilla/js/src/jstypes.h mozilla.bug307168/js/src/jstypes.h
---- mozilla/js/src/jstypes.h 2005-09-18 04:35:05.000000000 +0000
-+++ mozilla.bug307168/js/src/jstypes.h 2005-12-06 16:35:57.000000000 +0000
-@@ -109,7 +109,7 @@
-
- #else /* Unix */
-
--#ifdef HAVE_VISIBILITY_PRAGMA
-+#ifdef HAVE_VISIBILITY_ATTRIBUTE
- #define JS_EXTERNAL_VIS __attribute__((visibility ("default")))
- #else
- #define JS_EXTERNAL_VIS
-diff -Nur mozilla/modules/libreg/include/NSReg.h mozilla.bug307168/modules/libreg/include/NSReg.h
---- mozilla/modules/libreg/include/NSReg.h 2004-12-15 05:52:38.000000000 +0000
-+++ mozilla.bug307168/modules/libreg/include/NSReg.h 2005-12-06 16:35:57.000000000 +0000
-@@ -129,7 +129,7 @@
- #endif
- #elif defined XP_MAC
- #define VR_INTERFACE(__x) __declspec(export) __x
--#elif defined (HAVE_VISIBILITY_PRAGMA)
-+#elif defined (HAVE_VISIBILITY_ATTRIBUTE)
- #define VR_INTERFACE(type) __attribute__ ((visibility ("default"))) type
- #else
- #define VR_INTERFACE(type) type
-diff -Nur mozilla/modules/zlib/src/mozzconf.h mozilla.bug307168/modules/zlib/src/mozzconf.h
---- mozilla/modules/zlib/src/mozzconf.h 2005-08-04 19:14:14.000000000 +0000
-+++ mozilla.bug307168/modules/zlib/src/mozzconf.h 2005-12-06 16:35:57.000000000 +0000
-@@ -41,7 +41,7 @@
- #undef ZLIB_DLL
- #endif
-
--#ifdef HAVE_VISIBILITY_PRAGMA
-+#ifdef HAVE_VISIBILITY_ATTRIBUTE
- #define ZEXTERN __attribute__((visibility ("default"))) extern
- #endif
-
-diff -Nur mozilla/xpcom/base/nscore.h mozilla.bug307168/xpcom/base/nscore.h
---- mozilla/xpcom/base/nscore.h 2005-07-21 22:15:00.000000000 +0000
-+++ mozilla.bug307168/xpcom/base/nscore.h 2005-12-06 16:35:57.000000000 +0000
-@@ -105,7 +105,7 @@
- #define NS_VISIBILITY_HIDDEN
- #endif
-
--#if defined(HAVE_VISIBILITY_HIDDEN_ATTRIBUTE) && defined(HAVE_VISIBILITY_PRAGMA)
-+#if defined(HAVE_VISIBILITY_ATTRIBUTE)
- #define NS_VISIBILITY_DEFAULT __attribute__ ((visibility ("default")))
- #else
- #define NS_VISIBILITY_DEFAULT
+++ /dev/null
-diff -u -r3.30 -r3.31
---- nsprpub/pr/include/prtypes.h 29 Apr 2005 21:02:54 -0000 3.30
-+++ nsprpub/pr/include/prtypes.h 13 Oct 2005 17:43:36 -0000 3.31
-@@ -178,7 +178,9 @@
-
- #else /* Unix */
-
--#ifdef HAVE_VISIBILITY_PRAGMA
-+/* GCC 3.3 and later support the visibility attribute. */
-+#if (__GNUC__ >= 4) || \
-+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
- #define PR_VISIBILITY_DEFAULT __attribute__((visibility("default")))
- #else
- #define PR_VISIBILITY_DEFAULT
-
+++ /dev/null
-diff -aur a/gfx/src/gtk/nsFontMetricsPango.cpp b/gfx/src/gtk/nsFontMetricsPango.cpp
---- a/gfx/src/gtk/nsFontMetricsPango.cpp 2006-02-23 13:01:42.000000000 -0800
-+++ b/gfx/src/gtk/nsFontMetricsPango.cpp 2006-05-20 20:27:50.000000000 -0700
-@@ -535,8 +535,13 @@
-
- PangoLayout *layout = pango_layout_new(mPangoContext);
-
-- gchar *text = g_utf16_to_utf8(aString, aLength,
-+ // Just copy the aString to ensure the alignment,
-+ // it is not used anywhere else.
-+ PRUnichar* dummy = new PRUnichar[aLength];
-+ memcpy(dummy, aString, aLength*sizeof(PRUnichar));
-+ gchar *text = g_utf16_to_utf8(dummy, aLength,
- NULL, NULL, NULL);
-+ delete [] dummy;
-
- if (!text) {
- #ifdef DEBUG
-diff -aur a/intl/lwbrk/src/nsJISx4501LineBreaker.cpp b/intl/lwbrk/src/nsJISx4501LineBreaker.cpp
---- a/intl/lwbrk/src/nsJISx4501LineBreaker.cpp 2004-04-18 07:21:07.000000000 -0700
-+++ b/intl/lwbrk/src/nsJISx4501LineBreaker.cpp 2006-05-20 20:27:51.000000000 -0700
-@@ -487,13 +487,13 @@
- PRUint32 cur;
- for (cur = aPos; cur < aLen; ++cur)
- {
-- if (IS_SPACE(aText[cur]))
-+ if (IS_SPACE(GetUnichar(&aText[cur])))
- {
- *oNext = cur;
- *oNeedMoreText = PR_FALSE;
- return NS_OK;
- }
-- if (IS_CJK_CHAR(aText[cur]))
-+ if (IS_CJK_CHAR(GetUnichar(&aText[cur])))
- goto ROUTE_CJK_NEXT;
- }
- *oNext = aLen;
-@@ -503,13 +503,13 @@
- ROUTE_CJK_NEXT:
- PRInt8 c1, c2;
- cur = aPos;
-- if(NEED_CONTEXTUAL_ANALYSIS(aText[cur]))
-+ if(NEED_CONTEXTUAL_ANALYSIS(GetUnichar(&aText[cur])))
- {
-- c1 = this->ContextualAnalysis((cur>0)?aText[cur-1]:0,
-- aText[cur],
-- (cur<(aLen-1)) ?aText[cur+1]:0);
-+ c1 = this->ContextualAnalysis((cur>0)?GetUnichar(&aText[cur-1]):0,
-+ GetUnichar(&aText[cur]),
-+ (cur<(aLen-1)) ?GetUnichar(&aText[cur+1]):0);
- } else {
-- c1 = this->GetClass(aText[cur]);
-+ c1 = this->GetClass(GetUnichar(&aText[cur]));
- }
-
- if(CLASS_THAI == c1)
-@@ -521,13 +521,13 @@
-
- for(cur++; cur <aLen; cur++)
- {
-- if(NEED_CONTEXTUAL_ANALYSIS(aText[cur]))
-+ if(NEED_CONTEXTUAL_ANALYSIS(GetUnichar(&aText[cur])))
- {
-- c2= this->ContextualAnalysis((cur>0)?aText[cur-1]:0,
-- aText[cur],
-- (cur<(aLen-1)) ?aText[cur+1]:0);
-+ c2= this->ContextualAnalysis((cur>0)?GetUnichar(&aText[cur-1]):0,
-+ GetUnichar(&aText[cur]),
-+ (cur<(aLen-1)) ?GetUnichar(&aText[cur+1]):0);
- } else {
-- c2 = this->GetClass(aText[cur]);
-+ c2 = this->GetClass(GetUnichar(&aText[cur]));
- }
-
- if(GetPair(c1, c2)) {
-diff -aur a/intl/unicharutil/util/nsUnicharUtils.cpp b/intl/unicharutil/util/nsUnicharUtils.cpp
---- a/intl/unicharutil/util/nsUnicharUtils.cpp 2005-04-21 15:30:21.000000000 -0700
-+++ b/intl/unicharutil/util/nsUnicharUtils.cpp 2006-05-20 20:27:50.000000000 -0700
-@@ -340,3 +340,28 @@
- return result;
- }
-
-+PRUnichar
-+GetUnichar(const void *ptr)
-+{
-+ PRUnichar result;
-+#if defined(__sparc__) || defined(__alpha__)
-+ *((char *) &result) = *((char *) ptr);
-+ *((char *) &result + 1) = *((char *) ptr + 1);
-+#else
-+ result = *((PRUnichar *) ptr);
-+#endif
-+ return result;
-+}
-+
-+void
-+SetUnichar(void *ptr, PRUnichar aChar)
-+{
-+#if defined(__sparc__) || defined(__alpha__)
-+ *((char *) ptr) = *((char *) &aChar);
-+ *((char *) ptr + 1) = *((char *) &aChar + 1);
-+#else
-+ *((PRUnichar *) ptr) = aChar;
-+#endif
-+}
-+
-+
-diff -aur a/intl/unicharutil/util/nsUnicharUtils.h b/intl/unicharutil/util/nsUnicharUtils.h
---- a/intl/unicharutil/util/nsUnicharUtils.h 2005-02-24 07:50:57.000000000 -0800
-+++ b/intl/unicharutil/util/nsUnicharUtils.h 2006-05-20 20:27:50.000000000 -0700
-@@ -81,6 +81,8 @@
-
- PRUnichar ToUpperCase(PRUnichar);
- PRUnichar ToLowerCase(PRUnichar);
-+PRUnichar GetUnichar(const void *);
-+void SetUnichar(void *, PRUnichar);
-
- inline PRBool IsUpperCase(PRUnichar c) {
- return ToLowerCase(c) != c;
-diff -aur a/layout/generic/nsTextFrame.cpp b/layout/generic/nsTextFrame.cpp
---- a/layout/generic/nsTextFrame.cpp 2006-02-13 18:05:07.000000000 -0800
-+++ b/layout/generic/nsTextFrame.cpp 2006-05-20 20:27:50.000000000 -0700
-@@ -5101,8 +5101,8 @@
-
- while (aNumChars-- > 0) {
- // XXX: If you crash here then you may see the issue described
-- // in http://bugzilla.mozilla.org/show_bug.cgi?id=36146#c44
-- *cp2-- = PRUnichar(*cp1--);
-+ // in http://bugzilla.mozilla.org/show_bug.cgi?id=161826
-+ SetUnichar(cp2--, PRUnichar(*cp1--));
- }
- }
-
-@@ -6199,9 +6199,9 @@
- {
- PRUnichar* end = aBuffer + aWordLen;
- for (; aBuffer < end; aBuffer++) {
-- PRUnichar ch = *aBuffer;
-+ PRUnichar ch = GetUnichar(aBuffer);
- if (ch == ' ') {
-- *aBuffer = CH_NBSP;
-+ SetUnichar(aBuffer, CH_NBSP);
- }
- }
- }
+++ /dev/null
---- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_alpha.cpp 2002-04-10 05:37:38.000000000 +0200
-+++ mozilla-alpha/xpcom/reflect/xptcall/src/md/unix/xptcinvoke_linux_alpha.cpp 2002-10-06 10:44:59.000000000 +0200
-@@ -20,6 +20,7 @@
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
-+ * Glen Nakamura <glen@imodulo.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
-@@ -37,16 +38,14 @@
-
- /* Platform specific code to invoke XPCOM methods on native objects */
-
--/* contributed by Glen Nakamura <glen.nakamura@usa.net> */
--
- #include "xptcprivate.h"
-
- /* Prototype specifies unmangled function name and disables unused warning */
--static void
-+void
- invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
- __asm__("invoke_copy_to_stack") __attribute__((unused));
-
--static void
-+void
- invoke_copy_to_stack(PRUint64* d, PRUint32 paramCount, nsXPTCVariant* s)
- {
- const PRUint8 NUM_ARG_REGS = 6-1; // -1 for "this" pointer
-@@ -163,7 +162,11 @@
- "bis $16,$16,$1\n\t" /* load "this" */
- "ldq $2,16($15)\n\t" /* load "methodIndex" */
- "ldq $1,0($1)\n\t" /* load vtable */
-+#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-+ "s8addq $2,$31,$2\n\t" /* vtable index = "methodIndex" * 8 */
-+#else /* not G++ V3 ABI */
- "s8addq $2,16,$2\n\t" /* vtable index = "methodIndex" * 8 + 16 */
-+#endif /* G++ V3 ABI */
- "addq $1,$2,$1\n\t"
- "ldq $27,0($1)\n\t" /* load address of function */
- "jsr $26,($27),0\n\t" /* call virtual function */
-@@ -176,4 +179,3 @@
- "ret $31,($26),1\n\t"
- ".end XPTC_InvokeByIndex"
- );
--
---- mozilla/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp 2002-04-10 05:37:42.000000000 +0200
-+++ mozilla-alpha/xpcom/reflect/xptcall/src/md/unix/xptcstubs_linux_alpha.cpp 2002-10-06 10:45:10.000000000 +0200
-@@ -20,6 +20,7 @@
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
-+ * Glen Nakamura <glen@imodulo.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
-@@ -37,16 +38,14 @@
-
- /* Implement shared vtbl methods. */
-
--/* contributed by Glen Nakamura <glen.nakamura@usa.net> */
--
- #include "xptcprivate.h"
-
- /* Prototype specifies unmangled function name and disables unused warning */
--static nsresult
-+nsresult
- PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
- __asm__("PrepareAndDispatch") __attribute__((unused));
-
--static nsresult
-+nsresult
- PrepareAndDispatch(nsXPTCStubBase* self, uint32 methodIndex, PRUint64* args)
- {
- const PRUint8 PARAM_BUFFER_COUNT = 16;
-@@ -188,23 +187,45 @@
- * nsresult nsXPTCStubBase::Stub##n()
- * Sets register $1 to "methodIndex" and jumps to SharedStub.
- */
-+#define STUB_MANGLED_ENTRY(n, symbol) \
-+ "#### Stub"#n" ####" "\n\t" \
-+ ".text" "\n\t" \
-+ ".align 5" "\n\t" \
-+ ".globl " symbol "\n\t" \
-+ ".ent " symbol "\n" \
-+symbol ":" "\n\t" \
-+ ".frame $30,0,$26,0" "\n\t" \
-+ "ldgp $29,0($27)" "\n" \
-+"$" symbol "..ng:" "\n\t" \
-+ ".prologue 1" "\n\t" \
-+ "lda $1,"#n "\n\t" \
-+ "br $31,$SharedStub..ng" "\n\t" \
-+ ".end " symbol
-+
-+#if defined(__GXX_ABI_VERSION) && __GXX_ABI_VERSION >= 100 /* G++ V3 ABI */
-+
-+#define STUB_ENTRY(n) \
-+__asm__( \
-+ ".if "#n" < 10" "\n\t" \
-+ STUB_MANGLED_ENTRY(n, "_ZN14nsXPTCStubBase5Stub"#n"Ev") "\n\t" \
-+ ".elseif "#n" < 100" "\n\t" \
-+ STUB_MANGLED_ENTRY(n, "_ZN14nsXPTCStubBase6Stub"#n"Ev") "\n\t" \
-+ ".elseif "#n" < 1000" "\n\t" \
-+ STUB_MANGLED_ENTRY(n, "_ZN14nsXPTCStubBase7Stub"#n"Ev") "\n\t" \
-+ ".else" "\n\t" \
-+ ".err \"Stub"#n" >= 1000 not yet supported.\"" "\n\t" \
-+ ".endif" \
-+ );
-+
-+#else /* not G++ V3 ABI */
-+
- #define STUB_ENTRY(n) \
- __asm__( \
-- "#### Stub"#n" ####\n" \
--".text\n\t" \
-- ".align 5\n\t" \
-- ".globl Stub"#n"__14nsXPTCStubBase\n\t" \
-- ".ent Stub"#n"__14nsXPTCStubBase\n" \
--"Stub"#n"__14nsXPTCStubBase:\n\t" \
-- ".frame $30,0,$26,0\n\t" \
-- "ldgp $29,0($27)\n" \
--"$Stub"#n"__14nsXPTCStubBase..ng:\n\t" \
-- ".prologue 1\n\t" \
-- "lda $1,"#n"\n\t" \
-- "br $31,$SharedStub..ng\n\t" \
-- ".end Stub"#n"__14nsXPTCStubBase" \
-+ STUB_MANGLED_ENTRY(n, "Stub"#n"__14nsXPTCStubBase") \
- );
-
-+#endif /* G++ V3 ABI */
-+
- #define SENTINEL_ENTRY(n) \
- nsresult nsXPTCStubBase::Sentinel##n() \
- { \
-@@ -213,4 +234,3 @@
- }
-
- #include "xptcstubsdef.inc"
--
+++ /dev/null
-diff -ur mozilla-orig/security/nss/lib/pki1/oiddata.h mozilla/security/nss/lib/pki1/oiddata.h
---- mozilla-orig/security/nss/lib/pki1/oiddata.h 2005-03-13 19:12:25.000000000 -0500
-+++ mozilla/security/nss/lib/pki1/oiddata.h 2005-03-13 19:15:19.000000000 -0500
-@@ -43,12 +43,6 @@
- #include "nsspki1t.h"
- #endif /* NSSPKI1T_H */
-
--extern const NSSOID nss_builtin_oids[];
--extern const PRUint32 nss_builtin_oid_count;
--
--/*extern const nssAttributeTypeAliasTable nss_attribute_type_aliases[];*/
--/*extern const PRUint32 nss_attribute_type_alias_count;*/
--
- extern const NSSOID *NSS_OID_RFC1274_UID;
- extern const NSSOID *NSS_OID_RFC1274_EMAIL;
- extern const NSSOID *NSS_OID_RFC2247_DC;
-diff -ur mozilla-orig/security/nss/lib/pki1/oidgen.perl mozilla/security/nss/lib/pki1/oidgen.perl
---- mozilla-orig/security/nss/lib/pki1/oidgen.perl 2005-03-13 19:12:25.000000000 -0500
-+++ mozilla/security/nss/lib/pki1/oidgen.perl 2005-03-13 19:15:19.000000000 -0500
-@@ -233,12 +233,6 @@
- #include "nsspki1t.h"
- #endif /* NSSPKI1T_H */
-
--extern const NSSOID nss_builtin_oids[];
--extern const PRUint32 nss_builtin_oid_count;
--
--/*extern const nssAttributeTypeAliasTable nss_attribute_type_aliases[];*/
--/*extern const PRUint32 nss_attribute_type_alias_count;*/
--
- EOD
- ;
-
-diff -ur mozilla-orig/security/nss/lib/pki1/pki1.h mozilla/security/nss/lib/pki1/pki1.h
---- mozilla-orig/security/nss/lib/pki1/pki1.h 2005-03-13 19:12:25.000000000 -0500
-+++ mozilla/security/nss/lib/pki1/pki1.h 2005-03-13 19:15:19.000000000 -0500
-@@ -55,7 +55,9 @@
-
- PR_BEGIN_EXTERN_C
-
--/* fgmr 19990505 moved these here from oiddata.h */
-+extern const NSSOID nss_builtin_oids[];
-+extern const PRUint32 nss_builtin_oid_count;
-+
- extern const nssAttributeTypeAliasTable nss_attribute_type_aliases[];
- extern const PRUint32 nss_attribute_type_alias_count;
-
-diff -ur mozilla-orig/xpcom/base/nscore.h mozilla/xpcom/base/nscore.h
---- mozilla-orig/xpcom/base/nscore.h 2005-07-24 05:07:54.627311840 +0000
-+++ mozilla/xpcom/base/nscore.h 2005-07-24 05:13:02.327534296 +0000
-@@ -365,8 +365,9 @@
- * Use these macros to do 64bit safe pointer conversions.
- */
-
--#define NS_PTR_TO_INT32(x) ((char *)(x) - (char *)0)
--#define NS_INT32_TO_PTR(x) ((void *)((char *)0 + (x)))
-+#define NS_PTR_TO_INT32(x) ((PRInt32) (PRWord) (x))
-+#define NS_PTR_TO_UINT32(x) ((PRUint32) (PRWord) (x))
-+#define NS_INT32_TO_PTR(x) ((void *) (PRWord) (x))
-
- /*
- * These macros allow you to give a hint to the compiler about branch
-diff -ur mozilla-orig/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp mozilla/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp
---- mozilla-orig/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp 2005-07-24 05:07:51.199832896 +0000
-+++ mozilla/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp 2005-07-24 05:13:08.302625944 +0000
-@@ -834,8 +834,8 @@
- void
- nsHttpConnectionMgr::OnMsgUpdateParam(nsresult status, void *param)
- {
-- PRUint16 name = (PRUint32(param) & 0xFFFF0000) >> 16;
-- PRUint16 value = PRUint32(param) & 0x0000FFFF;
-+ PRUint16 name = (NS_PTR_TO_UINT32(param) & 0xFFFF0000) >> 16;
-+ PRUint16 value = NS_PTR_TO_UINT32(param) & 0x0000FFFF;
-
- switch (name) {
- case MAX_CONNECTIONS:
-diff -ur mozilla-orig/widget/src/gtk2/nsDragService.cpp mozilla/widget/src/gtk2/nsDragService.cpp
---- mozilla-orig/widget/src/gtk2/nsDragService.cpp 2005-07-24 05:08:57.666728392 +0000
-+++ mozilla/widget/src/gtk2/nsDragService.cpp 2005-07-24 05:13:33.910732920 +0000
-@@ -838,7 +838,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- listTarget->target = g_strdup(gMimeListType);
- listTarget->flags = 0;
-- listTarget->info = (guint)listAtom;
-+ listTarget->info = GPOINTER_TO_UINT(listAtom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("automatically adding target %s with id %ld\n",
- listTarget->target, listAtom));
-@@ -877,7 +877,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- listTarget->target = g_strdup(gTextUriListType);
- listTarget->flags = 0;
-- listTarget->info = (guint)listAtom;
-+ listTarget->info = GPOINTER_TO_UINT(listAtom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("automatically adding target %s with \
- id %ld\n", listTarget->target, listAtom));
-@@ -914,7 +914,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- target->target = g_strdup(flavorStr);
- target->flags = 0;
-- target->info = (guint)atom;
-+ target->info = GPOINTER_TO_UINT(atom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("adding target %s with id %ld\n",
- target->target, atom));
-@@ -931,7 +931,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- plainTarget->target = g_strdup(kTextMime);
- plainTarget->flags = 0;
-- plainTarget->info = (guint)plainAtom;
-+ plainTarget->info = GPOINTER_TO_UINT(plainAtom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("automatically adding target %s with \
- id %ld\n", plainTarget->target, plainAtom));
-@@ -948,7 +948,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- urlTarget->target = g_strdup(gMozUrlType);
- urlTarget->flags = 0;
-- urlTarget->info = (guint)urlAtom;
-+ urlTarget->info = GPOINTER_TO_UINT(urlAtom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("automatically adding target %s with \
- id %ld\n", urlTarget->target, urlAtom));
-
+++ /dev/null
-diff -Nru mozilla.vanilla/mailnews/local/src/nsPop3IncomingServer.cpp mozilla/mailnews/local/src/nsPop3IncomingServer.cpp
---- mozilla.vanilla/mailnews/local/src/nsPop3IncomingServer.cpp 2005-12-02 10:52:15.000000000 +0100
-+++ mozilla/mailnews/local/src/nsPop3IncomingServer.cpp 2005-12-02 10:57:43.000000000 +0100
-@@ -409,11 +409,11 @@
- if (NS_FAILED(rv)) return rv;
- rv = CreateLocalFolder(path, "Trash");
- if (NS_FAILED(rv)) return rv;
-- rv = CreateLocalFolder(path, "Sent");
-+ /*rv = CreateLocalFolder(path, "Sent");
- if (NS_FAILED(rv)) return rv;
- rv = CreateLocalFolder(path, "Drafts");
- if (NS_FAILED(rv)) return rv;
-- return CreateLocalFolder(path, "Templates");
-+ return CreateLocalFolder(path, "Templates");*/
-
- return NS_OK;
- }
+++ /dev/null
-diff -ur mozilla-orig/security/nss/lib/pki1/oiddata.h mozilla/security/nss/lib/pki1/oiddata.h
---- mozilla-orig/security/nss/lib/pki1/oiddata.h 2005-03-13 19:12:25.000000000 -0500
-+++ mozilla/security/nss/lib/pki1/oiddata.h 2005-03-13 19:15:19.000000000 -0500
-@@ -43,12 +43,6 @@
- #include "nsspki1t.h"
- #endif /* NSSPKI1T_H */
-
--extern const NSSOID nss_builtin_oids[];
--extern const PRUint32 nss_builtin_oid_count;
--
--/*extern const nssAttributeTypeAliasTable nss_attribute_type_aliases[];*/
--/*extern const PRUint32 nss_attribute_type_alias_count;*/
--
- extern const NSSOID *NSS_OID_RFC1274_UID;
- extern const NSSOID *NSS_OID_RFC1274_EMAIL;
- extern const NSSOID *NSS_OID_RFC2247_DC;
-diff -ur mozilla-orig/security/nss/lib/pki1/oidgen.perl mozilla/security/nss/lib/pki1/oidgen.perl
---- mozilla-orig/security/nss/lib/pki1/oidgen.perl 2005-03-13 19:12:25.000000000 -0500
-+++ mozilla/security/nss/lib/pki1/oidgen.perl 2005-03-13 19:15:19.000000000 -0500
-@@ -233,12 +233,6 @@
- #include "nsspki1t.h"
- #endif /* NSSPKI1T_H */
-
--extern const NSSOID nss_builtin_oids[];
--extern const PRUint32 nss_builtin_oid_count;
--
--/*extern const nssAttributeTypeAliasTable nss_attribute_type_aliases[];*/
--/*extern const PRUint32 nss_attribute_type_alias_count;*/
--
- EOD
- ;
-
-diff -ur mozilla-orig/security/nss/lib/pki1/pki1.h mozilla/security/nss/lib/pki1/pki1.h
---- mozilla-orig/security/nss/lib/pki1/pki1.h 2005-03-13 19:12:25.000000000 -0500
-+++ mozilla/security/nss/lib/pki1/pki1.h 2005-03-13 19:15:19.000000000 -0500
-@@ -55,7 +55,9 @@
-
- PR_BEGIN_EXTERN_C
-
--/* fgmr 19990505 moved these here from oiddata.h */
-+extern const NSSOID nss_builtin_oids[];
-+extern const PRUint32 nss_builtin_oid_count;
-+
- extern const nssAttributeTypeAliasTable nss_attribute_type_aliases[];
- extern const PRUint32 nss_attribute_type_alias_count;
-
-diff -ur mozilla-orig/xpcom/base/nscore.h mozilla/xpcom/base/nscore.h
---- mozilla-orig/xpcom/base/nscore.h 2005-07-24 05:07:54.627311840 +0000
-+++ mozilla/xpcom/base/nscore.h 2005-07-24 05:13:02.327534296 +0000
-@@ -365,8 +365,9 @@
- * Use these macros to do 64bit safe pointer conversions.
- */
-
--#define NS_PTR_TO_INT32(x) ((char *)(x) - (char *)0)
--#define NS_INT32_TO_PTR(x) ((void *)((char *)0 + (x)))
-+#define NS_PTR_TO_INT32(x) ((PRInt32) (PRWord) (x))
-+#define NS_PTR_TO_UINT32(x) ((PRUint32) (PRWord) (x))
-+#define NS_INT32_TO_PTR(x) ((void *) (PRWord) (x))
-
- /*
- * These macros allow you to give a hint to the compiler about branch
-diff -ur mozilla-orig/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp mozilla/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp
---- mozilla-orig/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp 2005-07-24 05:07:51.199832896 +0000
-+++ mozilla/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp 2005-07-24 05:13:08.302625944 +0000
-@@ -834,8 +834,8 @@
- void
- nsHttpConnectionMgr::OnMsgUpdateParam(nsresult status, void *param)
- {
-- PRUint16 name = (PRUint32(param) & 0xFFFF0000) >> 16;
-- PRUint16 value = PRUint32(param) & 0x0000FFFF;
-+ PRUint16 name = (NS_PTR_TO_UINT32(param) & 0xFFFF0000) >> 16;
-+ PRUint16 value = NS_PTR_TO_UINT32(param) & 0x0000FFFF;
-
- switch (name) {
- case MAX_CONNECTIONS:
-diff -ur mozilla-orig/widget/src/gtk2/nsDragService.cpp mozilla/widget/src/gtk2/nsDragService.cpp
---- mozilla-orig/widget/src/gtk2/nsDragService.cpp 2005-07-24 05:08:57.666728392 +0000
-+++ mozilla/widget/src/gtk2/nsDragService.cpp 2005-07-24 05:13:33.910732920 +0000
-@@ -838,7 +838,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- listTarget->target = g_strdup(gMimeListType);
- listTarget->flags = 0;
-- listTarget->info = (guint)listAtom;
-+ listTarget->info = GPOINTER_TO_UINT(listAtom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("automatically adding target %s with id %ld\n",
- listTarget->target, listAtom));
-@@ -877,7 +877,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- listTarget->target = g_strdup(gTextUriListType);
- listTarget->flags = 0;
-- listTarget->info = (guint)listAtom;
-+ listTarget->info = GPOINTER_TO_UINT(listAtom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("automatically adding target %s with \
- id %ld\n", listTarget->target, listAtom));
-@@ -914,7 +914,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- target->target = g_strdup(flavorStr);
- target->flags = 0;
-- target->info = (guint)atom;
-+ target->info = GPOINTER_TO_UINT(atom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("adding target %s with id %ld\n",
- target->target, atom));
-@@ -931,7 +931,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- plainTarget->target = g_strdup(kTextMime);
- plainTarget->flags = 0;
-- plainTarget->info = (guint)plainAtom;
-+ plainTarget->info = GPOINTER_TO_UINT(plainAtom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("automatically adding target %s with \
- id %ld\n", plainTarget->target, plainAtom));
-@@ -948,7 +948,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- urlTarget->target = g_strdup(gMozUrlType);
- urlTarget->flags = 0;
-- urlTarget->info = (guint)urlAtom;
-+ urlTarget->info = GPOINTER_TO_UINT(urlAtom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("automatically adding target %s with \
- id %ld\n", urlTarget->target, urlAtom));
-
-diff -urN mozilla-orig/gfx/src/freetype/nsFreeType.cpp mozilla/gfx/src/freetype/nsFreeType.cpp
---- mozilla-orig/gfx/src/freetype/nsFreeType.cpp 2005-10-22 13:17:35.151589250 -0500
-+++ mozilla/gfx/src/freetype/nsFreeType.cpp 2005-10-22 13:23:07.672370500 -0500
-@@ -96,7 +96,7 @@
- // Define the FreeType2 functions we resolve at run time.
- // see the comment near nsFreeType2::DoneFace() for more info
- //
--#define NS_FT2_OFFSET(f) (int)&((nsFreeType2*)0)->f
-+#define NS_FT2_OFFSET(f) (NS_PTR_TO_INT32(&((nsFreeType2*)0)->f))
- FtFuncList nsFreeType2::FtFuncs [] = {
- {"FT_Done_Face", NS_FT2_OFFSET(nsFT_Done_Face), PR_TRUE},
- {"FT_Done_FreeType", NS_FT2_OFFSET(nsFT_Done_FreeType), PR_TRUE},
+++ /dev/null
-diff -ur mozilla-orig/xpcom/base/nscore.h mozilla/xpcom/base/nscore.h
---- mozilla-orig/xpcom/base/nscore.h 2005-07-24 05:07:54.627311840 +0000
-+++ mozilla/xpcom/base/nscore.h 2005-07-24 05:13:02.327534296 +0000
-@@ -365,8 +365,9 @@
- * Use these macros to do 64bit safe pointer conversions.
- */
-
--#define NS_PTR_TO_INT32(x) ((char *)(x) - (char *)0)
--#define NS_INT32_TO_PTR(x) ((void *)((char *)0 + (x)))
-+#define NS_PTR_TO_INT32(x) ((PRInt32) (PRWord) (x))
-+#define NS_PTR_TO_UINT32(x) ((PRUint32) (PRWord) (x))
-+#define NS_INT32_TO_PTR(x) ((void *) (PRWord) (x))
-
- /*
- * These macros allow you to give a hint to the compiler about branch
-diff -ur mozilla-orig/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp mozilla/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp
---- mozilla-orig/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp 2005-07-24 05:07:51.199832896 +0000
-+++ mozilla/netwerk/protocol/http/src/nsHttpConnectionMgr.cpp 2005-07-24 05:13:08.302625944 +0000
-@@ -834,8 +834,8 @@
- void
- nsHttpConnectionMgr::OnMsgUpdateParam(nsresult status, void *param)
- {
-- PRUint16 name = (PRUint32(param) & 0xFFFF0000) >> 16;
-- PRUint16 value = PRUint32(param) & 0x0000FFFF;
-+ PRUint16 name = (NS_PTR_TO_UINT32(param) & 0xFFFF0000) >> 16;
-+ PRUint16 value = NS_PTR_TO_UINT32(param) & 0x0000FFFF;
-
- switch (name) {
- case MAX_CONNECTIONS:
-diff -ur mozilla-orig/widget/src/gtk2/nsDragService.cpp mozilla/widget/src/gtk2/nsDragService.cpp
---- mozilla-orig/widget/src/gtk2/nsDragService.cpp 2005-07-24 05:08:57.666728392 +0000
-+++ mozilla/widget/src/gtk2/nsDragService.cpp 2005-07-24 05:13:33.910732920 +0000
-@@ -838,7 +838,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- listTarget->target = g_strdup(gMimeListType);
- listTarget->flags = 0;
-- listTarget->info = (guint)listAtom;
-+ listTarget->info = GPOINTER_TO_UINT(listAtom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("automatically adding target %s with id %ld\n",
- listTarget->target, listAtom));
-@@ -877,7 +877,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- listTarget->target = g_strdup(gTextUriListType);
- listTarget->flags = 0;
-- listTarget->info = (guint)listAtom;
-+ listTarget->info = GPOINTER_TO_UINT(listAtom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("automatically adding target %s with \
- id %ld\n", listTarget->target, listAtom));
-@@ -914,7 +914,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- target->target = g_strdup(flavorStr);
- target->flags = 0;
-- target->info = (guint)atom;
-+ target->info = GPOINTER_TO_UINT(atom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("adding target %s with id %ld\n",
- target->target, atom));
-@@ -931,7 +931,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- plainTarget->target = g_strdup(kTextMime);
- plainTarget->flags = 0;
-- plainTarget->info = (guint)plainAtom;
-+ plainTarget->info = GPOINTER_TO_UINT(plainAtom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("automatically adding target %s with \
- id %ld\n", plainTarget->target, plainAtom));
-@@ -948,7 +948,7 @@
- (GtkTargetEntry *)g_malloc(sizeof(GtkTargetEntry));
- urlTarget->target = g_strdup(gMozUrlType);
- urlTarget->flags = 0;
-- urlTarget->info = (guint)urlAtom;
-+ urlTarget->info = GPOINTER_TO_UINT(urlAtom);
- PR_LOG(sDragLm, PR_LOG_DEBUG,
- ("automatically adding target %s with \
- id %ld\n", urlTarget->target, urlAtom));
-
-diff -urN mozilla-orig/gfx/src/freetype/nsFreeType.cpp mozilla/gfx/src/freetype/nsFreeType.cpp
---- mozilla-orig/gfx/src/freetype/nsFreeType.cpp 2005-10-22 13:17:35.151589250 -0500
-+++ mozilla/gfx/src/freetype/nsFreeType.cpp 2005-10-22 13:23:07.672370500 -0500
-@@ -96,7 +96,7 @@
- // Define the FreeType2 functions we resolve at run time.
- // see the comment near nsFreeType2::DoneFace() for more info
- //
--#define NS_FT2_OFFSET(f) (int)&((nsFreeType2*)0)->f
-+#define NS_FT2_OFFSET(f) (NS_PTR_TO_INT32(&((nsFreeType2*)0)->f))
- FtFuncList nsFreeType2::FtFuncs [] = {
- {"FT_Done_Face", NS_FT2_OFFSET(nsFT_Done_Face), PR_TRUE},
- {"FT_Done_FreeType", NS_FT2_OFFSET(nsFT_Done_FreeType), PR_TRUE},
+++ /dev/null
-Index: config/autoconf.mk.in
-===================================================================
-RCS file: /cvsroot/mozilla/config/autoconf.mk.in,v
-retrieving revision 3.363.2.1
-diff -u -p -6 -r3.363.2.1 autoconf.mk.in
---- config/autoconf.mk.in 17 Aug 2005 17:17:17 -0000 3.363.2.1
-+++ config/autoconf.mk.in 27 Aug 2005 19:57:29 -0000
-@@ -456,12 +456,13 @@ MOZ_XFT_CFLAGS = @MOZ_XFT_CFLAGS@
- MOZ_XFT_LIBS = @MOZ_XFT_LIBS@
- MOZ_ENABLE_COREXFONTS = @MOZ_ENABLE_COREXFONTS@
-
- MOZ_ENABLE_PANGO = @MOZ_ENABLE_PANGO@
- MOZ_PANGO_CFLAGS = @MOZ_PANGO_CFLAGS@
- MOZ_PANGO_LIBS = @MOZ_PANGO_LIBS@
-+MOZ_PANGOCAIRO = @MOZ_PANGOCAIRO@
-
- MOZ_EXTRA_X11CONVERTERS = @MOZ_EXTRA_X11CONVERTERS@
-
- MOZ_ENABLE_XINERAMA = @MOZ_ENABLE_XINERAMA@
- MOZ_XINERAMA_LIBS = @MOZ_XINERAMA_LIBS@
-
-Index: gfx/src/gtk/mozilla-decoder.cpp
-===================================================================
-RCS file: /cvsroot/mozilla/gfx/src/gtk/mozilla-decoder.cpp,v
-retrieving revision 1.3
-diff -u -p -6 -r1.3 mozilla-decoder.cpp
---- gfx/src/gtk/mozilla-decoder.cpp 7 Nov 2004 23:59:23 -0000 1.3
-+++ gfx/src/gtk/mozilla-decoder.cpp 27 Aug 2005 19:57:49 -0000
-@@ -37,13 +37,17 @@
- * ***** END LICENSE BLOCK ***** */
-
- #define PANGO_ENABLE_BACKEND
- #define PANGO_ENABLE_ENGINE
-
- #include "mozilla-decoder.h"
-+#ifdef MOZ_PANGOCAIRO
-+#include <pango/pangocairo.h>
-+#else
- #include <pango/pangoxft.h>
-+#endif
- #include <pango/pangofc-fontmap.h>
- #include <pango/pangofc-font.h>
- #include <gdk/gdkx.h>
-
- #include "nsString.h"
- #include "nsIPersistentProperties2.h"
-@@ -205,13 +209,17 @@ mozilla_decoders_init(void)
- }
- else {
- printf("unknown suffix used for mapping\n");
- }
- }
-
-+#ifdef MOZ_PANGOCAIRO
-+ pango_fc_font_map_add_decoder_find_func(PANGO_FC_FONT_MAP(pango_cairo_font_map_get_default()),
-+#else
- pango_fc_font_map_add_decoder_find_func(PANGO_FC_FONT_MAP(pango_xft_get_font_map(GDK_DISPLAY(),gdk_x11_get_default_screen())),
-+#endif
- mozilla_find_decoder,
- NULL,
- NULL);
-
- initialized = PR_TRUE;
-
-Index: configure.in
-===================================================================
-RCS file: /cvsroot/mozilla/configure.in,v
-retrieving revision 1.1503.2.6
-diff -u -p -6 -r1.1503.2.6 configure.in
---- configure.in 25 Aug 2005 19:05:34 -0000 1.1503.2.6
-+++ configure.in 29 Aug 2005 08:03:32 -0000
-@@ -3707,14 +3707,14 @@ gtk)
- ;;
-
- gtk2)
- MOZ_ENABLE_GTK2=1
- MOZ_ENABLE_XREMOTE=1
- MOZ_ENABLE_COREXFONTS=${MOZ_ENABLE_COREXFONTS-}
-- TK_CFLAGS='$(MOZ_GTK2_CFLAGS)'
-- TK_LIBS='$(MOZ_GTK2_LIBS)'
-+ TK_CFLAGS='$(MOZ_GTK2_CFLAGS) $(MOZ_PANGO_CFLAGS)'
-+ TK_LIBS='$(MOZ_GTK2_LIBS) $(MOZ_PANGO_LIBS)'
- AC_DEFINE(MOZ_WIDGET_GTK2)
- ;;
-
- xlib)
- MOZ_ENABLE_XLIB=1
- if test "$_HAVE_FREETYPE2"; then
-@@ -4277,33 +4277,44 @@ if test "$MOZ_ENABLE_XFT" && test "$MOZ_
- fi
-
- if test "$MOZ_ENABLE_XFT"
- then
- AC_DEFINE(MOZ_ENABLE_XFT)
- PKG_CHECK_MODULES(MOZ_XFT, xft)
-- PKG_CHECK_MODULES(_PANGOCHK, pango >= 1.1.0)
-+ PKG_CHECK_MODULES(MOZ_PANGO, pangoxft >= 1.1.0 pangox)
- fi
-
- AC_SUBST(MOZ_ENABLE_XFT)
- AC_SUBST(MOZ_XFT_CFLAGS)
- AC_SUBST(MOZ_XFT_LIBS)
-+AC_SUBST(MOZ_PANGO_CFLAGS)
-+AC_SUBST(MOZ_PANGO_LIBS)
-
- dnl ========================================================
- dnl = pango font rendering
- dnl ========================================================
- MOZ_ARG_ENABLE_BOOL(pango,
- [ --enable-pango Enable Pango font rendering support],
- MOZ_ENABLE_PANGO=1,
- MOZ_ENABLE_PANGO=)
-
- if test "$MOZ_ENABLE_PANGO"
- then
- AC_DEFINE(MOZ_ENABLE_PANGO)
-- PKG_CHECK_MODULES(MOZ_PANGO, pango >= 1.6.0 pangoft2 >= 1.6.0)
-+ PKG_CHECK_MODULES(MOZ_PANGO, pangoxft >= 1.6.0)
-+ PKG_CHECK_MODULES(PANGOCAIRO_CHK, pangocairo >= 1.10.0,
-+ [
-+ MOZ_PANGOCAIRO=1
-+ AC_DEFINE(MOZ_PANGOCAIRO)
-+ MOZ_PANGO_CFLAGS="$PANGOCAIRO_CHK_CFLAGS $MOZ_PANGO_CFLAGS"
-+ MOZ_PANGO_LIBS="$PANGOCAIRO_CHK_LIBS $MOZ_PANGO_LIBS"
-+ ],
-+ [:])
-
- AC_SUBST(MOZ_ENABLE_PANGO)
-+ AC_SUBST(MOZ_PANGOCAIRO)
- AC_SUBST(MOZ_PANGO_CFLAGS)
- AC_SUBST(MOZ_PANGO_LIBS)
- fi
-
- dnl ========================================================
- dnl = x11 core font support (default and ability to enable depend on toolkit)
+++ /dev/null
---- content/canvas/src/Makefile.in.orig 2005-08-23 01:46:46.000000000 +0000
-+++ content/canvas/src/Makefile.in 2005-08-23 01:49:49.000000000 +0000
-@@ -77,6 +77,11 @@
- libpixman \
- $(NULL)
-
-+ifndef MOZ_TREE_CAIRO
-+LOCAL_INCLUDES += $(MOZ_CAIRO_CFLAGS)
-+EXTRA_DSO_LDOPTS += $(MOZ_CAIRO_LIBS)
-+endif
-+
- # XXX some platforms can't handle building
- # an empty .a/lib. Remove this dummy.cpp
- # whenever w have a rendering context
+++ /dev/null
---- mozilla/gfx/src/gtk/mozilla-decoder.cpp.noxft 2005-08-18 22:41:26.000000000 -0400
-+++ mozilla/gfx/src/gtk/mozilla-decoder.cpp 2005-08-18 22:38:01.000000000 -0400
-@@ -40,7 +40,7 @@
- #define PANGO_ENABLE_ENGINE
-
- #include "mozilla-decoder.h"
--#include <pango/pangoxft.h>
-+#include <pango/pangocairo.h>
- #include <pango/pangofc-fontmap.h>
- #include <pango/pangofc-font.h>
- #include <gdk/gdkx.h>
-@@ -208,7 +208,7 @@
- }
- }
-
-- pango_fc_font_map_add_decoder_find_func(PANGO_FC_FONT_MAP(pango_xft_get_font_map(GDK_DISPLAY(),gdk_x11_get_default_screen())),
-+ pango_fc_font_map_add_decoder_find_func(PANGO_FC_FONT_MAP(pango_cairo_font_map_get_default()),
- mozilla_find_decoder,
- NULL,
- NULL);
+++ /dev/null
---- config/rules.mk.orig 2005-07-28 01:45:18.000000000 +0000
-+++ config/rules.mk 2005-07-28 01:45:21.000000000 +0000
-@@ -507,5 +507,10 @@
- #
- ifeq ($(OS_ARCH),Linux)
- ifdef IS_COMPONENT
-+DSO_LDOPTS += -Wl,-R#RPATH_FIXER
-+OS_LDFLAGS += -Wl,-R#RPATH_FIXER
- EXTRA_DSO_LDOPTS += -Wl,-Bsymbolic
-+else
-+DSO_LDOPTS += -Wl,-R#RPATH_FIXER
-+OS_LDFLAGS += -Wl,-R#RPATH_FIXER
- endif
---- nsprpub/config/rules.mk.orig 2003-09-16 02:00:28.000000000 +0000
-+++ nsprpub/config/rules.mk 2005-07-30 04:00:21.000000000 +0000
-@@ -87,6 +87,9 @@
- endif
- endif
-
-+DSO_LDOPTS += -Wl,-R#RPATH_FIXER
-+OS_LDFLAGS += -Wl,-R#RPATH_FIXER
-+
- #
- # This makefile contains rules for building the following kinds of
- # libraries:
---- security/coreconf/rules.mk.orig 2005-07-31 16:31:37.000000000 +0000
-+++ security/coreconf/rules.mk 2005-07-31 16:37:27.000000000 +0000
-@@ -349,7 +349,7 @@
- ifdef XP_OS2_VACPP
- $(MKSHLIB) $(DLLFLAGS) $(LDFLAGS) $(OBJS) $(SUB_SHLOBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS)
- else
-- $(MKSHLIB) -o $@ $(OBJS) $(SUB_SHLOBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS)
-+ $(MKSHLIB) -Wl,-R#RPATH_FIXER -o $@ $(OBJS) $(SUB_SHLOBJS) $(LD_LIBS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS)
- endif
- chmod +x $@
- ifeq ($(OS_TARGET),Darwin)
---- security/coreconf/rules.mk.orig 2005-08-01 11:40:54.000000000 +0000
-+++ security/coreconf/rules.mk 2005-08-01 11:50:31.000000000 +0000
-@@ -291,7 +291,7 @@
- ifdef XP_OS2_VACPP
- $(MKPROG) -Fe$@ $(CFLAGS) $(OBJS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
- else
-- $(MKPROG) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
-+ $(MKPROG) -Wl,-R#RPATH_FIXER -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS) $(EXTRA_LIBS) $(EXTRA_SHARED_LIBS) $(OS_LIBS)
- endif
- endif
-