22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
authorStacy Yeh <stacy.yeh@oracle.com>
Mon, 11 Jan 2016 09:27:45 -0800
changeset 5255 cea0e462549a
parent 5252 947514442d05
child 5256 1c3e20e70cc3
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland
components/desktop/firefox/Makefile
components/desktop/firefox/files/all-multi-user-desktop.js
components/desktop/firefox/files/firefox-icon.png
components/desktop/firefox/files/firefox-js.pc
components/desktop/firefox/files/firefox-plugin.pc
components/desktop/firefox/files/firefox-xpcom.pc
components/desktop/firefox/files/firefox.1
components/desktop/firefox/files/firefox.desktop
components/desktop/firefox/firefox-bookmarks.p5m
components/desktop/firefox/firefox-multi-user-desktop.p5m
components/desktop/firefox/firefox.license
components/desktop/firefox/firefox.p5m
components/desktop/firefox/patches/firefox100-39-cairo-perf.patch
components/desktop/firefox/patches/firefox12-00-libnspr_flt4.patch
components/desktop/firefox/patches/firefox16-48-sparc-lea.patch
components/desktop/firefox/patches/firefox18-93-libffi-sparc.patch
components/desktop/firefox/patches/firefox20-24-stackwalk_compile.patch
components/desktop/firefox/patches/firefox20-46-strcasestr.patch
components/desktop/firefox/patches/firefox20-52-check_test.patch
components/desktop/firefox/patches/firefox20-82-sqlite3-unix-excl.patch
components/desktop/firefox/patches/firefox21-49-hnjfile.patch
components/desktop/firefox/patches/firefox21-50-nsMathUtils.patch
components/desktop/firefox/patches/firefox22-76-skip_mozbuild_test.patch
components/desktop/firefox/patches/firefox22-79-gthread-dlopen.patch
components/desktop/firefox/patches/firefox25-07-webaudio_math.patch
components/desktop/firefox/patches/firefox26-06-donot-delay-stopping-realplayer.patch
components/desktop/firefox/patches/firefox26-36-package_warning.patch
components/desktop/firefox/patches/firefox26-99-LocalFileUnix.patch
components/desktop/firefox/patches/firefox27-206-build-config.patch
components/desktop/firefox/patches/firefox27-47-uname.patch
components/desktop/firefox/patches/firefox27-67-ion_AsmJS_x86.patch
components/desktop/firefox/patches/firefox27-80-mftt_infinity.patch
components/desktop/firefox/patches/firefox28-217-xpt-as-flag.patch
components/desktop/firefox/patches/firefox28-88-libvpx_compile.patch
components/desktop/firefox/patches/firefox28-90-cubeb.patch
components/desktop/firefox/patches/firefox28-96-MediaDecoder.patch
components/desktop/firefox/patches/firefox29-214-gfx.patch
components/desktop/firefox/patches/firefox29-313-mozconfig_loader_bash.patch
components/desktop/firefox/patches/firefox29-45-snappy.patch
components/desktop/firefox/patches/firefox30-05-skia_gpu.patch
components/desktop/firefox/patches/firefox30-205-test.patch
components/desktop/firefox/patches/firefox30-29-rules_mk.patch
components/desktop/firefox/patches/firefox30-61-skia-endian.patch
components/desktop/firefox/patches/firefox31-01-locale.patch
components/desktop/firefox/patches/firefox31-03-g11n-nav-lang.patch
components/desktop/firefox/patches/firefox31-13-jit-test-multi-processes.patch
components/desktop/firefox/patches/firefox31-199-stacksize.patch
components/desktop/firefox/patches/firefox31-30-configure.patch
components/desktop/firefox/patches/firefox31-317-sparc-xptcall.patch
components/desktop/firefox/patches/firefox31-401-other-buildissue.patch
components/desktop/firefox/patches/firefox31-405-cpu.patch
components/desktop/firefox/patches/firefox31-408-urlbar-sparc.patch
components/desktop/firefox/patches/firefox31-409-thumbnail-sparc.patch
components/desktop/firefox/patches/firefox31-43-solaris_jemalloc_linkage.patch
components/desktop/firefox/patches/firefox31-60-Yarr_SPARC.patch
components/desktop/firefox/patches/firefox31-69-ipcv2.patch
components/desktop/firefox/patches/firefox31-92-dtrace.patch
components/desktop/firefox/patches/firefox31-97-ycbcr2.patch
components/desktop/firefox/patches/firefox31-gnu-105-lz4-restrict-keyword.patch
components/desktop/firefox/patches/firefox31-gnu-125-mozalloc.patch
components/desktop/firefox/patches/firefox31-gnu-130-xopen.patch
components/desktop/firefox/patches/firefox31-gnu-ReadAheadFile.patch
components/desktop/firefox/patches/firefox31-sparc-ta-6.patch
components/desktop/firefox/test/results-32.master
components/desktop/thunderbird/Makefile
components/desktop/thunderbird/files/thunderbird-icon.png
components/desktop/thunderbird/files/thunderbird.1
components/desktop/thunderbird/files/thunderbird.desktop
components/desktop/thunderbird/patches/firefox100-39-cairo-perf.patch
components/desktop/thunderbird/patches/firefox12-00-libnspr_flt4.patch
components/desktop/thunderbird/patches/firefox16-48-sparc-lea.patch
components/desktop/thunderbird/patches/firefox18-93-libffi-sparc.patch
components/desktop/thunderbird/patches/firefox20-24-stackwalk_compile.patch
components/desktop/thunderbird/patches/firefox20-46-strcasestr.patch
components/desktop/thunderbird/patches/firefox20-52-check_test.patch
components/desktop/thunderbird/patches/firefox20-82-sqlite3-unix-excl.patch
components/desktop/thunderbird/patches/firefox21-49-hnjfile.patch
components/desktop/thunderbird/patches/firefox21-50-nsMathUtils.patch
components/desktop/thunderbird/patches/firefox22-76-skip_mozbuild_test.patch
components/desktop/thunderbird/patches/firefox22-79-gthread-dlopen.patch
components/desktop/thunderbird/patches/firefox25-07-webaudio_math.patch
components/desktop/thunderbird/patches/firefox26-06-donot-delay-stopping-realplayer.patch
components/desktop/thunderbird/patches/firefox26-36-package_warning.patch
components/desktop/thunderbird/patches/firefox26-99-LocalFileUnix.patch
components/desktop/thunderbird/patches/firefox27-206-build-config.patch
components/desktop/thunderbird/patches/firefox27-47-uname.patch
components/desktop/thunderbird/patches/firefox27-67-ion_AsmJS_x86.patch
components/desktop/thunderbird/patches/firefox27-80-mftt_infinity.patch
components/desktop/thunderbird/patches/firefox28-217-xpt-as-flag.patch
components/desktop/thunderbird/patches/firefox28-88-libvpx_compile.patch
components/desktop/thunderbird/patches/firefox28-90-cubeb.patch
components/desktop/thunderbird/patches/firefox28-96-MediaDecoder.patch
components/desktop/thunderbird/patches/firefox29-214-gfx.patch
components/desktop/thunderbird/patches/firefox29-313-mozconfig_loader_bash.patch
components/desktop/thunderbird/patches/firefox29-45-snappy.patch
components/desktop/thunderbird/patches/firefox30-05-skia_gpu.patch
components/desktop/thunderbird/patches/firefox30-205-test.patch
components/desktop/thunderbird/patches/firefox30-29-rules_mk.patch
components/desktop/thunderbird/patches/firefox30-61-skia-endian.patch
components/desktop/thunderbird/patches/firefox31-13-jit-test-multi-processes.patch
components/desktop/thunderbird/patches/firefox31-199-stacksize.patch
components/desktop/thunderbird/patches/firefox31-30-configure.patch
components/desktop/thunderbird/patches/firefox31-317-sparc-xptcall.patch
components/desktop/thunderbird/patches/firefox31-401-other-buildissue.patch
components/desktop/thunderbird/patches/firefox31-405-cpu.patch
components/desktop/thunderbird/patches/firefox31-408-urlbar-sparc.patch
components/desktop/thunderbird/patches/firefox31-409-thumbnail-sparc.patch
components/desktop/thunderbird/patches/firefox31-43-solaris_jemalloc_linkage.patch
components/desktop/thunderbird/patches/firefox31-60-Yarr_SPARC.patch
components/desktop/thunderbird/patches/firefox31-69-ipcv2.patch
components/desktop/thunderbird/patches/firefox31-92-dtrace.patch
components/desktop/thunderbird/patches/firefox31-97-ycbcr2.patch
components/desktop/thunderbird/patches/firefox31-gnu-105-lz4-restrict-keyword.patch
components/desktop/thunderbird/patches/firefox31-gnu-125-mozalloc.patch
components/desktop/thunderbird/patches/firefox31-gnu-130-xopen.patch
components/desktop/thunderbird/patches/firefox31-sparc-ta-6.patch
components/desktop/thunderbird/patches/thunderbird-01-locale.patch
components/desktop/thunderbird/patches/thunderbird-31-gnu-ReadAheadFile.patch
components/desktop/thunderbird/patches/thunderbird12-00-libnspr_flt4.patch
components/desktop/thunderbird/patches/thunderbird17-jemalloc_linkage.patch
components/desktop/thunderbird/patches/thunderbird20-78-sqlite3-unix-excl.patch
components/desktop/thunderbird/patches/thunderbird21-103-package-warning.patch
components/desktop/thunderbird/patches/thunderbird31-41-updateurl.patch
components/desktop/thunderbird/patches/thunderbird31-501-dup-ctime-def-removal.patch
components/desktop/thunderbird/patches/thunderbird31-502-update-packaging.patch
components/desktop/thunderbird/patches/thunderbird31-503-append-ffssi2-symbol.patch
components/desktop/thunderbird/patches/thunderbird31-504-append-pulseaudio-symbols.patch
components/desktop/thunderbird/patches/thunderbird31-508-lightning-l10-build-all.patch
components/desktop/thunderbird/patches/thunderbird31-509-enable-extensions.patch
components/desktop/thunderbird/patches/thunderbird31-99-mozfind.patch
components/desktop/thunderbird/test/results-32.master
components/desktop/thunderbird/thunderbird-lightning.p5m
components/desktop/thunderbird/thunderbird.license
components/desktop/thunderbird/thunderbird.p5m
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/Makefile	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,186 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+#
+
+COMPILER =	gcc
+
+include ../../../make-rules/shared-macros.mk
+
+COMPONENT_NAME =		firefox
+COMPONENT_VERSION =		31.8.0esr
+COMPONENT_PROJECT_URL =		http://www.mozilla.com/firefox
+COMPONENT_SRC =			mozilla-esr31
+COMPONENT_SRC_NAME =		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE =		$(COMPONENT_SRC_NAME).source.tar.bz2
+COMPONENT_ARCHIVE_HASH = \
+    sha256:4c14021637ba61690ac2b52eff31c9bb96e4a04d334bf934d33932c9c382c50c
+MOZILLA_FTP = 		        http://ftp.mozilla.org/pub/mozilla.org/$(COMPONENT_NAME)/releases/$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE_URL =		$(MOZILLA_FTP)/source/$(COMPONENT_ARCHIVE)
+COMPONENT_BUGDB =		firefox/browser
+
+TPNO=				23616	
+
+IPS_COMPONENT_VERSION =		31.8.0
+
+# There are a set of .xpi files (as given in the LANG_LIST definition below)
+# that we need. These are available under:
+# http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/31.8.0esr/linux-i686/xpi/
+# This downloads the xpi files.
+
+LANG_LIST = ar be bg ca cs da de el es-AR es-CL es-ES et fi \
+	fr he hi-IN hr hu id is it ja kk ko lt lv mk nb-NO nl nn-NO \
+	pl pt-BR pt-PT ro ru sk sl sq sr sv-SE th tr uk vi zh-CN zh-TW
+
+COMPONENT_PREP_ACTION += \
+        ($(MKDIR) xpi ; \
+        cd xpi ; \
+        for l in $(LANG_LIST) ; do \
+                $(WS_TOOLS)/userland-fetch --file $$l.xpi --url $(MOZILLA_FTP)/linux-i686/xpi/ ; \
+        done ; )
+
+
+include $(WS_MAKE_RULES)/prep.mk
+include $(WS_MAKE_RULES)/configure.mk
+include $(WS_MAKE_RULES)/ips.mk
+
+# /usr/gnu/bin needed to pick up the GNU version of tail and readelf.
+# /usr/sbin needed for dtrace.
+PATH =			/usr/gnu/bin:/usr/bin:/usr/sbin
+
+CLEAN_PATHS +=		$(COMPONENT_SRC)
+
+COMPONENT_PRE_CONFIGURE_ACTION += \
+	echo "mk_add_options BUILD_OFFICIAL=1" > .mozconfig ; \
+	echo "mk_add_options MOZILLA_OFFICIAL=1" >> .mozconfig ; \
+	echo "ac_add_options --prefix=/usr" >> .mozconfig ; \
+	echo "ac_add_options --libdir=/usr/lib" >> .mozconfig ; \
+	echo "ac_add_options --mandir=/usr/share/man" >> .mozconfig ; \
+	echo "ac_add_options --enable-official-branding" >> .mozconfig ; \
+	echo "ac_add_options --disable-updater" >> .mozconfig ; \
+	echo "ac_add_options --enable-debug-symbols=no" >> .mozconfig ; \
+	echo "ac_add_options --enable-update-packaging" >> .mozconfig ; \
+	echo "ac_add_options --enable-update-channel=esr" >> .mozconfig ; \
+	echo "ac_add_options --disable-tests" >> .mozconfig ; \
+	echo "ac_add_options --with-system-libevent" >> .mozconfig ; \
+	echo "ac_add_options --with-system-zlib" >> .mozconfig ; \
+	echo "ac_add_options --with-system-bz2" >> .mozconfig ; \
+	echo "ac_add_options --enable-system-ffi" >> .mozconfig ; \
+	echo "ac_add_options --enable-system-sqlite" >> .mozconfig ; \
+	echo "ac_add_options --enable-jemalloc" >> .mozconfig ; \
+	echo "ac_add_options --enable-xinerama" >> .mozconfig ; \
+	echo "ac_add_options --disable-crashreporter" >> .mozconfig ; \
+	echo "ac_add_options --disable-pulseaudio" >> .mozconfig ; \
+	echo "ac_add_options --enable-gstreamer" >> .mozconfig ; \
+	echo "ac_add_options --without-intl-api" >> .mozconfig ; \
+	echo "ac_add_options --enable-system-libffi" >> .mozconfig ; \
+	echo "ac_add_options --enable-ipc" >> .mozconfig ; \
+	echo "ac_add_options --enable-system-pixman" >> .mozconfig ; \
+	echo "ac_add_options --enable-startup-notification" >> .mozconfig ; \
+	echo "ac_add_options --enable-dtrace" >> .mozconfig ;
+
+CXXFLAGS +=		-Wno-invalid-offsetof
+
+CONFIGURE_ENV +=	PKG_CONFIG_PATH=$(CONFIGURE_LIBDIR.$(BITS))/pkgconfig
+CONFIGURE_ENV +=	OS_DEFINES="-D__USE_LEGACY_PROTOTYPES__"
+
+CONFIGURE_ENV +=	MOZCONFIG=$(shell pwd)/.mozconfig
+CONFIGURE_ENV +=	"CC=$(CC)"
+CONFIGURE_ENV +=	"CXX=$(CXX)"
+CONFIGURE_ENV +=	"CFLAGS=$(CFLAGS)"
+CONFIGURE_ENV +=	"CXXFLAGS=$(CXXFLAGS)"
+
+# If the configure options are not explicitly set, then configure fails with:
+# configure: warning: CC=/usr/gcc/4.8/bin/gcc: invalid host type
+# invalid host type
+# configure: warning: CXX=/usr/gcc/4.8/bin/g++: invalid host type
+# invalid host type
+# configure: error: can only configure for one host and one target at a time
+CONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
+CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
+
+COMPONENT_POST_BUILD_ACTION = \
+	(cd $(@D)/browser/installer ; $(ENV) $(COMPONENT_BUILD_ENV) \
+		$(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
+
+COMPONENT_POST_INSTALL_ACTION += \
+	$(CP) $(BUILD_DIR_32)/dist/firefox/precomplete \
+		$(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION)/precomplete ;
+
+COMPONENT_POST_INSTALL_ACTION += \
+        list1='$(LANG_LIST)' ; for f in $$list1 ; do \
+            $(CP) xpi/$$f.xpi \
+                $(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION)/browser/extensions/[email protected] ; \
+        done ;
+
+SIGNED_LIST.i386 = libsoftokn3.so libnssdbm3.so libfreebl3.so
+SIGNED_LIST.sparc = libsoftokn3.so libnssdbm3.so libfreebl_32int_3.so libfreebl_32int64_3.so
+SIGNED_LIST = $(SIGNED_LIST.$(MACH))
+
+COMPONENT_POST_INSTALL_ACTION += \
+	slist='$(SIGNED_LIST)' ; for f in $$slist ; do \
+	    mcs -d $(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION)/$$f ; \
+	    LD_LIBRARY_PATH=$(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION) $(BUILD_DIR_32)/dist/bin/shlibsign -v -i $(PROTOUSRLIBDIR)/firefox-$(IPS_COMPONENT_VERSION)/$$f ; \
+        done ;
+
+ASLR_MODE = $(ASLR_ENABLE)
+
+COMPONENT_TEST_DIR =    $(@D)/js/src
+COMPONENT_TEST_TARGETS=check-jit-test
+COMPONENT_TEST_TRANSFORMS += \
+        '-e "/\(^TEST-PASS\).*/d" '
+
+configure:	$(CONFIGURE_32)
+
+build:          $(BUILD_32)
+
+install:        $(INSTALL_32)
+
+test:           $(TEST_32)
+
+system-test:	$(NO_TESTS)
+
+REQUIRED_PACKAGES += database/sqlite-3
+REQUIRED_PACKAGES += library/desktop/atk
+REQUIRED_PACKAGES += library/desktop/cairo
+REQUIRED_PACKAGES += library/desktop/gdk-pixbuf
+REQUIRED_PACKAGES += library/desktop/gtk2
+REQUIRED_PACKAGES += library/desktop/pango
+REQUIRED_PACKAGES += library/desktop/startup-notification
+REQUIRED_PACKAGES += library/glib2
+REQUIRED_PACKAGES += library/graphics/pixman
+REQUIRED_PACKAGES += library/libevent
+REQUIRED_PACKAGES += library/libffi
+REQUIRED_PACKAGES += library/zlib
+REQUIRED_PACKAGES += system/library
+REQUIRED_PACKAGES += system/library/fontconfig
+REQUIRED_PACKAGES += system/library/freetype-2
+REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
+REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
+REQUIRED_PACKAGES += system/library/libdbus
+REQUIRED_PACKAGES += system/library/libdbus-glib
+REQUIRED_PACKAGES += system/library/math
+REQUIRED_PACKAGES += x11/library/libx11
+REQUIRED_PACKAGES += x11/library/libxext
+REQUIRED_PACKAGES += x11/library/libxrender
+REQUIRED_PACKAGES += x11/library/toolkit/libxt 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/files/all-multi-user-desktop.js	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+// Disable "safe browsing" feature that hogs CPU, HDD, etc.
+pref("browser.safebrowsing.enabled", false);
+pref("browser.safebrowsing.malware.enabled", false);
+
+//  Limit the "location-bar suggestions"
+pref("browser.urlbar.maxRichResults", 3);
+
+// Disable offline/disk caching of web pages
+pref("browser.cache.offline.enable", false);
+pref("browser.cache.disk.enable", false);
+
+// Change the default cache:
+pref("browser.cache.memory.enable",true);
+pref("browser.cache.memory.capacity", 1024);
Binary file components/desktop/firefox/files/firefox-icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/files/firefox-js.pc	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,11 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/lib/firefox
+includedir=/usr/include/firefox
+
+Name: JavaScript
+Description: The Mozilla JavaScript Library
+Version: 17.0
+
+Libs: -L${libdir} -R${libdir}  -lxul -lnspr4
+Cflags: -I${includedir} -I${includedir}/nspr -DXP_UNIX -DJS_THREADSAFE
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/files/firefox-plugin.pc	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,9 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/lib/firefox
+includedir=/usr/include/firefox
+
+Name: Mozilla Plug-In API
+Description: Mozilla Plug-In API
+Version: 17.0
+Cflags: -DXP_UNIX -I${includedir}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/files/firefox-xpcom.pc	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,12 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=/usr/lib/firefox
+includedir=/usr/include/firefox
+idldir=/usr/share/idl/firefox
+
+Name: XPCOM
+Description: The Mozilla Cross Platform Component Library
+Version: 17.0
+
+Libs: -L${libdir} -R${libdir}  -lxul -lmozalloc -lnspr4
+Cflags:-I${includedir} -I${includedir}/nspr -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ -DMOZ_DEFAULT_TOOLKIT=\"cairo-gtk2\" -features=no%except
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/files/firefox.1	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,192 @@
+'\" te
+.TH firefox 1 "10 Jul 2008" "SunOS 5.12" "User Commands"
+.SH "NAME"
+firefox \- Firefox for 
+Oracle Solaris Desktop
+.SH "SYNOPSIS"
+.PP
+\fBfirefox\fR [\fBoptions \&.\&.\&. \fR] [\fB\fIurl\fR\fR]
+.SH "DESCRIPTION"
+.PP
+Firefox is a free, open-source web browser based on the Mozilla codebase\&.
+It is small, fast and easy to use, and offers many advantages over other browsers,
+such as the ability to block pop-up windows\&.
+.SH "OPTIONS"
+.PP
+The following options are supported:
+.sp
+.ne 2
+.mk
+\fB-\fBheight \fIvalue\fR\fR\fR
+.in +24n
+.rt
+Set the height of startup window to \fIvalue\fR\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBh \fRor -\fBhelp \fR\fR
+.in +24n
+.rt
+Display the help message\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBwidth \fIvalue\fR\fR\fR
+.in +24n
+.rt
+Set the width of startup window to \fIvalue\fR\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBv \fRor -\fBversion \fR\fR
+.in +24n
+.rt
+Display the version message\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBP \fIprofile\fR\fR\fR
+.in +24n
+.rt
+Start with the profile named: \fIprofile\fR\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBProfileManager \fR\fR
+.in +24n
+.rt
+Start with profile manager\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBUILocale \fIlocale\fR\fR\fR
+.in +24n
+.rt
+Start with the UI Locale listed: \fIlocale\fR\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBsafe-mode \fR\fR
+.in +24n
+.rt
+Disables extensions and themes for this session\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBjsconsole \fR\fR
+.in +24n
+.rt
+Open the JavaScript console\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBbrowser \fR\fR
+.in +24n
+.rt
+Open a browser window\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBsetDefaultBrowser \fR\fR
+.in +24n
+.rt
+Set this app as the default browser\&.
+.sp
+.sp 1
+.in -24n
+.SH "EXAMPLES"
+.PP
+\fBExample 1: Launching Firefox\fR
+.PP
+.PP
+.nf
+example% \fBfirefox \fR
+.fi
+.SH "EXIT STATUS"
+.PP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+\fB\fB0\fR\fR
+.in +9n
+.rt
+Application
+exited successfully
+.sp
+.sp 1
+.in -9n
+.sp
+.ne 2
+.mk
+\fB\fB1\fR\fR
+.in +9n
+.rt
+Application
+exited with failure
+.sp
+.sp 1
+.in -9n
+.SH "FILES"
+.PP
+The following files are used by this application:
+.sp
+.ne 2
+.mk
+\fB\fB/usr/bin/firefox\fR \fR
+.sp .6
+.in +4
+Executable for Firefox application
+.sp
+.sp 1
+.in -4
+.sp
+.ne 2
+.mk
+\fB\fB$HOME/\&.mozilla/firefox\fR \fR
+.sp .6
+.in +4
+User configuration files for Firefox
+.sp
+.sp 1
+.in -4
+.SH "SEE ALSO"
+.PP
+For more information about firefox, please refer to
+\fBhttp://www\&.mozilla\&.org/firefox\fR
+.PP
+Refer to Help->Firefox Help for more information\&.
+.SH "NOTES"
+.PP
+Updated by Evan Yan, Sun Microsystems Inc\&., 2008\&. 
+...\" created by instant / solbook-to-man, Tue 27 Jan 2015, 17:22
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/files/firefox.desktop	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,45 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Firefox Web Browser
+Name[cs]=Firefox WWW prohlížeč
+Name[cz]=Firefox WWW prohlížeč
+Name[de]=Firefox Webbrowser
+Name[es]=Firefox Navegador web
+Name[fr]=Firefox Navigateur Web
+Name[hu]=Firefox Internet böngésző
+Name[it]=Firefox Browser Web
+Name[ja]=Firefox Web ブラウザ
+Name[ko]=Firefox 웹 브라우저
+Name[pl]=Firefox Przeglądarka sieci Web
+Name[pt_BR]=Firefox Navegador da Web
+Name[ru]=Firefox Веб-браузер
+Name[sv]=Firefox Webbläsare
+Name[zh_CN]=Firefox Web 浏览器
+Name[zh_HK]=Firefox 網路瀏覽器
+Name[zh_TW]=Firefox 網路瀏覽器
+GenericName=Web Browser
+Comment=Browse the worldwide web 
+Comment[cs]=Prohlížení Internetu
+Comment[cz]=Prohlížení Internetu
+Comment[de]=Browsen im Internet
+Comment[es]=Examinar Internet
+Comment[fr]=Parcourir Internet
+Comment[hu]=Az internet böngészése
+Comment[it]=Naviga in Internet
+Comment[ja]=インターネットのブラウズ
+Comment[ko]=인터넷 검색
+Comment[pl]=Przeglądaj Internet
+Comment[pt_BR]=Navega pela Internet
+Comment[ru]=Работать в интернете
+Comment[sv]=Surfa på Internet
+Comment[zh_CN]=浏览互联网
+Comment[zh_HK]=瀏覽網際網路
+Comment[zh_TW]=瀏覽網際網路
+Exec=/usr/bin/firefox %u
+TryExec=/usr/bin/firefox
+Icon=firefox-icon
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Application;Network;X-Sun-Quick-Start;
+MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/firefox-bookmarks.p5m	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,40 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+#
+
+set name=pkg.fmri \
+    value=pkg:/web/data/[email protected]$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="Firefox's default bookmark"
+set name=com.oracle.info.description value="Mozilla Firefox Web browser"
+set name=com.oracle.info.tpno value=$(TPNO)
+set name=info.classification \
+    value=org.opensolaris.category.2008:Applications/Internet
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=org.opensolaris.arc-caseid value=PSARC/2014/085
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+file $(MACH32)/dist/bin/browser/defaults/profile/bookmarks.html \
+    path=usr/lib/firefox/defaults/profile/bookmarks.html
+license firefox.license license="Mozilla Public License v2.0"
+depend type=require fmri=web/browser/firefox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/firefox-multi-user-desktop.p5m	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,41 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+#
+
+set name=pkg.fmri \
+    value=pkg:/web/browser/firefox/[email protected]$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary \
+    value="Multi User Desktop optimization for Mozilla Firefox Web browser"
+set name=info.classification \
+    value="org.opensolaris.category.2008:System/Administration and Configuration"
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=org.opensolaris.arc-caseid value=PSARC/2014/085
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+link path=usr/lib/firefox/defaults/pref/all-multi-user-desktop.js \
+    target=../../greprefs/all-multi-user-desktop.js
+file files/all-multi-user-desktop.js \
+    path=usr/lib/firefox/greprefs/all-multi-user-desktop.js
+license firefox.license license="Mozilla Public License v2.0"
+depend type=require fmri=web/browser/firefox
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/firefox.license	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,1369 @@
+Copyright (c) 2008, 2014, Oracle and/or its affiliates. All rights reserved.
+
+Mozilla Public License 2.0 
+Android Open Source License 
+ANGLE License 
+Apache License 2.0 
+Apple License 
+Apple/Mozilla NPRuntime License 
+Apple/Torch Mobile License 
+Cairo Component Licenses 
+Chromium License 
+dtoa License 
+Eclipse Distribution License 
+Expat License 
+Firebug License 
+gfxFontList License 
+Google BSD License 
+Google VP8 License 
+halloc License 
+HarfBuzz License 
+ICU License 
+Japan Network Information Center License 
+jemalloc License 
+jQuery License 
+Kiss FFT License 
+libevent License 
+libnestegg License 
+libsoundtouch License 
+OpenVision License 
+praton License 
+qcms License 
+Red Hat xdg_user_dir_lookup License 
+Skia License 
+Snappy License 
+SunSoft License 
+Unicode License 
+University of California License 
+University of Szeged License    
+
+This software is based in part on the work of the Independent JPEG Group
+The libpng graphics library (Glenn Randers-Pehrson and team) 
+The Nullsoft Scriptable Install System (Amir Szekely and team)      
+
+Mozilla Public License 2.0
+1. Definitions
+1.1. "Contributor" 
+means each individual or legal entity that creates, contributes to the creation of, or owns Covered Software.
+1.2. "Contributor Version" 
+means the combination of the Contributions of others (if any) used by a Contributor and that particular Contributor's Contribution.
+1.3. "Contribution" 
+means Covered Software of a particular Contributor.
+1.4. "Covered Software" 
+means Source Code Form to which the initial Contributor has attached the notice in Exhibit A, the Executable Form of such Source Code Form, and Modifications of such Source Code Form, in each case including portions thereof.
+1.5. "Incompatible With Secondary Licenses" 
+means
+a. that the initial Contributor has attached the notice described in Exhibit B to the Covered Software; or
+b. that the Covered Software was made available under the terms of version 1.1 or earlier of the License, but not also under the terms of a Secondary License.
+1.6. "Executable Form" 
+means any form of the work other than Source Code Form.
+1.7. "Larger Work" 
+means a work that combines Covered Software with other material, in a separate file or files, that is not Covered Software.
+1.8. "License" 
+means this document.
+1.9. "Licensable" 
+means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently, any and all of the rights conveyed by this License.
+1.10. "Modifications" 
+means any of the following:
+a. any file in Source Code Form that results from an addition to, deletion from, or modification of the contents of Covered Software; or
+b. any new file in Source Code Form that contains any Covered Software.
+1.11. "Patent Claims" of a Contributor 
+means any patent claim(s), including without limitation, method, process, and apparatus claims, in any patent Licensable by such Contributor that would be infringed, but for the grant of the License, by the making, using, selling, offering for sale, having made, import, or transfer of either its Contributions or its Contributor Version.
+1.12. "Secondary License" 
+means either the GNU General Public License, Version 2.0, the GNU Lesser General Public License, Version 2.1, the GNU Affero General Public License, Version 3.0, or any later versions of those licenses.
+1.13. "Source Code Form" 
+means the form of the work preferred for making modifications.
+1.14. "You" (or "Your") 
+means an individual or a legal entity exercising rights under this License. For legal entities, "You" includes any entity that controls, is controlled by, or is under common control with You. For purposes of this definition, "control" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
+2. License Grants and Conditions
+2.1. Grants
+Each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license:
+a. under intellectual property rights (other than patent or trademark) Licensable by such Contributor to use, reproduce, make available, modify, display, perform, distribute, and otherwise exploit its Contributions, either on an unmodified basis, with Modifications, or as part of a Larger Work; and
+b. under Patent Claims of such Contributor to make, use, sell, offer for sale, have made, import, and otherwise transfer either its Contributions or its Contributor Version.
+2.2. Effective Date
+The licenses granted in Section 2.1 with respect to any Contribution become effective for each Contribution on the date the Contributor first distributes such Contribution.
+2.3. Limitations on Grant Scope
+The licenses granted in this Section 2 are the only rights granted under this License. No additional rights or licenses will be implied from the distribution or licensing of Covered Software under this License. Notwithstanding Section 2.1(b) above, no patent license is granted by a Contributor:
+a. for any code that a Contributor has removed from Covered Software; or
+b. for infringements caused by: (i) Your and any other third party's modifications of Covered Software, or (ii) the combination of its Contributions with other software (except as part of its Contributor Version); or
+c. under Patent Claims infringed by Covered Software in the absence of its Contributions.
+This License does not grant any rights in the trademarks, service marks, or logos of any Contributor (except as may be necessary to comply with the notice requirements in Section 3.4).
+2.4. Subsequent Licenses
+No Contributor makes additional grants as a result of Your choice to distribute the Covered Software under a subsequent version of this License (see Section 10.2) or under the terms of a Secondary License (if permitted under the terms of Section 3.3).
+2.5. Representation
+Each Contributor represents that the Contributor believes its Contributions are its original creation(s) or it has sufficient rights to grant the rights to its Contributions conveyed by this License.
+2.6. Fair Use
+This License is not intended to limit any rights You have under applicable copyright doctrines of fair use, fair dealing, or other equivalents.
+2.7. Conditions
+Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted in Section 2.1.
+3. Responsibilities
+3.1. Distribution of Source Form
+All distribution of Covered Software in Source Code Form, including any Modifications that You create or to which You contribute, must be under the terms of this License. You must inform recipients that the Source Code Form of the Covered Software is governed by the terms of this License, and how they can obtain a copy of this License. You may not attempt to alter or restrict the recipients' rights in the Source Code Form.
+3.2. Distribution of Executable Form
+If You distribute Covered Software in Executable Form then:
+a. such Covered Software must also be made available in Source Code Form, as described in Section 3.1, and You must inform recipients of the Executable Form how they can obtain a copy of such Source Code Form by reasonable means in a timely manner, at a charge no more than the cost of distribution to the recipient; and
+b. You may distribute such Executable Form under the terms of this License, or sublicense it under different terms, provided that the license for the Executable Form does not attempt to limit or alter the recipients' rights in the Source Code Form under this License.
+3.3. Distribution of a Larger Work
+You may create and distribute a Larger Work under terms of Your choice, provided that You also comply with the requirements of this License for the Covered Software. If the Larger Work is a combination of Covered Software with a work governed by one or more Secondary Licenses, and the Covered Software is not Incompatible With Secondary Licenses, this License permits You to additionally distribute such Covered Software under the terms of such Secondary License(s), so that the recipient of the Larger Work may, at their option, further distribute the Covered Software under the terms of either this License or such Secondary License(s).
+3.4. Notices
+You may not remove or alter the substance of any license notices (including copyright notices, patent notices, disclaimers of warranty, or limitations of liability) contained within the Source Code Form of the Covered Software, except that You may alter any license notices to the extent required to remedy known factual inaccuracies.
+3.5. Application of Additional Terms
+You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Software. However, You may do so only on Your own behalf, and not on behalf of any Contributor. You must make it absolutely clear that any such warranty, support, indemnity, or liability obligation is offered by You alone, and You hereby agree to indemnify every Contributor for any liability incurred by such Contributor as a result of warranty, support, indemnity or liability terms You offer. You may include additional disclaimers of warranty and limitations of liability specific to any jurisdiction.
+4. Inability to Comply Due to Statute or Regulation
+If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Software due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be placed in a text file included with all distributions of the Covered Software under this License. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
+5. Termination
+5.1.
+The rights granted under this License will terminate automatically if You fail to comply with any of its terms. However, if You become compliant, then the rights granted under this License from a particular Contributor are reinstated (a) provisionally, unless and until such Contributor explicitly and finally terminates Your grants, and (b) on an ongoing basis, if such Contributor fails to notify You of the non-compliance by some reasonable means prior to 60 days after You have come back into compliance. Moreover, Your grants from a particular Contributor are reinstated on an ongoing basis if such Contributor notifies You of the non-compliance by some reasonable means, this is the first time You have received notice of non-compliance with this License from such Contributor, and You become compliant prior to 30 days after Your receipt of the notice.
+5.2.
+If You initiate litigation against any entity by asserting a patent infringement claim (excluding declaratory judgment actions, counter-claims, and cross-claims) alleging that a Contributor Version directly or indirectly infringes any patent, then the rights granted to You by any and all Contributors for the Covered Software under Section 2.1 of this License shall terminate.
+5.3.
+In the event of termination under Sections 5.1 or 5.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or Your distributors under this License prior to termination shall survive termination.
+6. Disclaimer of Warranty
+Covered Software is provided under this License on an "as is" basis, without warranty of any kind, either expressed, implied, or statutory, including, without limitation, warranties that the Covered Software is free of defects, merchantable, fit for a particular purpose or non-infringing. The entire risk as to the quality and performance of the Covered Software is with You. Should any Covered Software prove defective in any respect, You (not any Contributor) assume the cost of any necessary servicing, repair, or correction. This disclaimer of warranty constitutes an essential part of this License. No use of any Covered Software is authorized under this License except under this disclaimer.
+7. Limitation of Liability
+Under no circumstances and under no legal theory, whether tort (including negligence), contract, or otherwise, shall any Contributor, or anyone who distributes Covered Software as permitted above, be liable to You for any direct, indirect, special, incidental, or consequential damages of any character including, without limitation, damages for lost profits, loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such party shall have been informed of the possibility of such damages. This limitation of liability shall not apply to liability for death or personal injury resulting from such party's negligence to the extent applicable law prohibits such limitation. Some jurisdictions do not allow the exclusion or limitation of incidental or consequential damages, so this exclusion and limitation may not apply to You.
+8. Litigation
+Any litigation relating to this License may be brought only in the courts of a jurisdiction where the defendant maintains its principal place of business and such litigation shall be governed by laws of that jurisdiction, without reference to its conflict-of-law provisions. Nothing in this Section shall prevent a party's ability to bring cross-claims or counter-claims.
+9. Miscellaneous
+This License represents the complete agreement concerning the subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not be used to construe this License against a Contributor.
+10. Versions of the License
+10.1. New Versions
+Mozilla Foundation is the license steward. Except as provided in Section 10.3, no one other than the license steward has the right to modify or publish new versions of this License. Each version will be given a distinguishing version number.
+10.2. Effect of New Versions
+You may distribute the Covered Software under the terms of the version of the License under which You originally received the Covered Software, or under the terms of any subsequent version published by the license steward.
+10.3. Modified Versions
+If you create software not governed by this License, and you want to create a new license for such software, you may create and use a modified version of this License if you rename the license and remove any references to the name of the license steward (except to note that such modified license differs from this License).
+10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses
+If You choose to distribute Source Code Form that is Incompatible With Secondary Licenses under the terms of this version of the License, the notice described in Exhibit B of this License must be attached.
+Exhibit A - Source Code Form License Notice
+This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
+If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
+You may add additional accurate notices of copyright ownership.
+Exhibit B - "Incompatible With Secondary Licenses" Notice
+This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
+
+Android Open Source License
+This license applies to various files in the Mozilla codebase, including those in the directory gfx/skia/.
+ Copyright 2009, The Android Open Source Project
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+  * Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+  * Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
+ EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ANGLE License
+This license applies to files in the directory gfx/angle/.
+Copyright (C) 2002-2010 The ANGLE Project Authors. 
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+    Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+
+    Redistributions in binary form must reproduce the above 
+    copyright notice, this list of conditions and the following
+    disclaimer in the documentation and/or other materials provided
+    with the distribution.
+
+    Neither the name of TransGaming Inc., Google Inc., 3DLabs Inc.
+    Ltd., nor the names of their contributors may be used to endorse
+    or promote products derived from this software without specific
+    prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGE.
+
+Apache License 2.0
+This license applies to various files in the Mozilla codebase.
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+Apple License
+This license applies to certain files in the directories js/src/assembler/assembler/, js/src/assembler/wtf/, js/src/yarr, content/media/webaudio/blink, and widget/cocoa.
+Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Apple/Mozilla NPRuntime License
+This license applies to the file dom/plugins/base/npruntime.h.
+Copyright ? 2004, Apple Computer, Inc. and The Mozilla Foundation. 
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+1. Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+notice, this list of conditions and the following disclaimer in the
+documentation and/or other materials provided with the distribution.
+3. Neither the names of Apple Computer, Inc. ("Apple") or The Mozilla
+Foundation ("Mozilla") nor the names of their contributors may be used
+to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY APPLE, MOZILLA AND THEIR CONTRIBUTORS "AS
+IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE, MOZILLA OR
+THEIR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Apple/Torch Mobile License
+This license applies to the following files:
+js/src/assembler/wtf/Assertions.cpp 
+js/src/assembler/wtf/Platform.h 
+Copyright (C) 2003, 2006, 2007 Apple Inc.  All rights reserved.
+Copyright (C) 2007-2009 Torch Mobile, Inc.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE COMPUTER, INC. OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Cairo Component Licenses
+This license, with different copyright holders, applies to certain files in the directory gfx/cairo/. The copyright holders and the applicable ranges of dates are as follows: 
+2004 Richard D. Worth 
+2004, 2005 Red Hat, Inc. 
+2003 USC, Information Sciences Institute 
+2004 David Reveman 
+2005 Novell, Inc. 
+2004 David Reveman, Peter Nilsson 
+2000 Keith Packard, member of The XFree86 Project, Inc. 
+2005 Lars Knoll & Zack Rusin, Trolltech 
+1998, 2000, 2002, 2004 Keith Packard 
+2004 Nicholas Miell 
+2005 Trolltech AS 
+2000 SuSE, Inc. 
+2003 Carl Worth 
+1987, 1988, 1989, 1998 The Open Group 
+1987, 1988, 1989 Digital Equipment Corporation, Maynard, Massachusetts. 
+1998 Keith Packard 
+2003 Richard Henderson 
+Copyright ? <date> <copyright holder>
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without
+fee, provided that the above copyright notice appear in all copies
+and that both that copyright notice and this permission notice
+appear in supporting documentation, and that the name of
+<copyright holder> not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior permission.
+<copyright holder> makes no representations about the suitability of this
+software for any purpose. It is provided "as is" without express or
+implied warranty.
+
+<COPYRIGHT HOLDER> DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
+NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+Chromium License
+This license applies to parts of the code in editor/libeditor/base/nsEditorEventListener.cpp, widget/cocoa/GfxInfo.mm and also some files in the directories ipc/chromium/, dom/plugins/, tools/profiler/sps/, gfx/ots/, gfx/ycbcr and content/media/webspeech/recognition/. 
+Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+   * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+   * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+   * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+dtoa License
+This license applies to the file nsprpub/pr/src/misc/dtoa.c.
+The author of this software is David M. Gay.
+
+Copyright (c) 1991, 2000, 2001 by Lucent Technologies.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose without fee is hereby granted, provided that this entire notice
+is included in all copies of any software which is or includes a copy
+or modification of this software and in all copies of the supporting
+documentation for such software.
+
+THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED
+WARRANTY.  IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY
+REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY
+OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE.
+
+Eclipse Distribution License
+This license applies to certain files in the directory browser/devtools/sourceeditor/orion/.
+Eclipse Distribution License - v 1.0
+
+Copyright (c) 2007, Eclipse Foundation, Inc. and its licensors.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice, this
+  list of conditions and the following disclaimer in the documentation and/or
+  other materials provided with the distribution.
+* Neither the name of the Eclipse Foundation, Inc. nor the names of its
+  contributors may be used to endorse or promote products derived from this
+  software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Expat License
+This license applies to certain files in the directory parser/expat/.
+Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd
+                               and Clark Cooper
+Copyright (c) 2001, 2002, 2003 Expat maintainers.
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Firebug License
+This license applies to the code browser/devtools/webconsole/NetworkHelper.jsm.
+Copyright (c) 2007, Parakey Inc.
+All rights reserved.
+
+Redistribution and use of this software in source and binary forms, with or
+without modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above
+  copyright notice, this list of conditions and the
+  following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the
+  following disclaimer in the documentation and/or other
+  materials provided with the distribution.
+
+* Neither the name of Parakey Inc. nor the names of its
+  contributors may be used to endorse or promote products
+  derived from this software without specific prior
+  written permission of Parakey Inc.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+gfxFontList License
+This license applies to the files gfx/thebes/gfxMacPlatformFontList.mm and gfx/thebes/gfxPlatformFontList.cpp. 
+Copyright (C) 2006 Apple Computer, Inc.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1.  Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+2.  Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in the
+    documentation and/or other materials provided with the distribution.
+3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+    its contributors may be used to endorse or promote products derived
+    from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Google BSD License
+This license applies to files in the directories toolkit/crashreporter/google-breakpad/, camino/google-breakpad/ and toolkit/components/protobuf/.
+Copyright (c) 2006, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+    * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Google VP8 License
+This license applies to certain files in the directory media/libvpx.
+Copyright (c) 2010, Google, Inc.
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+- Redistributions of source code must retain the above copyright
+  notice, this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above
+  copyright notice, this list of conditions and the following
+  disclaimer in the documentation and/or other materials provided
+  with the distribution.
+
+- Neither the name of Google nor the names of its contributors may
+  be used to endorse or promote products derived from this software
+  without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Subject to the terms and conditions of the above License, Google
+hereby grants to You a perpetual, worldwide, non-exclusive,
+no-charge, royalty-free, irrevocable (except as stated in this
+section) patent license to make, have made, use, offer to sell, sell,
+import, and otherwise transfer this implementation of VP8, where such
+license applies only to those patent claims, both currently owned by
+Google and acquired in the future, licensable by Google that are
+necessarily infringed by this implementation of VP8. If You or your
+agent or exclusive licensee institute or order or agree to the
+institution of patent litigation against any entity (including a
+cross-claim or counterclaim in a lawsuit) alleging that this
+implementation of VP8 or any code incorporated within this
+implementation of VP8 constitutes direct or contributory patent
+infringement, or inducement of patent infringement, then any rights
+granted to You under this License for this implementation of VP8
+shall terminate as of the date such litigation is filed.
+
+halloc License
+This license applies to certain files in the directory media/libnestegg/src.
+Copyright (c) 2004-2010 Alex Pankratov. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the name of the project nor the names of its contributors may be
+      used to endorse or promote products derived from this software without
+      specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+HarfBuzz License
+This license, with different copyright holders, applies to the files in the directory gfx/harfbuzz/. The copyright holders and the applicable ranges of dates are as follows:
+1998-2004 David Turner and Werner Lemberg 
+2004, 2007, 2008, 2009, 2010 Red Hat, Inc. 
+2006 Behdad Esfahbod 
+2007 Chris Wilson 
+2009 Keith Stribley <[email protected]> 
+2010 Mozilla Foundation 
+Copyright (C) <date> <copyright holder>
+
+ This is part of HarfBuzz, an OpenType Layout engine library.
+
+Permission is hereby granted, without written agreement and without
+license or royalty fees, to use, copy, modify, and distribute this
+software and its documentation for any purpose, provided that the
+above copyright notice and the following two paragraphs appear in
+all copies of this software.
+
+IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
+DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
+IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
+THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
+BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
+PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
+
+ICU License
+This license applies to files in the intl/icu directory and to some code in the gfx/thebes directory.
+ICU License - ICU 1.8.1 and later
+
+COPYRIGHT AND PERMISSION NOTICE
+
+Copyright (c) 1995-2012 International Business Machines Corporation and
+others
+
+All rights reserved.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, provided that the above copyright notice(s) and this
+permission notice appear in all copies of the Software and that both the
+above copyright notice(s) and this permission notice appear in supporting
+documentation.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE
+BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES,
+OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
+ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall
+not be used in advertising or otherwise to promote the sale, use or other
+dealings in this Software without prior written authorization of the
+copyright holder.
+
+All trademarks and registered trademarks mentioned herein are the property
+of their respective owners. 
+
+Japan Network Information Center License
+This license applies to certain files in the directory netwerk/dns/src/.
+Copyright (c) 2001,2002 Japan Network Information Center.
+All rights reserved.
+ 
+By using this file, you agree to the terms and conditions set forth below.
+
+     LICENSE TERMS AND CONDITIONS 
+
+The following License Terms and Conditions apply, unless a different
+license is obtained from Japan Network Information Center ("JPNIC"),
+a Japanese association, Kokusai-Kougyou-Kanda Bldg 6F, 2-3-4 Uchi-Kanda,
+Chiyoda-ku, Tokyo 101-0047, Japan.
+
+1. Use, Modification and Redistribution (including distribution of any
+   modified or derived work) in source and/or binary forms is permitted
+   under this License Terms and Conditions.
+
+2. Redistribution of source code must retain the copyright notices as they
+   appear in each source code file, this License Terms and Conditions.
+
+3. Redistribution in binary form must reproduce the Copyright Notice,
+   this License Terms and Conditions, in the documentation and/or other
+   materials provided with the distribution.  For the purposes of binary
+   distribution the "Copyright Notice" refers to the following language:
+   "Copyright (c) 2000-2002 Japan Network Information Center. All rights
+   reserved."
+
+4. The name of JPNIC may not be used to endorse or promote products
+   derived from this Software without specific prior written approval of
+   JPNIC.
+
+5. Disclaimer/Limitation of Liability: THIS SOFTWARE IS PROVIDED BY JPNIC
+   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+   PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL JPNIC BE LIABLE
+   FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+   BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+   ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+jemalloc License
+This license applies to files in the directories memory/mozjemalloc/ and memory/jemalloc/. 
+Copyright (C) 2002-2012 Jason Evans <[email protected]>.
+All rights reserved.
+Copyright (C) 2007-2012 Mozilla Foundation.  All rights reserved.
+Copyright (C) 2009-2012 Facebook, Inc.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice(s), this list of conditions and the following disclaimer as
+   the first lines of this file unmodified other than the possible
+   addition of one or more copyright notices.
+2. Redistributions in binary form must reproduce the above copyright
+   notice(s), this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+jQuery License
+This license applies to files in the directory mail/jquery/. Furthermore, the file browser/base/content/tabview/iq.js incorporates work from jQuery.
+Copyright (c) 2010 John Resig, http://jquery.com/
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Kiss FFT License
+This license applies to files in the directory media/kiss_fft/.
+Copyright (c) 2003-2010 Mark Borgerding
+
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+    * Redistributions of source code must retain the above copyright notice,
+      this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright notice,
+      this list of conditions and the following disclaimer in the documentation
+      and/or other materials provided with the distribution.
+    * Neither the author nor the names of any contributors may be used to
+      endorse or promote products derived from this software without specific
+      prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+libevent License
+This license applies to files in the directory ipc/chromium/src/third_party/libevent/. 
+Copyright 2000-2002 Niels Provos <[email protected]>
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+   derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+libnestegg License
+This license applies to certain files in the directory media/libnestegg. 
+Copyright ? 2010 Mozilla Foundation
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+libsoundtouch License
+This license applies to certain files in the directory media/libsoundtouch/src/. 
+The SoundTouch Library Copyright ? Olli Parviainen 2001-2012
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+
+OpenVision License
+This license applies to the file extensions/auth/gssapi.h.
+Copyright 1993 by OpenVision Technologies, Inc.
+
+Permission to use, copy, modify, distribute, and sell this software
+and its documentation for any purpose is hereby granted without fee,
+provided that the above copyright notice appears in all copies and
+that both that copyright notice and this permission notice appear in
+supporting documentation, and that the name of OpenVision not be used
+in advertising or publicity pertaining to distribution of the software
+without specific, written prior permission. OpenVision makes no
+representations about the suitability of this software for any
+purpose.  It is provided "as is" without express or implied warranty.
+
+OPENVISION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
+EVENT SHALL OPENVISION BE LIABLE FOR ANY SPECIAL, INDIRECT OR
+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+praton License
+This license applies to the file nsprpub/pr/src/misc/praton.c.
+Copyright (c) 1983, 1990, 1993
+   The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+
+Portions Copyright (c) 1993 by Digital Equipment Corporation.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies, and that
+the name of Digital Equipment Corporation not be used in advertising or
+publicity pertaining to distribution of the document or software without
+specific, written prior permission.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
+CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+SOFTWARE.
+
+
+Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
+Portions Copyright (c) 1996-1999 by Internet Software Consortium.
+
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+qcms License
+This license applies to certain files in the directory gfx/qcms/.
+Copyright (C) 2009 Mozilla Corporation
+Copyright (C) 1998-2007 Marti Maria
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation 
+files (the "Software"), to deal in the Software without restriction, 
+including without limitation the rights to use, copy, modify, merge, 
+publish, distribute, sublicense, and/or sell copies of the Software, 
+and to permit persons to whom the Software is furnished to do so, subject 
+to the following conditions:
+
+The above copyright notice and this permission notice shall be included 
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Red Hat xdg_user_dir_lookup License
+This license applies to the xdg_user_dir_lookup function in xpcom/io/SpecialSystemDirectory.cpp.
+Copyright (c) 2007 Red Hat, Inc.
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation files
+(the "Software"), to deal in the Software without restriction,
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, sublicense, and/or sell copies of the Software,
+and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions: 
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software. 
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
+Skia License
+This license applies to certain files in the directory gfx/skia/.
+Copyright (c) 2011 Google Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+* Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+* Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Snappy License
+This license applies to certain files in the directory other-licenses/snappy/.
+Copyright 2011, Google Inc.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+    * Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the following disclaimer
+in the documentation and/or other materials provided with the
+distribution.
+    * Neither the name of Google Inc. nor the names of its
+contributors may be used to endorse or promote products derived from
+this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+SunSoft License
+This license applies to the ICC_H block in gfx/qcms/qcms.h.
+Copyright (c) 1994-1996 SunSoft, Inc.
+
+                    Rights Reserved
+
+Permission is hereby granted, free of charge, to any person 
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without restrict- 
+ion, including without limitation the rights to use, copy, modify, 
+merge, publish distribute, sublicense, and/or sell copies of the 
+Software, and to permit persons to whom the Software is furnished 
+to do so, subject to the following conditions: 
+ 
+The above copyright notice and this permission notice shall be 
+included in all copies or substantial portions of the Software. 
+ 
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-
+INFRINGEMENT.  IN NO EVENT SHALL SUNSOFT, INC. OR ITS PARENT 
+COMPANY BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 
+OTHER DEALINGS IN THE SOFTWARE. 
+ 
+Except as contained in this notice, the name of SunSoft, Inc. 
+shall not be used in advertising or otherwise to promote the 
+sale, use or other dealings in this Software without written 
+authorization from SunSoft Inc. 
+
+Unicode License
+This license applies to certain files in the directories intl/icu and js/src/vm. 
+Copyright ? 1991-2012 Unicode, Inc. All rights reserved. Distributed
+under the Terms of Use in http://www.unicode.org/copyright.html.
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of the Unicode data files and any associated documentation (the
+"Data Files") or Unicode software and any associated documentation (the
+"Software") to deal in the Data Files or Software without restriction,
+including without limitation the rights to use, copy, modify, merge,
+publish, distribute, and/or sell copies of the Data Files or Software,
+and to permit persons to whom the Data Files or Software are furnished
+to do so, provided that (a) the above copyright notice(s) and this
+permission notice appear with all copies of the Data Files or Software,
+(b) both the above copyright notice(s) and this permission notice appear
+in associated documentation, and (c) there is clear notice in each
+modified Data File or in the Software as well as in the documentation
+associated with the Data File(s) or Software that the data or software
+has been modified.
+
+THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF
+ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
+INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
+OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
+OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THE DATA FILES OR SOFTWARE.
+
+Except as contained in this notice, the name of a copyright holder shall
+not be used in advertising or otherwise to promote the sale, use or other
+dealings in these Data Files or Software without prior written
+authorization of the copyright holder.
+
+University of California License
+This license applies to the following files or, in the case of directories, certain files in those directories:
+dbm/ 
+db/mork/src/morkQuickSort.cpp 
+xpcom/glue/nsQuickSort.cpp 
+nsprpub/pr/src/misc/praton.c 
+media/mtransport/third_party/nICEr/src/stun/addrs.c 
+Copyright (c) 1990, 1993
+ The Regents of the University of California.  All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+[3 Deleted as of 22nd July 1999; see
+    ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
+    for details]
+4. Neither the name of the University nor the names of its contributors
+   may be used to endorse or promote products derived from this software
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+
+University of Szeged License
+This license applies to certain files in the directory js/src/assembler/assembler/.
+Copyright (C) 2009 University of Szeged
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY UNIVERSITY OF SZEGED ``AS IS'' AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL UNIVERSITY OF SZEGED OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Other Required Notices
+This software is based in part on the work of the Independent JPEG Group. 
+
+Optional Notices
+Some permissive software licenses request but do not require an acknowledgement of the use of their software. We are very grateful to the following people and projects for their contributions to this product:
+The libpng graphics library (Glenn Randers-Pehrson and team) 
+The Nullsoft Scriptable Install System (Amir Szekely and team) 
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/firefox.p5m	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,169 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+#
+
+# pkg.linted actions are needed to prevent bad RUNPATH lint errors.
+<transform file path=usr.*/man/.+ -> default mangler.man.stability uncommitted>
+<transform file path=usr/lib/firefox/(.+)$ -> \
+    set action.hash usr/lib/firefox-$(IPS_COMPONENT_VERSION)/%<1> >
+set name=pkg.fmri \
+    value=pkg:/web/browser/[email protected]$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
+set name=pkg.summary value="Mozilla Firefox Web browser"
+set name=com.oracle.info.description value="Mozilla Firefox Web browser"
+set name=com.oracle.info.tpno value=$(TPNO)
+set name=info.classification \
+    value=org.opensolaris.category.2008:Applications/Internet
+set name=info.source-url value=$(COMPONENT_ARCHIVE_URL)
+set name=info.upstream-url value=$(COMPONENT_PROJECT_URL)
+set name=org.opensolaris.arc-caseid value=PSARC/2014/085
+set name=org.opensolaris.consolidation value=$(CONSOLIDATION)
+link path=usr/bin/firefox target=../lib/firefox/firefox
+file path=usr/lib/firefox/application.ini
+file path=usr/lib/firefox/browser/blocklist.xml
+file path=usr/lib/firefox/browser/chrome.manifest
+file path=usr/lib/firefox/browser/chrome/icons/default/default16.png
+file path=usr/lib/firefox/browser/chrome/icons/default/default32.png
+file path=usr/lib/firefox/browser/chrome/icons/default/default48.png
+file path=usr/lib/firefox/browser/components/components.manifest
+file path=usr/lib/firefox/browser/components/libbrowsercomps.so \
+    pkg.depend.bypass-generate=.* pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/[email protected]
+file path=usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/icon.png
+file path=usr/lib/firefox/browser/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
+file path=usr/lib/firefox/browser/icons/mozicon128.png
+file path=usr/lib/firefox/browser/omni.ja
+file path=usr/lib/firefox/browser/searchplugins/amazondotcom.xml
+file path=usr/lib/firefox/browser/searchplugins/bing.xml
+file path=usr/lib/firefox/browser/searchplugins/eBay.xml
+file path=usr/lib/firefox/browser/searchplugins/google.xml
+file path=usr/lib/firefox/browser/searchplugins/twitter.xml
+file path=usr/lib/firefox/browser/searchplugins/wikipedia.xml
+file path=usr/lib/firefox/browser/searchplugins/yahoo.xml
+file path=usr/lib/firefox/chrome.manifest
+file path=usr/lib/firefox/components/components.manifest
+file path=usr/lib/firefox/components/libdbusservice.so \
+    pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/components/libmozgnome.so \
+    pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/cpu/sparcv8plus/libnspr_flt4.so variant.arch=sparc
+file path=usr/lib/firefox/defaults/pref/channel-prefs.js
+file path=usr/lib/firefox/dependentlibs.list
+file path=usr/lib/firefox/firefox mode=0555 pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/firefox-bin mode=0555 \
+    pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/libfreebl3.chk variant.arch=i386
+file path=usr/lib/firefox/libfreebl3.so com.oracle.elfsign=false \
+    pkg.linted.userland.action001.3=true variant.arch=i386
+file path=usr/lib/firefox/libfreebl_32fpu_3.chk variant.arch=sparc
+file path=usr/lib/firefox/libfreebl_32fpu_3.so com.oracle.elfsign=false \
+    pkg.linted.userland.action001.3=true variant.arch=sparc
+file path=usr/lib/firefox/libfreebl_32int64_3.chk variant.arch=sparc
+file path=usr/lib/firefox/libfreebl_32int64_3.so com.oracle.elfsign=false \
+    pkg.linted.userland.action001.3=true variant.arch=sparc
+file path=usr/lib/firefox/libmozalloc.so pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/libnspr4.so
+file path=usr/lib/firefox/libnss3.so pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/libnssckbi.so pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/libnssdbm3.chk
+file path=usr/lib/firefox/libnssdbm3.so com.oracle.elfsign=false \
+    pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/libnssutil3.so pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/libplc4.so pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/libplds4.so pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/libsmime3.so pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/libsoftokn3.chk
+file path=usr/lib/firefox/libsoftokn3.so com.oracle.elfsign=false \
+    pkg.depend.bypass-generate=.* pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/libssl3.so pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/libxul.so pkg.depend.bypass-generate=.* \
+    pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/mozilla-xremote-client mode=0555 \
+    pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/omni.ja
+file path=usr/lib/firefox/platform.ini
+file path=usr/lib/firefox/plugin-container mode=0555 \
+    pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/precomplete
+file path=usr/lib/firefox/removed-files
+file path=usr/lib/firefox/run-mozilla.sh mode=0555
+file path=usr/lib/firefox/webapprt-stub mode=0555 \
+    pkg.linted.userland.action001.3=true
+file path=usr/lib/firefox/webapprt/omni.ja
+file path=usr/lib/firefox/webapprt/webapprt.ini
+file files/firefox-js.pc path=usr/lib/pkgconfig/firefox-js.pc
+file files/firefox-plugin.pc path=usr/lib/pkgconfig/firefox-plugin.pc
+file files/firefox-xpcom.pc path=usr/lib/pkgconfig/firefox-xpcom.pc
+file files/firefox.desktop path=usr/share/applications/firefox.desktop \
+    restart_fmri=svc:/application/desktop-cache/desktop-mime-cache:default
+file files/firefox.1 path=usr/share/man/man1/firefox.1
+file files/firefox-icon.png path=usr/share/pixmaps/firefox-icon.png
+license firefox.license license="Mozilla Public License v2.0"
+depend type=group fmri=system/font/truetype/dejavu
+depend type=group fmri=system/font/truetype/fonts-core
+depend type=require fmri=codec/libtheora
+depend type=require fmri=codec/ogg-vorbis
+depend type=require fmri=service/gnome/desktop-cache
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox100-39-cairo-perf.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,33 @@
+This enables tracking of ARGB values for image masks, since some machines do 
+not use ARGB values. 
+See Mozilla bug #716462 - Performance regression with xBGR visual and no 
+RENDER extension. 
+We would like to try to get this upstream in the future. 
+
+--- mozilla-esr31/gfx/cairo/cairo/src/cairo-xlib-surface.c.orig	2015-06-04 17:42:51.419088049 -0700
++++ mozilla-esr31/gfx/cairo/cairo/src/cairo-xlib-surface.c	2015-06-04 17:42:51.424665839 -0700
[email protected]@ -2325,6 +2325,7 @@
+ 			   cairo_region_t *clip_region)
+ {
+     cairo_image_surface_t *image;
++    cairo_format_masks_t image_masks;
+     cairo_rectangle_int_t extents;
+     cairo_status_t status;
+     int tx, ty;
[email protected]@ -2341,6 +2342,16 @@
+ 	    (image->base.content & CAIRO_CONTENT_ALPHA) == 0)))
+ 	return CAIRO_INT_STATUS_UNSUPPORTED;
+ 
++    if (image->base.backend->type == CAIRO_SURFACE_TYPE_IMAGE) {
++	if (_pixman_format_to_masks (image->pixman_format, &image_masks)) {
++	    if (! ((image_masks.alpha_mask == surface->a_mask || surface->a_mask == 0) &&
++		   (image_masks.red_mask   == surface->r_mask || surface->r_mask == 0) &&
++		   (image_masks.green_mask == surface->g_mask || surface->g_mask == 0) &&
++		   (image_masks.blue_mask  == surface->b_mask || surface->b_mask == 0)))
++		return CAIRO_INT_STATUS_UNSUPPORTED;
++	}
++    }
++
+     if (image->base.backend->type != CAIRO_SURFACE_TYPE_IMAGE) {
+ 	if (image->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) {
+ 	    image = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) image)->target;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox12-00-libnspr_flt4.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+This adds a library necessary for sparc. 
+This will probably not be sent upstream because it would be difficult to 
+add a sparc-only ifdef condition for this.
+
+--- mozilla-esr31/browser/installer/package-manifest.in.orig	2015-06-04 17:42:52.445166224 -0700
++++ mozilla-esr31/browser/installer/package-manifest.in	2015-06-04 17:42:52.450333944 -0700
[email protected]@ -741,6 +741,7 @@
+ bin/libfreebl_32fpu_3.so
+ bin/libfreebl_32int_3.so
+ bin/libfreebl_32int64_3.so
++bin/cpu/sparcv8plus/libnspr_flt4.so
+ #endif
+ 
+ ; [Updater]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox16-48-sparc-lea.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,21 @@
+Implements PolyIC for sparc. 
+This is going away in the future so no need to send upstream. 
+
+--- mozilla-esr31/js/src/assembler/assembler/MacroAssemblerSparc.h.orig	2015-06-04 17:42:51.582947696 -0700
++++ mozilla-esr31/js/src/assembler/assembler/MacroAssemblerSparc.h	2015-06-04 17:42:51.585565407 -0700
[email protected]@ -1005,9 +1005,12 @@
+ 
+         void lea(BaseIndex address, RegisterID dest)
+         {
+-            // lea only used by PolyIC.
+-            // PolyIC is not enabled for sparc now.
+-            ASSERT(0);
++            move(address.index, dest);
++            if (address.scale != 0)
++                lshift32(Imm32(address.scale), dest);
++            if (address.offset)
++                add32(Imm32(address.offset), dest);
++            add32(address.base, dest);
+         }
+ 
+         void add32(Imm32 imm, AbsoluteAddress address)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox18-93-libffi-sparc.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,87 @@
+This is already upstream in libffi, but not yet in Mozilla. 
+
+--- mozilla-esr31/js/src/ctypes/libffi/src/sparc/ffi.c.orig	2015-06-04 17:42:52.335127713 -0700
++++ mozilla-esr31/js/src/ctypes/libffi/src/sparc/ffi.c	2015-06-04 17:42:52.343504239 -0700
[email protected]@ -406,8 +406,50 @@
+       /* We don't yet support calling 32bit code from 64bit */
+       FFI_ASSERT(0);
+ #else
+-      ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes, 
+-		  cif->flags, rvalue, fn);
++      if (rvalue && (cif->rtype->type == FFI_TYPE_STRUCT
++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE  
++	  || cif->flags == FFI_TYPE_LONGDOUBLE
++#endif
++	  ))
++	{
++	  /* For v8, we need an "unimp" with size of returning struct */
++	  /* behind "call", so we alloc some executable space for it. */
++	  /* l7 is used, we need to make sure v8.S doesn't use %l7.   */
++	  unsigned int *call_struct = NULL;
++	  ffi_closure_alloc(32, &call_struct);
++	  if (call_struct)
++	    {
++	      unsigned long f = (unsigned long)fn;
++	      call_struct[0] = 0xae10001f;		 /* mov   %i7, %l7	 */
++	      call_struct[1] = 0xbe10000f;		 /* mov   %o7, %i7	 */
++	      call_struct[2] = 0x03000000 | f >> 10;     /* sethi %hi(fn), %g1	 */
++	      call_struct[3] = 0x9fc06000 | (f & 0x3ff); /* jmp %g1+%lo(fn), %o7 */
++	      call_struct[4] = 0x01000000;		 /* nop			 */
++	      if (cif->rtype->size < 0x7f)
++		call_struct[5] = cif->rtype->size;	 /* unimp		 */
++	      else
++		call_struct[5] = 0x01000000;	     	 /* nop			 */
++	      call_struct[6] = 0x81c7e008;		 /* ret			 */
++	      call_struct[7] = 0xbe100017;		 /* mov   %l7, %i7	 */
++	      asm volatile ("iflush %0; iflush %0+8; iflush %0+16; iflush %0+24" : : 
++			    "r" (call_struct) : "memory");
++	      /* SPARC v8 requires 5 instructions for flush to be visible */
++	      asm volatile ("nop; nop; nop; nop; nop");
++	      ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes,
++			  cif->flags, rvalue, call_struct);
++	      ffi_closure_free(call_struct);
++	    }
++	  else
++	    {
++	      ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes, 
++			  cif->flags, rvalue, fn);
++	    }
++	}
++      else
++	{
++	  ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes, 
++		      cif->flags, rvalue, fn);
++	}
+ #endif
+       break;
+     case FFI_V9:
[email protected]@ -468,13 +510,13 @@
+   closure->fun = fun;
+   closure->user_data = user_data;
+ 
+-  /* Flush the Icache.  FIXME: alignment isn't certain, assume 8 bytes */
++  /* Flush the Icache.  closure is 8 bytes aligned */
+ #ifdef SPARC64
+-  asm volatile ("flush	%0" : : "r" (closure) : "memory");
+-  asm volatile ("flush	%0" : : "r" (((char *) closure) + 8) : "memory");
++  asm volatile ("flush	%0; flush %0+8" : : "r" (closure) : "memory");
+ #else
+-  asm volatile ("iflush	%0" : : "r" (closure) : "memory");
+-  asm volatile ("iflush	%0" : : "r" (((char *) closure) + 8) : "memory");
++  asm volatile ("iflush %0; iflush %0+8" : : "r" (closure) : "memory");
++  /* SPARC v8 requires 5 instructions for flush to be visible */
++  asm volatile ("nop; nop; nop; nop; nop");
+ #endif
+ 
+   return FFI_OK;
+--- mozilla-esr31/js/src/ctypes/libffi/configure.orig	2015-06-04 17:42:52.338127066 -0700
++++ mozilla-esr31/js/src/ctypes/libffi/configure	2015-06-04 17:42:52.344846571 -0700
[email protected]@ -12425,7 +12425,7 @@
+ 
+ case "$target" in
+      # Darwin 10 (OSX 10.6) and beyond allocate non-executable pages
+-     *-apple-darwin1* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
++     *-apple-darwin1* | *-*-freebsd* | *-*-openbsd* | *-*-solaris*)
+ 
+ $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox20-24-stackwalk_compile.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,35 @@
+Adds an sp argument for the load_address() function. The sp argument is used
+in the NS_WalkStackCallback() function. This is to match a new argument 
+that was added in the function for other platforms. 
+See Mozilla bug #766579. 
+Need more followup to fully understand. 
+
+--- mozilla-esr31/xpcom/base/nsStackWalk.cpp.orig	2015-06-04 17:42:51.321202120 -0700
++++ mozilla-esr31/xpcom/base/nsStackWalk.cpp	2015-06-04 17:42:51.326394782 -0700
[email protected]@ -891,7 +891,7 @@
+ #include <sys/regset.h>
+ #include <sys/stack.h>
+ 
+-static int    load_address ( void * pc, void * arg );
++static int    load_address ( void * pc, void * sp, void * arg );
+ static struct bucket * newbucket ( void * pc );
+ static struct frame * cs_getmyframeptr ( void );
+ static void   cs_walk_stack ( void * (*read_func)(char * address),
[email protected]@ -966,7 +966,7 @@
+ 
+ 
+ static int
+-load_address(void * pc, void * arg)
++load_address(void * pc, void * sp, void * arg )
+ {
+     static struct bucket table[2048];
+     static mutex_t lock;
[email protected]@ -988,7 +988,7 @@
+     if (ptr->next) {
+         mutex_unlock(&lock);
+     } else {
+-        (args->callback)(pc, args->closure);
++        (args->callback)(pc, NULL, args->closure);
+         args->numFrames++;
+         if (args->maxFrames != 0 && args->numFrames == args->maxFrames)
+           stop = 1;   // causes us to stop getting frames
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox20-46-strcasestr.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,42 @@
+The strcasestr function is not available in Solaris 10, so this replaces it 
+with an alternate function. This is not necessary for Solaris 12+. 
+The 'uname' part is necessary because the uname() function returns a 
+non-negative value. 
+
+--- mozilla-esr31/widget/xpwidgets/GfxInfoX11.cpp.orig	2015-06-04 17:42:51.546213832 -0700
++++ mozilla-esr31/widget/xpwidgets/GfxInfoX11.cpp	2015-06-04 17:42:51.548646551 -0700
[email protected]@ -12,6 +12,7 @@
+ #include <sys/utsname.h>
+ #include "nsCRTGlue.h"
+ #include "prenv.h"
++#include "plstr.h"
+ 
+ #include "GfxInfoX11.h"
+ 
[email protected]@ -135,7 +136,7 @@
+     // only useful for Linux kernel version check for FGLRX driver.
+     // assumes X client == X server, which is sad.
+     struct utsname unameobj;
+-    if (!uname(&unameobj))
++    if (uname(&unameobj) >= 0)
+     {
+       mOS.Assign(unameobj.sysname);
+       mOSRelease.Assign(unameobj.release);
[email protected]@ -210,13 +211,13 @@
+         // with Mesa, the version string contains "Mesa major.minor" and that's all the version information we get:
+         // there is no actual driver version info.
+         whereToReadVersionNumbers = Mesa_in_version_string + strlen("Mesa");
+-        if (strcasestr(mVendor.get(), "nouveau"))
++        if (PL_strcasestr(mVendor.get(), "nouveau"))
+             mIsNouveau = true;
+-        if (strcasestr(mRenderer.get(), "intel")) // yes, intel is in the renderer string
++        if (PL_strcasestr(mRenderer.get(), "intel")) // yes, intel is in the renderer string
+             mIsIntel = true;
+-        if (strcasestr(mRenderer.get(), "llvmpipe"))
++        if (PL_strcasestr(mRenderer.get(), "llvmpipe"))
+             mIsLlvmpipe = true;
+-        if (strcasestr(mRenderer.get(), "software rasterizer"))
++        if (PL_strcasestr(mRenderer.get(), "software rasterizer"))
+             mIsOldSwrast = true;
+     } else if (strstr(mVendor.get(), "NVIDIA Corporation")) {
+         mIsNVIDIA = true;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox20-52-check_test.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,13 @@
+This patch is for testing. Potential for sending upstream. 
+
+--- mozilla-esr31/testing/runcppunittests.py.orig	2015-06-04 17:42:51.633983468 -0700
++++ mozilla-esr31/testing/runcppunittests.py	2015-06-04 17:42:51.638876910 -0700
[email protected]@ -80,6 +80,8 @@
+         pathvar = ""
+         if mozinfo.os == "linux":
+             pathvar = "LD_LIBRARY_PATH"
++        if mozinfo.os == "unix":
++            pathvar = "LD_LIBRARY_PATH"
+         elif mozinfo.os == "mac":
+             pathvar = "DYLD_LIBRARY_PATH"
+         elif mozinfo.os == "win":
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox20-82-sqlite3-unix-excl.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,16 @@
+This provides the option to set the indicator for a NFS profile to true. 
+It may be necessary for users on NFS to use bookmarks/logging. 
+Needs further investigation, will probably be difficult to send upstream. 
+
+--- mozilla-esr31/browser/app/profile/firefox.js.orig	2015-06-04 17:42:52.206758105 -0700
++++ mozilla-esr31/browser/app/profile/firefox.js	2015-06-04 17:42:52.212124280 -0700
[email protected]@ -1022,6 +1022,9 @@
+ // allow META refresh by default
+ pref("accessibility.blockautorefresh", false);
+ 
++// Whether profile is on NFS
++pref("storage.nfs_filesystem", true);
++
+ // Whether history is enabled or not.
+ pref("places.history.enabled", true);
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox21-49-hnjfile.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+This allows us to access some function from wchar.h that other platforms 
+can get from stdio.h. 
+Potentially send upstream with an ifdef Solaris statement. 
+
+--- mozilla-esr31/intl/hyphenation/src/hnjalloc.h.orig	2015-06-04 17:42:51.598696275 -0700
++++ mozilla-esr31/intl/hyphenation/src/hnjalloc.h	2015-06-04 17:42:51.603672670 -0700
[email protected]@ -24,6 +24,7 @@
+  */
+ 
+ #include <stdio.h> /* ensure stdio.h is loaded before our macros */
++#include <wchar.h>
+ 
+ #undef FILE
+ #define FILE hnjFile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox21-50-nsMathUtils.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+This allows us to get some function from math.h that other platforms are 
+getting from ieeefp.h. 
+Easy to send upstream since it already has ifdef statement. 
+
+--- mozilla-esr31/xpcom/ds/nsMathUtils.h.orig	2015-06-04 17:42:51.616409449 -0700
++++ mozilla-esr31/xpcom/ds/nsMathUtils.h	2015-06-04 17:42:51.621339786 -0700
[email protected]@ -13,6 +13,7 @@
+ #include <float.h>
+ 
+ #ifdef SOLARIS
++#include <math.h>
+ #include <ieeefp.h>
+ #endif
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox22-76-skip_mozbuild_test.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,23 @@
+For testing. Runs the test from a different environment than the Mozilla 
+default. Needs further investigation. 
+
+--- mozilla-esr31/python/mozbuild/mozbuild/test/test_mozconfig.py.orig	2015-06-04 17:42:52.122873933 -0700
++++ mozilla-esr31/python/mozbuild/mozbuild/test/test_mozconfig.py	2015-06-04 17:42:52.133296079 -0700
[email protected]@ -477,5 +477,5 @@
+             self.assertEquals(e.exception.output, ['hello world'])
+ 
+ 
+-if __name__ == '__main__':
+-    main()
++#if __name__ == '__main__':
++#    main()
+--- mozilla-esr31/python/mozbuild/mozbuild/test/test_base.py.orig	2015-06-04 17:42:52.128263022 -0700
++++ mozilla-esr31/python/mozbuild/mozbuild/test/test_base.py	2015-06-04 17:42:52.133425656 -0700
[email protected]@ -393,5 +393,5 @@
+         self.assertEqual(p.srcdir_path(), "/src/foo/bar")
+         self.assertEqual(p.objdir_path(), "/src/obj/foo/bar")
+ 
+-if __name__ == '__main__':
+-    main()
++#if __name__ == '__main__':
++#    main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox22-79-gthread-dlopen.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+See Mozilla bug #675585 - crash [@ g_slice_free1] when run firefox-bin
+-no-remote -process-updates. Needs further investigation. 
+
+--- mozilla-esr31/xpcom/glue/standalone/nsXPCOMGlue.cpp.orig	2015-06-04 17:42:52.147539933 -0700
++++ mozilla-esr31/xpcom/glue/standalone/nsXPCOMGlue.cpp	2015-06-04 17:42:52.152710273 -0700
[email protected]@ -418,6 +418,8 @@
+         }
+     }
+ 
++    static void* gthreadso = dlopen("libgthread-2.0.so.0", RTLD_GLOBAL | RTLD_LAZY);
++
+     GetFrozenFunctionsFunc sym =
+         (GetFrozenFunctionsFunc) GetSymbol(sTop->libHandle, LEADING_UNDERSCORE "NS_GetFrozenFunctions");
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox25-07-webaudio_math.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,24 @@
+This allows us to get some function from math.h that other platforms are
+getting elsewhere.
+Can send upstream with ifdef Solaris statement. 
+
+--- mozilla-esr31/content/media/webaudio/blink/DenormalDisabler.h.orig	2015-06-04 17:42:51.279492311 -0700
++++ mozilla-esr31/content/media/webaudio/blink/DenormalDisabler.h	2015-06-04 17:42:51.288558769 -0700
[email protected]@ -27,6 +27,7 @@
+ 
+ #define _USE_MATH_DEFINES
+ #include <cmath>
++#include <math.h>
+ #include <float.h>
+ 
+ namespace WebCore {
+--- mozilla-esr31/content/media/webaudio/ThreeDPoint.h.orig	2015-06-04 17:42:51.286104792 -0700
++++ mozilla-esr31/content/media/webaudio/ThreeDPoint.h	2015-06-04 17:42:51.288664521 -0700
[email protected]@ -8,6 +8,7 @@
+ #define ThreeDPoint_h_
+ 
+ #include <cmath>
++#include <math.h>
+ #include <algorithm>
+ 
+ namespace mozilla {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox26-06-donot-delay-stopping-realplayer.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,26 @@
+See Mozilla bug #451007 - Reload page causing problems with 
+RealPlayer/Helix plugin. 
+We can potentially drop this patch since RealPlayer is no longer being 
+supported. 
+
+--- mozilla-esr31/content/base/src/nsObjectLoadingContent.cpp.orig	2015-06-04 17:42:51.184423172 -0700
++++ mozilla-esr31/content/base/src/nsObjectLoadingContent.cpp	2015-06-04 17:42:51.208745161 -0700
[email protected]@ -2744,7 +2744,8 @@
+               bool aDelayedStop)
+ {
+   // Don't delay stopping QuickTime (bug 425157), Flip4Mac (bug 426524),
+-  // XStandard (bug 430219), CMISS Zinc (bug 429604).
++  // XStandard (bug 430219), CMISS Zinc (bug 429604),
++  // RealPlayer/Helix (bug 451007).
+   if (aDelayedStop
+ #if !(defined XP_WIN || defined MOZ_X11)
+       && !aInstanceOwner->MatchPluginName("QuickTime")
[email protected]@ -2752,6 +2753,8 @@
+       && !aInstanceOwner->MatchPluginName("XStandard plugin")
+       && !aInstanceOwner->MatchPluginName("CMISS Zinc Plugin")
+ #endif
++      && !aInstanceOwner->MatchPluginName("RealPlayer")
++      && !aInstanceOwner->MatchPluginName("Helix")
+       ) {
+     nsCOMPtr<nsIRunnable> evt =
+       new nsStopPluginRunnable(aInstanceOwner, aContent);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox26-36-package_warning.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,16 @@
+Disables fatal warnings. Inside package-manifest.in, there is a sparc-specific
+line that we can't ifdef out. So we want to make sure this doesn't exit on 
+an error for x86. 
+We will want to redo this patch with an ifdef for x86 vs sparc. 
+
+--- mozilla-esr31/browser/installer/Makefile.in.orig	2015-06-04 17:42:51.400825465 -0700
++++ mozilla-esr31/browser/installer/Makefile.in	2015-06-04 17:42:51.405890984 -0700
[email protected]@ -12,7 +12,7 @@
+ MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
+ # Some files have been already bundled with xulrunner
+ ifndef SYSTEM_LIBXUL
+-MOZ_PKG_FATAL_WARNINGS = 1
++#MOZ_PKG_FATAL_WARNINGS = 1
+ endif
+ 
+ DEFINES += -DAB_CD=$(AB_CD) -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox26-99-LocalFileUnix.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+Another ifdef Solaris patch. Some function is defined in limits.h that other 
+platforms can get elsewhere. 
+Can potentially send upstream with ifdef Solaris statement.
+
+--- mozilla-esr31/xpcom/io/nsLocalFileUnix.cpp.orig	2015-06-04 17:42:52.429921172 -0700
++++ mozilla-esr31/xpcom/io/nsLocalFileUnix.cpp	2015-06-04 17:42:52.432611314 -0700
[email protected]@ -13,6 +13,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <limits.h>
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <utime.h>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox27-206-build-config.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,29 @@
+This is used for Sun Studio because the depend files are different. 
+Can potentially remove this patch, but need to investigate to see when 
+link_deps is run. 
+
+--- mozilla-esr31/python/mozbuild/mozbuild/action/link_deps.py.orig	2015-06-04 17:42:52.548434964 -0700
++++ mozilla-esr31/python/mozbuild/mozbuild/action/link_deps.py	2015-06-04 17:42:52.553642029 -0700
[email protected]@ -129,9 +129,9 @@
+             if deps:
+                 deps = list(self.normpaths(deps))
+                 for t in self.normpaths(rule.targets()):
+-                    if t in self._targets:
+-                        raise Exception('Found target %s in %s and %s'
+-                                        % (t, self._targets[t][0], depfile))
++#                   if t in self._targets:
++#                       raise Exception('Found target %s in %s and %s'
++#                                       % (t, self._targets[t][0], depfile))
+                     self._targets[t] = (depfile, deps)
+ 
+     def dump(self, fh, removal_guard=True):
[email protected]@ -216,7 +216,8 @@
+                               group=group,
+                               abspaths=opts.abspaths)
+     for f in opts.dependency_files:
+-        linker.add_dependencies(open(f))
++        if os.path.isfile(f):
++            linker.add_dependencies(open(f))
+ 
+     if opts.output:
+         out = open(opts.output, 'w')
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox27-47-uname.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,13 @@
+The uname() function on Solaris can return a non-negative value. 
+
+--- mozilla-esr31/toolkit/components/startup/nsUserInfoUnix.cpp.orig	2015-06-04 17:42:51.565111934 -0700
++++ mozilla-esr31/toolkit/components/startup/nsUserInfoUnix.cpp	2015-06-04 17:42:51.567398410 -0700
[email protected]@ -106,7 +106,7 @@
+     char *domainname = nullptr;
+ 
+     // is this portable?  that is a POSIX compliant call, but I need to check
+-    if (uname(&buf)) { 
++    if (uname(&buf) < 0) { 
+         return rv;
+     }
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox27-67-ion_AsmJS_x86.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+REG_EIP is already defined elsewhere for Linux. 
+
+--- mozilla-esr31/js/src/jit/AsmJSSignalHandlers.cpp.orig	2015-06-04 17:42:51.702781399 -0700
++++ mozilla-esr31/js/src/jit/AsmJSSignalHandlers.cpp	2015-06-04 17:42:51.707794331 -0700
[email protected]@ -58,6 +58,9 @@
+ # define R14_sig(p) ((p)->sc_r14)
+ # define R15_sig(p) ((p)->sc_r15)
+ #elif defined(__linux__) || defined(SOLARIS)
++# if defined(SOLARIS)
++#  define REG_EIP EIP
++# endif
+ # if defined(__linux__)
+ #  define XMM_sig(p,i) ((p)->uc_mcontext.fpregs->_xmm[i])
+ #  define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_EIP])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox27-80-mftt_infinity.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,32 @@
+We use a different function from the one in ieeefp.h. 
+This may be a studio specific patch. Need to investigate if this can be 
+removed. 
+
+--- mozilla-esr31/mfbt/decimal/Decimal.cpp.orig	2015-06-04 17:42:52.191270749 -0700
++++ mozilla-esr31/mfbt/decimal/Decimal.cpp	2015-06-04 17:42:52.193703088 -0700
[email protected]@ -33,6 +33,7 @@
+ 
+ #include <algorithm>
+ #include <float.h>
++#include <ieeefp.h>
+ 
+ using namespace moz_decimal_utils;
+ 
[email protected]@ -686,13 +687,13 @@
+ 
+ Decimal Decimal::fromDouble(double doubleValue)
+ {
+-    if (std::isfinite(doubleValue))
++    if (finite(doubleValue))
+         return fromString(mozToString(doubleValue));
+ 
+-    if (std::isinf(doubleValue))
+-        return infinity(doubleValue < 0 ? Negative : Positive);
++    if (isnand(doubleValue))
++        return nan();
+ 
+-    return nan();
++    return infinity(doubleValue < 0 ? Negative : Positive);
+ }
+ 
+ Decimal Decimal::fromString(const String& str)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox28-217-xpt-as-flag.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,36 @@
+We need the xptcstubsdef_asm file for Sun Studio, but not necessary for GCC. 
+One of the files was placed in the wrong location and needs to be moved. This 
+part can probably be sent upstream. 
+
+--- mozilla-esr31/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig	2015-06-04 17:42:52.626316900 -0700
++++ mozilla-esr31/xpcom/reflect/xptcall/src/md/unix/Makefile.in	2015-06-04 17:42:52.636686080 -0700
[email protected]@ -98,6 +98,7 @@
+ 	  -e 's/^\(STUB_ENTRY\)(\([0-9][0-9]\))/\12\(\2\)/' \
+ 	  -e 's/^\(STUB_ENTRY\)(\([0-9][0-9][0-9]\))/\13\(\2\)/' \
+ 	$(DIST)/include/xptcstubsdef.inc > [email protected]
++ASFLAGS += -I.
+ ifeq (x86_64,$(OS_TEST))
+ ASFLAGS += -xarch=amd64
+ endif
+--- mozilla-esr31/xpcom/reflect/xptcall/src/md/unix/moz.build.orig	2015-06-04 17:42:52.631590433 -0700
++++ mozilla-esr31/xpcom/reflect/xptcall/src/md/unix/moz.build	2015-06-04 17:42:52.636848564 -0700
[email protected]@ -74,6 +74,9 @@
+                 'xptcstubs_gcc_x86_unix.cpp'
+             ]
+         else:
++            GENERATED_FILES = [
++                'xptcstubsdef_asm.solx86',
++            ]
+             SOURCES += [
+                 'xptcinvoke_asm_x86_solaris_SUNW.s',
+                 'xptcinvoke_x86_solaris.cpp',
[email protected]@ -273,9 +276,6 @@
+     ]
+ 
+ if CONFIG['OS_ARCH'] == 'SunOS' and CONFIG['OS_TEST'].find('86') == -1:
+-    GENERATED_FILES = [
+-        'xptcstubsdef_asm.solx86',
+-    ]
+     if CONFIG['HAVE_64BIT_OS']:
+         SOURCES += [
+             'xptcinvoke_sparcv9_solaris.cpp',
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox28-88-libvpx_compile.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,54 @@
+Can probably send upstream. 
+
+--- mozilla-esr31/media/libvpx/Makefile.in.orig	2015-06-04 17:42:52.225216512 -0700
++++ mozilla-esr31/media/libvpx/Makefile.in	2015-06-04 17:42:52.235644957 -0700
[email protected]@ -8,6 +8,10 @@
+ AS_DASH_C_FLAG=$(VPX_DASH_C_FLAG)
+ ASM_SUFFIX=$(VPX_ASM_SUFFIX)
+ 
++ifeq ($(OS_TARGET),SunOS)
++ASFLAGS+=-DSOLARIS=1
++endif
++
+ ifdef VPX_ARM_ASM
+ # Building on an ARM platform with a supported assembler, include
+ # the optimized assembly in the build.
[email protected]@ -115,7 +119,7 @@
+ # Workaround a bug of Sun Studio (CR 6963410)
+ ifdef SOLARIS_SUNPRO_CC
+ ifeq (86,$(findstring 86,$(OS_TEST)))
+-filter.o: filter.c Makefile.in
++filter.o: vp8/common/filter.c Makefile.in
+ 	$(REPORT_BUILD)
+ 	@$(MAKE_DEPS_AUTO_CC)
+ 	$(CC) -o [email protected] -c $(patsubst -xO[45],-xO3,$(COMPILE_CFLAGS)) $<
+--- mozilla-esr31/media/libvpx/vpx_ports/x86_abi_support.asm.orig	2015-06-04 17:42:52.233318593 -0700
++++ mozilla-esr31/media/libvpx/vpx_ports/x86_abi_support.asm	2015-06-04 17:42:52.235792816 -0700
[email protected]@ -225,9 +225,13 @@
+   %ifdef CHROMIUM
+     %ifidn __OUTPUT_FORMAT__,macho32
+       %define HIDDEN_DATA(x) x:private_extern
++    %elifidn SOLARIS,1
++      %define HIDDEN_DATA(x) x:data hidden
+     %else
+       %define HIDDEN_DATA(x) x
+     %endif
++  %elifidn SOLARIS,1
++    %define HIDDEN_DATA(x) x:data hidden
+   %else
+     %define HIDDEN_DATA(x) x
+   %endif
[email protected]@ -244,9 +248,13 @@
+   %elifidn __OUTPUT_FORMAT__,macho64
+     %ifdef CHROMIUM
+       %define HIDDEN_DATA(x) x:private_extern
++    %elifidn SOLARIS,1
++      %define HIDDEN_DATA(x) x:data hidden
+     %else
+       %define HIDDEN_DATA(x) x
+     %endif
++  %elifidn SOLARIS,1
++    %define HIDDEN_DATA(x) x:data hidden
+   %else
+     %define HIDDEN_DATA(x) x
+   %endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox28-90-cubeb.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,543 @@
+For SunAudio audio playback. We need to investigate whether we care about
+this or whether we are just going to support PulseAudio.
+
+--- mozilla-esr31/media/libcubeb/src/cubeb.c.orig	2015-06-04 17:42:52.252769663 -0700
++++ mozilla-esr31/media/libcubeb/src/cubeb.c	2015-06-04 17:42:52.260965308 -0700
[email protected]@ -54,6 +54,9 @@
+ #if defined(USE_AUDIOTRACK)
+ int audiotrack_init(cubeb ** context, char const * context_name);
+ #endif
++#if defined(USE_SUN)
++int sunaudio_init(cubeb ** context, char const * context_name);
++#endif
+ 
+ int
+ validate_stream_params(cubeb_stream_params stream_params)
[email protected]@ -120,6 +123,9 @@
+ #if defined(USE_AUDIOTRACK)
+     audiotrack_init,
+ #endif
++#if defined(USE_SUN)
++    sunaudio_init,
++#endif
+   };
+   int i;
+ 
+--- mozilla-esr31/media/libcubeb/src/cubeb_sun.c.orig	1969-12-31 16:00:00.000000000 -0800
++++ mozilla-esr31/media/libcubeb/src/cubeb_sun.c	2015-06-04 17:42:52.261184916 -0700
[email protected]@ -0,0 +1,500 @@
++/*
++ * Copyright (c) 2013 Ginn Chen <[email protected]>
++ *
++ * This program is made available under an ISC-style license.  See the
++ * accompanying file LICENSE for details.
++ */
++#include <poll.h>
++#include <pthread.h>
++#include <stdlib.h>
++#include <stdio.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <sys/audio.h>
++#include <sys/stat.h>
++#include <unistd.h>
++#include <sys/stropts.h>
++#include "cubeb/cubeb.h"
++#include "cubeb-internal.h"
++
++/* Macros copied from audio_oss.h */
++/*
++ * CDDL HEADER START
++ *
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
++ *
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
++ *
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
++ *
++ * CDDL HEADER END
++ */
++/*
++ * Copyright (C) 4Front Technologies 1996-2008.
++ *
++ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
++ * Use is subject to license terms.
++ */
++#define OSSIOCPARM_MASK 0x1fff          /* parameters must be < 8192 bytes */
++#define OSSIOC_VOID     0x00000000      /* no parameters */
++#define OSSIOC_OUT      0x20000000      /* copy out parameters */
++#define OSSIOC_IN       0x40000000      /* copy in parameters */
++#define OSSIOC_INOUT    (OSSIOC_IN|OSSIOC_OUT)
++#define OSSIOC_SZ(t)    ((sizeof (t) & OSSIOCPARM_MASK) << 16)
++#define __OSSIO(x, y)           ((int)(OSSIOC_VOID|(x<<8)|y))
++#define __OSSIOR(x, y, t)       ((int)(OSSIOC_OUT|OSSIOC_SZ(t)|(x<<8)|y))
++#define __OSSIOWR(x, y, t)      ((int)(OSSIOC_INOUT|OSSIOC_SZ(t)|(x<<8)|y))
++#define SNDCTL_DSP_SPEED        __OSSIOWR('P', 2, int)
++#define SNDCTL_DSP_CHANNELS     __OSSIOWR('P', 6, int)
++#define SNDCTL_DSP_SETFMT       __OSSIOWR('P', 5, int)  /* Selects ONE fmt */
++#define SNDCTL_DSP_GETODELAY    __OSSIOR('P', 23, int)
++#define SNDCTL_DSP_HALT_OUTPUT  __OSSIO('P', 34)
++#define AFMT_S16_LE     0x00000010
++#define AFMT_S16_BE     0x00000020
++
++#if defined(WORDS_BIGENDIAN) || defined(__BIG_ENDIAN__)
++#define AFMT_S16_NE    AFMT_S16_BE
++#else
++#define AFMT_S16_NE    AFMT_S16_LE
++#endif
++
++#define DEFAULT_AUDIO_DEVICE "/dev/audio"
++#define DEFAULT_DSP_DEVICE   "/dev/dsp"
++
++#define BUF_SIZE_MS 10
++
++#if defined(CUBEB_SUNAUDIO_DEBUG)
++#define DPR(...) fprintf(stderr, __VA_ARGS__);
++#else
++#define DPR(...) do {} while(0)
++#endif
++
++static struct cubeb_ops const sunaudio_ops;
++
++struct cubeb {
++  struct cubeb_ops const * ops;
++};
++
++struct cubeb_stream {
++  cubeb * context;
++  pthread_t th;			  /* to run real-time audio i/o */
++  pthread_mutex_t mutex;	  /* protects fd and frm_played */
++  int fd;			  /* link us to sunaudio */
++  int active;			  /* cubec_start() called */
++  int conv;			  /* need float->s16 conversion */
++  int using_oss;
++  unsigned char *buf;		  /* data is prepared here */
++  unsigned int rate;
++  unsigned int n_channles;
++  unsigned int bytes_per_ch;
++  unsigned int n_frm;
++  unsigned int buffer_size;
++  int64_t frm_played;
++  cubeb_data_callback data_cb;    /* cb to preapare data */
++  cubeb_state_callback state_cb;  /* cb to notify about state changes */
++  void *arg;			  /* user arg to {data,state}_cb */
++};
++
++static void
++float_to_s16(void *ptr, long nsamp)
++{
++  int16_t *dst = ptr;
++  float *src = ptr;
++
++  while (nsamp-- > 0)
++    *(dst++) = *(src++) * 32767;
++}
++
++static void *
++sunaudio_mainloop(void *arg)
++{
++  struct cubeb_stream *s = arg;
++  int state;
++
++  DPR("sunaudio_mainloop()\n");
++
++  s->state_cb(s, s->arg, CUBEB_STATE_STARTED);
++
++  pthread_mutex_lock(&s->mutex);
++  DPR("sunaudio_mainloop(), started\n");
++
++  for (;;) {
++    if (!s->active) {
++      DPR("sunaudio_mainloop() stopped\n");
++      state = CUBEB_STATE_STOPPED;
++      break;
++    }
++
++    if (!s->using_oss) {
++      audio_info_t info;
++      ioctl(s->fd, AUDIO_GETINFO, &info);
++      if (s->frm_played > info.play.samples + 3 * s->n_frm) {
++        pthread_mutex_unlock(&s->mutex);
++        struct timespec ts = {0, 10000}; // 10 ms
++        nanosleep(&ts, NULL);
++        pthread_mutex_lock(&s->mutex);
++        continue;
++      }
++    }
++
++    pthread_mutex_unlock(&s->mutex);
++    unsigned int got = s->data_cb(s, s->arg, s->buf, s->n_frm);
++    DPR("sunaudio_mainloop() ask %d got %d\n", s->n_frm, got);
++    pthread_mutex_lock(&s->mutex);
++
++    if (got < 0) {
++      DPR("sunaudio_mainloop() cb err\n");
++      state = CUBEB_STATE_ERROR;
++      break;
++    }
++
++    if (s->conv) {
++      float_to_s16(s->buf, got * s->n_channles);
++    }
++
++    unsigned int avail = got * 2 * s->n_channles; // coverted to s16
++    unsigned int pos = 0;
++
++    while (avail > 0 && s->active) {
++      int written = write(s->fd, s->buf + pos, avail);
++      if (written == -1) {
++        if (errno != EINTR && errno != EWOULDBLOCK) {
++          DPR("sunaudio_mainloop() write err\n");
++          state = CUBEB_STATE_ERROR;
++          break;
++        }
++        pthread_mutex_unlock(&s->mutex);
++        struct timespec ts = {0, 10000}; // 10 ms
++        nanosleep(&ts, NULL);
++        pthread_mutex_lock(&s->mutex);
++      } else {
++        pos += written;
++        DPR("sunaudio_mainloop() write %d pos %d\n", written, pos);
++        s->frm_played += written / 2 / s->n_channles;
++        avail -= written;
++      }
++    }
++
++    if ((got  < s->n_frm)) {
++      DPR("sunaudio_mainloop() drained\n");
++      state = CUBEB_STATE_DRAINED;
++      break;
++    }
++  }
++
++  pthread_mutex_unlock(&s->mutex);
++  s->state_cb(s, s->arg, state);
++
++  return NULL;
++}
++
++/*static*/ int
++sunaudio_init(cubeb **context, char const *context_name)
++{
++  DPR("sunaudio_init(%s)\n", context_name);
++  *context = malloc(sizeof(*context));
++  (*context)->ops = &sunaudio_ops;
++  (void)context_name;
++  return CUBEB_OK;
++}
++
++static char const *
++sunaudio_get_backend_id(cubeb *context)
++{
++  return "sunaudio";
++}
++
++static void
++sunaudio_destroy(cubeb *context)
++{
++  DPR("sunaudio_destroy()\n");
++  free(context);
++}
++
++static int
++sunaudio_stream_init(cubeb *context,
++                  cubeb_stream **stream,
++                  char const *stream_name,
++                  cubeb_stream_params stream_params, unsigned int latency,
++                  cubeb_data_callback data_callback,
++                  cubeb_state_callback state_callback,
++                  void *user_ptr)
++{
++  struct cubeb_stream *s;
++  DPR("sunaudio_stream_init(%s)\n", stream_name);
++  size_t size;
++
++  s = malloc(sizeof(struct cubeb_stream));
++  if (s == NULL)
++    return CUBEB_ERROR;
++  s->context = context;
++
++  // If UTAUDIODEV is set, use it with Sun Audio interface
++  char * sa_device_name = getenv("UTAUDIODEV");
++  char * dsp_device_name = NULL;
++  if (!sa_device_name) {
++    dsp_device_name = getenv("AUDIODSP");
++    if (!dsp_device_name) {
++      dsp_device_name = DEFAULT_DSP_DEVICE;
++    }
++    sa_device_name = getenv("AUDIODEV");
++    if (!sa_device_name) {
++      sa_device_name = DEFAULT_AUDIO_DEVICE;
++    }
++  }
++
++  s->using_oss = 0;
++  // Try to use OSS if available
++  if (dsp_device_name) {
++    s->fd = open(dsp_device_name, O_WRONLY | O_NONBLOCK);
++    if (s->fd >= 0) {
++      s->using_oss = 1;
++    }
++  }
++
++  // Try Sun Audio
++  if (!s->using_oss) {
++    s->fd = open(sa_device_name, O_WRONLY | O_NONBLOCK);
++  }
++
++  if (s->fd < 0) {
++    free(s);
++    DPR("sunaudio_stream_init(), open() failed\n");
++    return CUBEB_ERROR;
++  }
++
++  if (s->using_oss) {
++    if (ioctl(s->fd, SNDCTL_DSP_SPEED, &stream_params.rate) < 0) {
++      DPR("ioctl SNDCTL_DSP_SPEED failed.\n");
++      close(s->fd);
++      free(s);
++      return CUBEB_ERROR_INVALID_FORMAT;
++    }
++
++    if (ioctl(s->fd, SNDCTL_DSP_CHANNELS, &stream_params.channels) < 0) {
++      DPR("ioctl SNDCTL_DSP_CHANNELS failed.\n");
++      close(s->fd);
++      free(s);
++      return CUBEB_ERROR_INVALID_FORMAT;
++    }
++
++    int format = AFMT_S16_NE;
++    if (ioctl(s->fd, SNDCTL_DSP_SETFMT, &format) < 0) {
++      DPR("ioctl SNDCTL_DSP_SETFMT failed.\n");
++      close(s->fd);
++      free(s);
++      return CUBEB_ERROR_INVALID_FORMAT;
++    }
++  } else {
++    audio_info_t audio_info;
++    AUDIO_INITINFO(&audio_info)
++    audio_info.play.sample_rate = stream_params.rate;
++    audio_info.play.channels = stream_params.channels;
++    audio_info.play.encoding = AUDIO_ENCODING_LINEAR;
++    audio_info.play.precision = 16;
++    if (ioctl(s->fd, AUDIO_SETINFO, &audio_info) == -1) {
++      DPR("ioctl AUDIO_SETINFO failed.\n");
++      close(s->fd);
++      free(s);
++      return CUBEB_ERROR_INVALID_FORMAT;
++    }
++  }
++
++  s->conv = 0;
++  switch (stream_params.format) {
++    case CUBEB_SAMPLE_S16NE:
++      s->bytes_per_ch = 2;
++      break;
++    case CUBEB_SAMPLE_FLOAT32NE:
++      s->bytes_per_ch = 4;
++      s->conv = 1;
++      break;
++    default:
++      DPR("sunaudio_stream_init() unsupported format\n");
++      close(s->fd);
++      free(s);
++      return CUBEB_ERROR_INVALID_FORMAT;
++  }
++
++  s->active = 0;
++  s->rate = stream_params.rate;
++  s->n_channles = stream_params.channels;
++  s->data_cb = data_callback;
++  s->state_cb = state_callback;
++  s->arg = user_ptr;
++  if (pthread_mutex_init(&s->mutex, NULL) != 0) {
++    free(s);
++    return CUBEB_ERROR;
++  }
++  s->frm_played = 0;
++  s->n_frm = s->rate * BUF_SIZE_MS / 1000;
++  s->buffer_size = s->bytes_per_ch * s->n_channles * s->n_frm;
++  s->buf = malloc(s->buffer_size);
++  if (s->buf == NULL) {
++    close(s->fd);
++    free(s);
++    return CUBEB_ERROR;
++  }
++
++  *stream = s;
++  DPR("sunaudio_stream_init() end, ok\n");
++  return CUBEB_OK;
++}
++
++static void
++sunaudio_stream_destroy(cubeb_stream *s)
++{
++  DPR("sunaudio_stream_destroy()\n");
++  if (s->fd > 0) {
++    // Flush buffer
++    if (s->using_oss) {
++      ioctl(s->fd, SNDCTL_DSP_HALT_OUTPUT);
++    } else {
++      ioctl(s->fd, I_FLUSH);
++    }
++    close(s->fd);
++  }
++  free(s->buf);
++  free(s);
++}
++
++static int
++sunaudio_stream_start(cubeb_stream *s)
++{
++  int err;
++
++  DPR("sunaudio_stream_start()\n");
++  s->active = 1;
++  err = pthread_create(&s->th, NULL, sunaudio_mainloop, s);
++  if (err) {
++    s->active = 0;
++    return CUBEB_ERROR;
++  }
++  return CUBEB_OK;
++}
++
++static int
++sunaudio_stream_stop(cubeb_stream *s)
++{
++  void *dummy;
++
++  DPR("sunaudio_stream_stop()\n");
++  if (s->active) {
++    s->active = 0;
++    pthread_join(s->th, &dummy);
++  }
++  return CUBEB_OK;
++}
++
++static int
++sunaudio_stream_get_position(cubeb_stream *s, uint64_t *p)
++{
++  int rv = CUBEB_OK;
++  pthread_mutex_lock(&s->mutex);
++  if (s->active && s->fd > 0) {
++    if (s->using_oss) {
++      int delay;
++      ioctl(s->fd, SNDCTL_DSP_GETODELAY, &delay);
++      int64_t t = s->frm_played - delay / s->n_channles / 2;
++      if (t < 0) {
++        *p = 0;
++      } else {
++        *p = t;
++      }
++    } else {
++      audio_info_t info;
++      ioctl(s->fd, AUDIO_GETINFO, &info);
++      *p = info.play.samples;
++    }
++    DPR("sunaudio_stream_get_position() %lld\n", *p);
++  } else {
++    rv = CUBEB_ERROR;
++  }
++  pthread_mutex_unlock(&s->mutex);
++  return rv;
++}
++
++static int
++sunaudio_get_max_channel_count(cubeb * ctx, uint32_t * max_channels)
++{
++  if (!ctx || !max_channels)
++    return CUBEB_ERROR;
++
++  *max_channels = 2;
++
++  return CUBEB_OK;
++}
++
++static int
++sunaudio_get_preferred_sample_rate(cubeb * ctx, uint32_t * rate)
++{
++  if (!ctx || !rate)
++    return CUBEB_ERROR;
++
++  // XXX Not yet implemented.
++  *rate = 44100;
++
++  return CUBEB_OK;
++}
++
++static int
++sunaudio_get_min_latency(cubeb * ctx, cubeb_stream_params params, uint32_t * latency_ms)
++{
++  if (!ctx || !latency_ms)
++    return CUBEB_ERROR;
++
++  // XXX Not yet implemented.
++  *latency_ms = 20;
++
++  return CUBEB_OK;
++}
++
++static int
++sunaudio_stream_get_latency(cubeb_stream * s, uint32_t * latency)
++{
++  if (!s || !latency)
++    return CUBEB_ERROR;
++
++  int rv = CUBEB_OK;
++  pthread_mutex_lock(&s->mutex);
++  if (s->active && s->fd > 0) {
++    if (s->using_oss) {
++      int delay;
++      ioctl(s->fd, SNDCTL_DSP_GETODELAY, &delay);
++      *latency = delay / s->n_channles / 2 / s->rate;
++    } else {
++      audio_info_t info;
++      ioctl(s->fd, AUDIO_GETINFO, &info);
++      *latency = (s->frm_played - info.play.samples) / s->rate;
++    }
++    DPR("sunaudio_stream_get_position() %lld\n", *p);
++  } else {
++    rv = CUBEB_ERROR;
++  }
++  pthread_mutex_unlock(&s->mutex);
++  return rv;
++}
++
++static struct cubeb_ops const sunaudio_ops = {
++  .init = sunaudio_init,
++  .get_backend_id = sunaudio_get_backend_id,
++  .destroy = sunaudio_destroy,
++  .get_preferred_sample_rate = sunaudio_get_preferred_sample_rate,
++  .stream_init = sunaudio_stream_init,
++  .stream_destroy = sunaudio_stream_destroy,
++  .stream_start = sunaudio_stream_start,
++  .stream_stop = sunaudio_stream_stop,
++  .stream_get_position = sunaudio_stream_get_position,
++  .get_max_channel_count = sunaudio_get_max_channel_count,
++  .get_min_latency = sunaudio_get_min_latency,
++  .stream_get_latency = sunaudio_stream_get_latency
++};
+--- mozilla-esr31/media/libcubeb/src/moz.build.orig	2015-06-04 17:42:52.255965962 -0700
++++ mozilla-esr31/media/libcubeb/src/moz.build	2015-06-04 17:42:52.261292681 -0700
[email protected]@ -30,6 +30,12 @@
+     ]
+     DEFINES['USE_SNDIO'] = True
+ 
++if CONFIG['OS_ARCH'] == 'SunOS':
++    SOURCES += [
++        'cubeb_sun.c',
++    ]
++    DEFINES['USE_SUN'] = True
++
+ if CONFIG['OS_TARGET'] == 'Darwin':
+     SOURCES += [
+         'cubeb_audiounit.c',
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox28-96-MediaDecoder.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+Casts the value to an int since abs() only takes an integer argument. 
+May want to change this so that we use labs() instead of abs(). 
+
+--- mozilla-esr31/content/media/MediaDecoderStateMachine.cpp.orig	2015-06-04 17:42:52.361303668 -0700
++++ mozilla-esr31/content/media/MediaDecoderStateMachine.cpp	2015-06-04 17:42:52.366561967 -0700
[email protected]@ -1227,7 +1227,7 @@
+   AssertCurrentThreadInMonitor();
+   int64_t duration = GetDuration();
+   if (aDuration != duration &&
+-      abs(aDuration - duration) > ESTIMATED_DURATION_FUZZ_FACTOR_USECS) {
++      abs((int)(aDuration - duration)) > ESTIMATED_DURATION_FUZZ_FACTOR_USECS) {
+     SetDuration(aDuration);
+     nsCOMPtr<nsIRunnable> event =
+       NS_NewRunnableMethod(mDecoder, &MediaDecoder::DurationChanged);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox29-214-gfx.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,27 @@
+May be compiler specific. Can potentially send upstream with an ifdef Solaris 
+statement. 
+Investigate whether the emmintrin.h part is necessary. 
+
+--- mozilla-esr31/gfx/2d/FilterProcessingSIMD-inl.h.orig	2015-06-04 17:42:52.586368339 -0700
++++ mozilla-esr31/gfx/2d/FilterProcessingSIMD-inl.h	2015-06-04 17:42:52.594507633 -0700
[email protected]@ -490,7 +490,7 @@
+   // int16_t rows_ra[8] == { rB, rG, rR, rA, aB, aG, aR, aA }.
+   // int32_t bias[4] == { _B, _G, _R, _A }.
+ 
+-  i32x4_t sum = bias;
++  i32x4_t sum = (i32x4_t)bias;
+ 
+   // int16_t bg[8] = { b, g, b, g, b, g, b, g };
+   i16x8_t bg = simd::ShuffleHi16<1,0,1,0>(simd::ShuffleLo16<1,0,1,0>(p));
+--- mozilla-esr31/gfx/2d/SIMD.h.orig	2015-06-04 17:42:52.591921342 -0700
++++ mozilla-esr31/gfx/2d/SIMD.h	2015-06-04 17:42:52.594674555 -0700
[email protected]@ -10,8 +10,8 @@
+  * Consumers of this file need to #define SIMD_COMPILE_SSE2 before including it
+  * if they want access to the SSE2 functions.
+  */
+-
+ #ifdef SIMD_COMPILE_SSE2
++#include <emmintrin.h>
+ #include <xmmintrin.h>
+ #endif
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox29-313-mozconfig_loader_bash.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,12 @@
+This patch is needed because the default shell on Solaris 10 has issues.
+The default shell on S11 and S12 is ksh93, which would probably work. If
+so, then this patch can be removed. This needs to be investigated further.
+
+--- mozilla-esr31/python/mozbuild/mozbuild/mozconfig_loader.orig	2015-06-04 17:42:52.695582248 -0700
++++ mozilla-esr31/python/mozbuild/mozbuild/mozconfig_loader	2015-06-04 17:42:52.698042560 -0700
[email protected]@ -1,4 +1,4 @@
+-#!/bin/sh
++#!/bin/bash
+ # This Source Code Form is subject to the terms of the Mozilla Public
+ # License, v. 2.0. If a copy of the MPL was not distributed with this
+ # file, You can obtain one at http://mozilla.org/MPL/2.0/.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox29-45-snappy.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,38 @@
+Solaris studio doesn't use __i386__ and __x86_64__ defined, instead uses 
+alternate definitions. 
+If we use GCC, we may not need this part of the patch. 
+The second part of the patch defined Endians. 
+Needs to go upstream. 
+
+--- mozilla-esr31/other-licenses/snappy/src/snappy-stubs-internal.h.orig	2015-06-04 17:42:51.512176985 -0700
++++ mozilla-esr31/other-licenses/snappy/src/snappy-stubs-internal.h	2015-06-04 17:42:51.521372882 -0700
[email protected]@ -178,7 +178,7 @@
+ 
+ // Potentially unaligned loads and stores.
+ 
+-#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__)
++#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || defined(__i386) || defined(__x86_64)
+ 
+ #define UNALIGNED_LOAD16(_p) (*reinterpret_cast<const uint16 *>(_p))
+ #define UNALIGNED_LOAD32(_p) (*reinterpret_cast<const uint32 *>(_p))
+--- mozilla-esr31//configure.orig	2015-06-04 17:42:51.515409215 -0700
++++ mozilla-esr31//configure	2015-06-04 17:42:51.524041156 -0700
[email protected]@ -9660,6 +9660,18 @@
+ #define SOLARIS 1
+ EOF
+ 
++    if test "$CPU_ARCH" = "sparc"; then
++ cat >> confdefs.pytmp <<\EOF
++  (''' WORDS_BIGENDIAN ''', ' 1 ')
++  (''' IS_BIG_ENDIAN ''', ' 1 ')
++EOF
++cat >> confdefs.h <<\EOF
++#define WORDS_BIGENDIAN 1
++#define IS_BIG_ENDIAN 1
++EOF
++
++    fi
++
+     TARGET_NSPR_MDCPUCFG='\"md/_solaris.cfg\"'
+     MOZ_FIX_LINK_PATHS=
+     # $ORIGIN/.. is for shared libraries under components/ to locate shared
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox30-05-skia_gpu.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,19 @@
+Returns an error if big endian. We probably don't need to worry about this 
+since we don't use Skia gpu. 
+Seems sparc specific. To be investigated. 
+
+--- mozilla-esr31/gfx/skia/trunk/include/gpu/GrTypes.h.orig	2015-06-04 17:42:51.134028157 -0700
++++ mozilla-esr31/gfx/skia/trunk/include/gpu/GrTypes.h	2015-06-04 17:42:51.145109963 -0700
[email protected]@ -285,9 +285,9 @@
+ static const int kGrPixelConfigCnt = kLast_GrPixelConfig + 1;
+ 
+ // Aliases for pixel configs that match skia's byte order.
+-#ifndef SK_CPU_LENDIAN
+-    #error "Skia gpu currently assumes little endian"
+-#endif
++// #ifndef SK_CPU_LENDIAN
++//    #error "Skia gpu currently assumes little endian"
++// #endif
+ #if SK_PMCOLOR_BYTE_ORDER(B,G,R,A)
+     static const GrPixelConfig kSkia8888_GrPixelConfig = kBGRA_8888_GrPixelConfig;
+ #elif SK_PMCOLOR_BYTE_ORDER(R,G,B,A)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox30-205-test.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,57 @@
+For testing. Commented out some tests that are known not to work on Solaris. 
+Can probably be removed. 
+
+The if(workerThreadCount)... part is already fixed upstream. 
+
+--- mozilla-esr31/docshell/test/unit/test_bug414201_jfif.js.orig	2015-06-04 17:42:52.485074716 -0700
++++ mozilla-esr31/docshell/test/unit/test_bug414201_jfif.js	2015-06-04 17:42:52.509205432 -0700
[email protected]@ -20,8 +20,9 @@
+     /* Check whether the primary extension is what we'd expect */
+     for (var mimetype in types) {
+         var exts = types[mimetype];
+-        var primary = ms.getFromTypeAndExtension(mimetype, null).primaryExtension.toLowerCase();
++// Known issue on Solaris
++//        var primary = ms.getFromTypeAndExtension(mimetype, null).primaryExtension.toLowerCase();
+ 
+-        do_check_true (exts.indexOf(primary) != -1);
++//        do_check_true (exts.indexOf(primary) != -1);
+     }
+ }
+--- mozilla-esr31/dom/tests/unit/test_geolocation_provider.js.orig	2015-06-04 17:42:52.490462853 -0700
++++ mozilla-esr31/dom/tests/unit/test_geolocation_provider.js	2015-06-04 17:42:52.509339704 -0700
[email protected]@ -70,6 +70,7 @@
+     // needs a place where it can store databases.
+     do_get_profile();
+ 
++/* Network issue
+     // only kill this test when shutdown is called on the provider.
+     do_test_pending();
+ 
[email protected]@ -89,4 +90,5 @@
+ 
+     geolocation = Cc["@mozilla.org/geolocation;1"].getService(Ci.nsISupports);
+     watchID = geolocation.watchPosition(successCallback, errorCallback);
++*/
+ }
+--- mozilla-esr31/gfx/tests/gtest/TestLayers.cpp.orig	2015-06-04 17:42:52.495808015 -0700
++++ mozilla-esr31/gfx/tests/gtest/TestLayers.cpp	2015-06-04 17:42:52.509475929 -0700
[email protected]@ -85,7 +85,7 @@
+ 
+ TEST(Layers, Defaults) {
+   TestContainerLayer layer(nullptr);
+-  ASSERT_EQ(1.0, layer.GetOpacity());
++  ASSERT_EQ(1.0f, layer.GetOpacity());
+   ASSERT_EQ(1.0f, layer.GetPostXScale());
+   ASSERT_EQ(1.0f, layer.GetPostYScale());
+ 
+--- mozilla-esr31/js/src/jit-test/tests/basic/offThreadCompileScript-02.js.orig	2015-06-04 17:42:52.501230839 -0700
++++ mozilla-esr31/js/src/jit-test/tests/basic/offThreadCompileScript-02.js	2015-06-04 17:42:52.509576725 -0700
[email protected]@ -1,5 +1,8 @@
+ // Test offThreadCompileScript option handling.
+ 
++if (workerThreadCount() === 0)
++  quit(0);
++
+ offThreadCompileScript('Error()');
+ assertEq(!!runOffThreadScript().stack.match(/^@<string>:1:1\n/), true);
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox30-29-rules_mk.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,15 @@
+Needs further investigation to see if this can be removed. 
+The ninstall... function is not callable for some reason, so we need to copy 
+the definition when using install_cmd. 
+
+--- mozilla-esr31/config/rules.mk.orig	2015-06-04 17:42:51.342231683 -0700
++++ mozilla-esr31/config/rules.mk	2015-06-04 17:42:51.344729049 -0700
[email protected]@ -1429,7 +1429,7 @@
+ nsinstall_is_usable = $(if $(wildcard $(DIST)/bin/nsinstall$(HOST_BIN_SUFFIX)),yes)
+ 
+ define install_cmd_override
+-$(1): install_cmd = $$(if $$(nsinstall_is_usable),$$(INSTALL),$$(NSINSTALL_PY) -t) $$(1)
++$(1): install_cmd = $$(if $(wildcard $(DIST)/bin/nsinstall$(HOST_BIN_SUFFIX)),$$(INSTALL),$$(NSINSTALL_PY) -t) $$(1)
+ endef
+ endif
+ endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox30-61-skia-endian.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,13 @@
+Already exists upstream. 
+
+--- mozilla-esr31/gfx/skia/trunk/include/core/SkPreConfig.h.orig	2015-06-04 17:42:51.687614279 -0700
++++ mozilla-esr31/gfx/skia/trunk/include/core/SkPreConfig.h	2015-06-04 17:42:51.689910035 -0700
[email protected]@ -93,7 +93,7 @@
+ 
+ #if !defined(SK_CPU_BENDIAN) && !defined(SK_CPU_LENDIAN)
+     #if defined (__ppc__) || defined(__PPC__) || defined(__ppc64__) \
+-        || defined(__PPC64__)
++        || defined(__PPC64__) || defined(__sparc) || defined(__sparc__)
+         #define SK_CPU_BENDIAN
+     #else
+         #define SK_CPU_LENDIAN
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-01-locale.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+Matches the OS locale. We need to determine if this patch should be sent
+upstream. 
+
+--- mozilla-esr31/modules/libpref/src/init/all.js.orig	2015-02-18 16:39:16.189950136 +0530
++++ mozilla-esr31/modules/libpref/src/init/all.js	2015-02-18 16:40:56.002524458 +0530
[email protected]@ -1461,7 +1461,7 @@ pref("intl.charset.detector",
+ pref("intl.charset.fallback.override",      "");
+ pref("intl.charset.fallback.tld",           true);
+ pref("intl.ellipsis",                       "chrome://global-platform/locale/intl.properties");
+-pref("intl.locale.matchOS",                 false);
++pref("intl.locale.matchOS",                 true);
+ // fallback charset list for Unicode conversion (converting from Unicode)
+ // currently used for mail send only to handle symbol characters (e.g Euro, trademark, smartquotes)
+ // for ISO-8859-1
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-03-g11n-nav-lang.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+This fixes Mozilla bug#285267 - navigator.language js property doesn't reflect 
+browser default language. It appears that this patch was previously 
+proposed upstream but not accepted. (https://bugzilla.mozilla.org/show_bug.cgi?id=285267) 
+
+diff --git a/browser/locales/en-US/firefox-l10n.js b/browser/locales/en-US/firefox-l10n.js
+index e9027aa..10bdcdb 100644
+--- a/browser/locales/en-US/firefox-l10n.js
++++ b/browser/locales/en-US/firefox-l10n.js
[email protected]@ -36,4 +36,4 @@
+ 
+ #filter substitution
+ 
+-pref("general.useragent.locale", "@[email protected]");
++pref("general.useragent.locale", "chrome://global/locale/intl.properties");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-13-jit-test-multi-processes.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+For testing. This reduces memory needed for JIT test. The -f flag will print 
+the full patch of failures (want to keep this). 
+
+--- mozilla-esr31/js/src/Makefile.in.orig	2015-06-04 17:42:51.305891808 -0700
++++ mozilla-esr31/js/src/Makefile.in	2015-06-04 17:42:51.308235809 -0700
[email protected]@ -152,7 +152,7 @@
+ 
+ check-jit-test::
+ 	$(JITTEST_ASAN_ENV) $(wildcard $(RUN_TEST_PROGRAM)) $(PYTHON) -u $(srcdir)/jit-test/jit_test.py \
+-	        --no-slow --no-progress --tinderbox --tbpl $(JITTEST_VALGRIND_FLAG) \
++	        --no-slow --no-progress --tinderbox --tbpl -j 2 -f $(JITTEST_VALGRIND_FLAG) \
+ 	        $(DIST)/bin/$(JS_SHELL_NAME)$(BIN_SUFFIX)
+ 
+ check:: check-style
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-199-stacksize.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,15 @@
+For sparc. Our function frame is very big, so on sparc we need more stack size.
+Potentially send upstream. 
+
+--- mozilla-esr31/js/src/jsapi.cpp.orig	2015-06-04 17:42:52.465842609 -0700
++++ mozilla-esr31/js/src/jsapi.cpp	2015-06-04 17:42:52.468887397 -0700
[email protected]@ -2120,6 +2120,9 @@
+ static void
+ SetNativeStackQuota(JSRuntime* rt, StackKind kind, size_t stackSize)
+ {
++#ifdef JS_CPU_SPARC
++    stackSize = stackSize * 8 < 7 * 1024 * 1024 ? stackSize * 8 : 7 * 1024 * 1024;
++#endif
+     rt->nativeStackQuota[kind] = stackSize;
+     if (rt->nativeStackBase)
+         RecomputeStackLimit(rt, kind);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-30-configure.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,81 @@
+Shell translations. Should probably be removed. 
+
+--- mozilla-esr31/js/src/configure.orig	2015-06-04 17:42:51.357938258 -0700
++++ mozilla-esr31/js/src/configure	2015-06-04 17:42:51.371806503 -0700
[email protected]@ -1291,7 +1291,7 @@
+   fi
+ 
+     fi
+-    IS_GCC=$($CC -v 2>&1 | grep gcc)
++    IS_GCC=`$CC -v 2>&1 | grep gcc`
+     if test -n "$IS_GCC"
+     then
+       echo gcc is known to be broken on OS X, please use clang.
[email protected]@ -4342,7 +4342,7 @@
+ for base in $MOZILLA_CENTRAL_PATH $_topsrcdir $_topsrcdir/../..; do
+   possible=$base/python/mozbuild/mozbuild/virtualenv.py
+ 
+-  if test -e $possible; then
++  if test -f $possible; then
+     _virtualenv_topsrcdir=$base
+     _virtualenv_populate_path=$possible
+     break
[email protected]@ -8861,12 +8861,12 @@
+ 
+ if test "$GNU_CC" -a -n "$MOZ_FORCE_GOLD"; then
+             if $CC -Wl,--version 2>&1 | grep -q "GNU ld"; then
+-        GOLD=$($CC -print-prog-name=ld.gold)
++        GOLD=`$CC -print-prog-name=ld.gold`
+         case "$GOLD" in
+         /*)
+             ;;
+         *)
+-            GOLD=$(which $GOLD)
++            GOLD=`which $GOLD`
+             ;;
+         esac
+         if test -n "$GOLD"; then
[email protected]@ -15668,7 +15668,8 @@
+     	  _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ case "$host" in
+ *-mingw*)
+-    _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL)
++    tmp_DIRNAME=`dirname "$_CONFIG_SHELL"`
++    _CONFIG_SHELL=`(cd $tmp_DIRNAME; pwd -W)`/`(basename $_CONFIG_SHELL)`
+     if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then
+         _CONFIG_SHELL="${_CONFIG_SHELL}.exe"
+     fi
[email protected]@ -15793,7 +15794,8 @@
+           _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ case "$host" in
+ *-mingw*)
+-    _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL)
++     tmp_DIRNAME=`dirname "$_CONFIG_SHELL"`
++    _CONFIG_SHELL=`(cd $tmp_DIRNAME; pwd -W)`/`(basename $_CONFIG_SHELL)`
+     if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then
+         _CONFIG_SHELL="${_CONFIG_SHELL}.exe"
+     fi
[email protected]@ -16044,7 +16046,8 @@
+    _CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ case "$host" in
+ *-mingw*)
+-    _CONFIG_SHELL=$(cd $(dirname $_CONFIG_SHELL); pwd -W)/$(basename $_CONFIG_SHELL)
++     tmp_DIRNAME=`dirname "$_CONFIG_SHELL"`
++    _CONFIG_SHELL=`(cd $tmp_DIRNAME; pwd -W)`/`(basename $_CONFIG_SHELL)`
+     if test ! -e "$_CONFIG_SHELL" -a -e "${_CONFIG_SHELL}.exe"; then
+         _CONFIG_SHELL="${_CONFIG_SHELL}.exe"
+     fi
[email protected]@ -16613,9 +16616,12 @@
+   
+ chmod +x $CONFIG_STATUS
+ rm -fr confdefs* $ac_clean_files
+-if test "$no_create" != yes && ! ${PYTHON} $CONFIG_STATUS; then
++if test "$no_create" != yes; then
++  ${PYTHON} $CONFIG_STATUS
++  if test "$?" != 0; then
+     trap '' EXIT
+     exit 1
++  fi
+ fi
+ 
+ fi
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-317-sparc-xptcall.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,53 @@
+See Mozilla bug #1153707 - [JavaScript Error: "invalid 'in' operand 
+aLivemarkInfo"] when calling method: [mozIAsyncLivemarks::getLivemark].
+This is already upstream in version 38. 
+
+--- mozilla-esr31/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_solaris.cpp.orig	2015-06-04 17:42:52.730766562 -0700
++++ mozilla-esr31/xpcom/reflect/xptcall/src/md/unix/xptcstubs_sparc_solaris.cpp	2015-06-04 17:42:52.738654394 -0700
[email protected]@ -52,13 +52,17 @@
+ 
+         if(param.IsOut() || !type.IsArithmetic())
+         {
+-            dp->val.p = (void*) *ap;
++            if (type == nsXPTType::T_JSVAL)
++                dp->val.p = *((void**)*ap);
++            else
++                dp->val.p = (void*) *ap;
++
+             continue;
+         }
+         // else
+         switch(type)
+         {
+-        case nsXPTType::T_I8     : dp->val.i8  = *((int32_t*)  ap);       break;
++        case nsXPTType::T_I8     : dp->val.i8  = *((int32_t*) ap);       break;
+         case nsXPTType::T_I16    : dp->val.i16 = *((int32_t*) ap);       break;
+         case nsXPTType::T_I32    : dp->val.i32 = *((int32_t*) ap);       break;
+         case nsXPTType::T_DOUBLE :
+--- mozilla-esr31/js/xpconnect/src/XPCWrappedJSClass.cpp.orig	2015-06-04 17:42:52.736217989 -0700
++++ mozilla-esr31/js/xpconnect/src/XPCWrappedJSClass.cpp	2015-06-04 17:42:52.739152339 -0700
[email protected]@ -1357,21 +1357,9 @@
+                 break;
+         }
+ 
+-// see bug #961488
+-#if (defined(XP_UNIX) && !defined(XP_MACOSX) && !defined(_AIX)) && \
+-    ((defined(__sparc) && !defined(__sparcv9) && !defined(__sparcv9__)) || \
+-    (defined(__powerpc__) && !defined (__powerpc64__)))
+-        if (type_tag == nsXPTType::T_JSVAL) {
+-            if (!XPCConvert::JSData2Native(*(void**)(&pv->val), val, type,
+-                                           !param.IsDipper(), &param_iid, nullptr))
+-                break;
+-        } else
+-#endif
+-        {
+-            if (!XPCConvert::JSData2Native(&pv->val, val, type,
+-                                           !param.IsDipper(), &param_iid, nullptr))
+-                break;
+-        }
++        if (!XPCConvert::JSData2Native(&pv->val, val, type,
++                                       !param.IsDipper(), &param_iid, nullptr))
++            break;
+     }
+ 
+     // if any params were dependent, then we must iterate again to convert them.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-401-other-buildissue.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,97 @@
+Various ifdef Solaris fixes. 
+Recast for getpid() because it requires an int. 
+Changing default flags for compiling on SSE. We can try removing these or add
+them to the config lines in Makefile. 
+
+--- mozilla-esr31/build/gyp.mozbuild.orig	2015-06-04 17:42:52.755839292 -0700
++++ mozilla-esr31/build/gyp.mozbuild	2015-06-04 17:42:52.861350941 -0700
[email protected]@ -38,6 +38,7 @@
+     'moz_widget_toolkit_gonk': 0,
+     'moz_webrtc_omx': 0,
+ 
++    'use_official_google_api_keys': 0,
+     # (for vp8) chromium sets to 0 also
+     'use_temporal_layers': 0,
+     # Creates AEC internal sample dump files in current directory
+--- mozilla-esr31/memory/mozalloc/VolatileBufferFallback.cpp.orig	2015-06-04 17:42:52.788896719 -0700
++++ mozilla-esr31/memory/mozalloc/VolatileBufferFallback.cpp	2015-06-04 17:42:52.862173467 -0700
[email protected]@ -8,7 +8,7 @@
+ #include "mozilla/mozalloc.h"
+ 
+ #ifdef MOZ_MEMORY
+-int posix_memalign(void** memptr, size_t alignment, size_t size);
++extern "C" int posix_memalign(void** memptr, size_t alignment, size_t size);
+ #endif
+ 
+ namespace mozilla {
+--- mozilla-esr31/media/libsoundtouch/src/FIRFilter.cpp.orig	2015-06-04 17:42:52.816481996 -0700
++++ mozilla-esr31/media/libsoundtouch/src/FIRFilter.cpp	2015-06-04 17:42:52.863552954 -0700
[email protected]@ -46,6 +46,10 @@
+ #include "FIRFilter.h"
+ #include "cpu_detect.h"
+ 
++#ifdef __sun
++#include <alloca.h>
++#endif
++
+ #ifdef _MSC_VER
+ #include <malloc.h>
+ #define alloca _alloca
+--- mozilla-esr31/media/libsoundtouch/src/SoundTouch.cpp.orig	2015-06-04 17:42:52.821942936 -0700
++++ mozilla-esr31/media/libsoundtouch/src/SoundTouch.cpp	2015-06-04 17:42:52.863676152 -0700
[email protected]@ -80,6 +80,10 @@
+ #include "RateTransposer.h"
+ #include "cpu_detect.h"
+ 
++#ifdef __sun
++#include <alloca.h>
++#endif
++
+ #ifdef _MSC_VER
+ #include <malloc.h>
+ #define alloca _alloca
+--- mozilla-esr31/media/webrtc/trunk/build/common.gypi.orig	2015-06-04 17:42:52.827866736 -0700
++++ mozilla-esr31/media/webrtc/trunk/build/common.gypi	2015-06-04 17:42:52.864152685 -0700
[email protected]@ -917,11 +917,16 @@
+     'android_app_version_name%': 'Developer Build',
+     'android_app_version_code%': 0,
+ 
+-    'sas_dll_exists': '<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
+-    'wix_exists': '<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(wix_path))',
++    'conditions': [
++      ['OS=="win"', {
++        'sas_dll_exists': '<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(sas_dll_path))',
++        'wix_exists': '<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(wix_path))',
++      }],
++    ],
+ 
+     'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
+     'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
++    'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
+ 
+     'conditions': [
+       ['"<!(<(PYTHON) <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
+--- mozilla-esr31/xpcom/base/nsStatusReporterManager.cpp.orig	2015-06-04 17:42:52.846266617 -0700
++++ mozilla-esr31/xpcom/base/nsStatusReporterManager.cpp	2015-06-04 17:42:52.864489417 -0700
[email protected]@ -142,7 +142,7 @@
+   nsresult rv;
+ 
+   nsCString filename("status-reports-");
+-  filename.AppendInt(getpid());
++  filename.AppendInt((int)getpid());
+   filename.AppendLiteral("-");
+   filename.AppendInt(number++);
+   filename.AppendLiteral(".json");
+--- mozilla-esr31//configure.orig	2015-06-04 17:42:52.849519256 -0700
++++ mozilla-esr31//configure	2015-06-04 17:42:52.867572588 -0700
[email protected]@ -9678,8 +9678,8 @@
+        CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef"
+        LDFLAGS="-xildoff $LDFLAGS"
+        MMX_FLAGS="-xarch=mmx -xO4"
+-       SSE_FLAGS="-xarch=sse"
+-       SSE2_FLAGS="-xarch=ssei2 -xO4"
++       SSE_FLAGS="-xarch=sse -xO4"
++       SSE2_FLAGS="-xarch=sse2 -xO4"
+        if test -z "$CROSS_COMPILE" -a -f /usr/lib/ld/map.noexstk; then
+            _SAVE_LDFLAGS=$LDFLAGS
+            LDFLAGS="-M /usr/lib/ld/map.noexstk $LDFLAGS"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-405-cpu.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,15 @@
+Can try removing this one since we are now using GNU compilers.
+ 
+--- mozilla-esr31/js/src/assembler/assembler/MacroAssemblerX86Common.cpp.orig	2015-06-04 17:42:52.915487926 -0700
++++ mozilla-esr31/js/src/assembler/assembler/MacroAssemblerX86Common.cpp	2015-06-04 17:42:52.917782337 -0700
[email protected]@ -31,8 +31,8 @@
+ {
+     // Default the flags value to zero; if the compiler is
+     // not MSVC or GCC we will read this as SSE2 not present.
+-    int flags_edx = 0;
+-    int flags_ecx = 0;
++    volatile int flags_edx = 0;
++    volatile int flags_ecx = 0;
+ #if WTF_COMPILER_MSVC
+ #if WTF_CPU_X86_64
+     int cpuinfo[4];
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-408-urlbar-sparc.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,16 @@
+For the font in the URL bar. Can try to send upstream. 
+
+--- mozilla-esr31/gfx/cairo/cairo/src/cairo-xlib-surface.c.orig	2015-06-04 17:42:52.933166699 -0700
++++ mozilla-esr31/gfx/cairo/cairo/src/cairo-xlib-surface.c	2015-06-04 17:42:52.936030831 -0700
[email protected]@ -1310,7 +1310,11 @@
+ 		int a, r, g, b;
+ 
+ 		if (image_masks.bpp == 1)
++#ifdef WORDS_BIGENDIAN
++		    in_pixel = !! (((uint8_t*)row)[x/8] & (1 << (7 - (x & 7))));
++#else
+ 		    in_pixel = !! (((uint8_t*)row)[x/8] & (1 << (x & 7)));
++#endif
+ 		else if (image_masks.bpp <= 8)
+ 		    in_pixel = ((uint8_t*)row)[x];
+ 		else if (image_masks.bpp <= 16)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-409-thumbnail-sparc.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,16 @@
+Either already fixed or we can send upstream. 
+
+--- mozilla-esr31/gfx/2d/DataSurfaceHelpers.cpp.orig	2015-06-04 17:42:52.952071382 -0700
++++ mozilla-esr31/gfx/2d/DataSurfaceHelpers.cpp	2015-06-04 17:42:52.954656062 -0700
[email protected]@ -19,11 +19,7 @@
+ 
+   for (int row = 0; row < aSize.height; ++row) {
+     for (int column = 0; column < aSize.width; ++column) {
+-#ifdef IS_BIG_ENDIAN
+-      pixel[column] |= 0x000000FF;
+-#else
+       pixel[column] |= 0xFF000000;
+-#endif
+     }
+     pixel += (aStride/4);
+   }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-43-solaris_jemalloc_linkage.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,157 @@
+This patch makes it so jemalloc is not included in firefox. Not accepted by 
+the upstream community. 
+Put jemalloc inside libxul. Then need firefox to depend on libxul
+and build jemalloc library.
+Remove lines - do not include memory for every program
+Need to create/add our own versions of the functions malloc_usable, jemalloc_stats, etc.
+Remove mozalloc library
+Check if we have jemalloc; if not, skip it.
+Build libxul and use flags -Wl,-z,interpose, needed to build the library.
+
+--- mozilla-esr31/browser/app/Makefile.in.orig	2015-06-04 17:42:51.441312058 -0700
++++ mozilla-esr31/browser/app/Makefile.in	2015-06-04 17:42:51.478117039 -0700
[email protected]@ -30,6 +30,12 @@
+ 	$(XPCOM_STANDALONE_GLUE_LDOPTS) \
+ 	$(NULL)
+ 
++ifdef MOZ_MEMORY
++ifeq ($(OS_ARCH),SunOS)
++LIBS += $(LIBXUL_LIBS)
++endif
++endif
++
+ ifdef MOZ_LINKER
+ LIBS += $(MOZ_ZLIB_LIBS)
+ endif
+--- mozilla-esr31/config/jemalloc_solaris.map.orig	1969-12-31 16:00:00.000000000 -0800
++++ mozilla-esr31/config/jemalloc_solaris.map	2015-06-04 17:42:51.478209751 -0700
[email protected]@ -0,0 +1,12 @@
++{
++    global:
++        calloc             = NODIRECT;
++        free               = NODIRECT;
++        jemalloc_stats     = NODIRECT;
++        malloc             = NODIRECT;
++        malloc_usable_size = NODIRECT;
++        memalign           = NODIRECT;
++        posix_memalign     = NODIRECT;
++        realloc            = NODIRECT;
++        valloc             = NODIRECT;
++};
+--- mozilla-esr31//configure.orig	2015-06-04 17:42:51.444508647 -0700
++++ mozilla-esr31//configure	2015-06-04 17:42:51.480874311 -0700
[email protected]@ -24162,9 +24162,6 @@
+   fi
+ else
+     MOZ_GLUE_PROGRAM_LDFLAGS='$(MKSHLIB_FORCE_ALL) $(call EXPAND_LIBNAME_PATH,mozglue,$(LIBXUL_DIST)/lib)'
+-      if test "$MOZ_MEMORY" = 1 -o \( "$LIBXUL_SDK" -a -f "$LIBXUL_SDK/lib/${LIB_PREFIX}memory.${LIB_SUFFIX}" \); then
+-    MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS "'$(call EXPAND_LIBNAME_PATH,memory,$(LIBXUL_DIST)/lib)'
+-  fi
+   MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS "'$(MKSHLIB_UNFORCE_ALL)'
+   if test -n "$GNU_CC"; then
+         MOZ_GLUE_PROGRAM_LDFLAGS="$MOZ_GLUE_PROGRAM_LDFLAGS -rdynamic"
+--- mozilla-esr31/memory/mozalloc/mozalloc.cpp.orig	2015-06-04 17:42:51.453412680 -0700
++++ mozilla-esr31/memory/mozalloc/mozalloc.cpp	2015-06-04 17:42:51.481002191 -0700
[email protected]@ -200,6 +200,14 @@
+ }
+ #endif // if defined(HAVE_VALLOC)
+ 
++#if defined(MOZ_MEMORY_SOLARIS)
++#include "jemalloc_types.h"
++extern "C" {
++extern size_t malloc_usable_size(const void *ptr);
++extern void jemalloc_stats(jemalloc_stats_t* stats);
++}
++#endif
++
+ size_t
+ moz_malloc_usable_size(void *ptr)
+ {
[email protected]@ -209,7 +217,22 @@
+ #if defined(XP_MACOSX)
+     return malloc_size(ptr);
+ #elif defined(HAVE_MALLOC_USABLE_SIZE) || defined(MOZ_MEMORY)
++#if defined(SOLARIS)
++    static bool checked = false;
++    static bool using_jemalloc = false;
++    if (!checked) {
++        checked = true;
++        jemalloc_stats_t stats;
++        jemalloc_stats(&stats);
++        using_jemalloc = stats.allocated;
++    }
++    if (using_jemalloc)
++        return malloc_usable_size(ptr);
++    else
++        return 0;
++#else
+     return malloc_usable_size(ptr);
++#endif
+ #elif defined(XP_WIN)
+     return _msize(ptr);
+ #else
+--- mozilla-esr31/security/manager/ssl/tests/unit/tlsserver/cmd/Makefile.in.orig	2015-06-04 17:42:51.459223858 -0700
++++ mozilla-esr31/security/manager/ssl/tests/unit/tlsserver/cmd/Makefile.in	2015-06-04 17:42:51.481099560 -0700
[email protected]@ -9,7 +9,6 @@
+ LIBS = \
+   $(NSPR_LIBS) \
+   $(NSS_LIBS) \
+-  $(MOZALLOC_LIB) \
+   ../../../../../../pkix/$(LIB_PREFIX)mozillapkix.$(LIB_SUFFIX) \
+   ../../../../../../pkix/test/lib/$(LIB_PREFIX)pkixtestutil.$(LIB_SUFFIX) \
+   ../lib/$(LIB_PREFIX)tlsserver.$(LIB_SUFFIX) \
+--- mozilla-esr31/storage/src/mozStorageService.cpp.orig	2015-06-04 17:42:51.464827762 -0700
++++ mozilla-esr31/storage/src/mozStorageService.cpp	2015-06-04 17:42:51.481242977 -0700
[email protected]@ -503,9 +503,14 @@
+   int rc;
+ 
+ #ifdef MOZ_STORAGE_MEMORY
+-  rc = ::sqlite3_config(SQLITE_CONFIG_MALLOC, &memMethods);
+-  if (rc != SQLITE_OK)
+-    return convertResultCode(rc);
++  // in case other malloc library is PRELOAD-ed
++  void *test_jemalloc = malloc(4);
++  if (::moz_malloc_usable_size(test_jemalloc)) {
++    rc = ::sqlite3_config(SQLITE_CONFIG_MALLOC, &memMethods);
++    if (rc != SQLITE_OK)
++      return convertResultCode(rc);
++  }
++  free(test_jemalloc);
+ #endif
+ 
+   // Explicitly initialize sqlite3.  Although this is implicitly called by
+--- mozilla-esr31/toolkit/library/Makefile.in.orig	2015-06-04 17:42:51.470433696 -0700
++++ mozilla-esr31/toolkit/library/Makefile.in	2015-06-04 17:42:51.481334017 -0700
[email protected]@ -24,6 +24,16 @@
+ 
+ include $(topsrcdir)/config/rules.mk
+ 
++ifdef MOZ_MEMORY
++ifeq ($(OS_ARCH),SunOS)
++EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,memory,$(LIBXUL_DIST)/lib) -Wl,-M $(topsrcdir)/config/jemalloc_solaris.map -Wl,-z,interpose
++endif
++endif
++
++ifeq ($(OS_ARCH),SunOS)
++EXTRA_DSO_LDOPTS += -lintl_unicharutil_util_internal -lxpt -lm -Wl,-z,defs
++endif
++
+ .PHONY: gtestxul
+ gtestxul:
+ 	$(MAKE) -C gtest libs LINK_GTEST=1
+--- mozilla-esr31/toolkit/library/libxul.mk.orig	2015-06-04 17:42:51.475797585 -0700
++++ mozilla-esr31/toolkit/library/libxul.mk	2015-06-04 17:42:51.481432770 -0700
[email protected]@ -253,3 +253,13 @@
+ ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
+ OS_LIBS += $(call EXPAND_LIBNAME,usp10 oleaut32)
+ endif
++
++ifdef MOZ_MEMORY
++ifeq ($(OS_ARCH),SunOS)
++EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,memory,$(LIBXUL_DIST)/lib) -Wl,-M $(topsrcdir)/config/jemalloc_solaris.map -Wl,-z,interpose
++endif
++endif
++
++ifeq ($(OS_ARCH),SunOS)
++EXTRA_DSO_LDOPTS += -lintl_unicharutil_util_internal -lxpt -lm -Wl,-z,defs
++endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-60-Yarr_SPARC.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,77 @@
+Sparc assembler and fixes a bug in JIT. 
+Also some endian patch. 
+
+--- mozilla-esr31/js/src/assembler/assembler/MacroAssemblerSparc.h.orig	2015-06-04 17:42:51.654203814 -0700
++++ mozilla-esr31/js/src/assembler/assembler/MacroAssemblerSparc.h	2015-06-04 17:42:51.667707756 -0700
[email protected]@ -337,6 +337,17 @@
+             }
+         }
+ 
++        void load16Unaligned(BaseIndex address, RegisterID dest)
++        {
++            m_assembler.sll_imm(address.index, address.scale, SparcRegisters::g2);
++            add32(Imm32(address.offset+1), SparcRegisters::g2);
++            m_assembler.ldub_r(address.base, SparcRegisters::g2, dest);
++            m_assembler.subcc_imm(SparcRegisters::g2, 1, SparcRegisters::g2);
++            m_assembler.ldub_r(address.base, SparcRegisters::g2, SparcRegisters::g3);
++            m_assembler.sll_imm(SparcRegisters::g3, 8, SparcRegisters::g3);
++            m_assembler.or_r(SparcRegisters::g3, dest, dest);
++        }
++
+         void store8(RegisterID src, ImplicitAddress address)
+         {
+             if (m_assembler.isimm13(address.offset))
[email protected]@ -416,6 +427,11 @@
+             }
+         }
+ 
++        void load8(BaseIndex address, RegisterID dest)
++        {
++            load8ZeroExtend(address, dest);
++        }
++
+         void load8SignExtend(BaseIndex address, RegisterID dest)
+         {
+             m_assembler.sll_imm(address.index, address.scale, SparcRegisters::g2);
+--- mozilla-esr31/js/src/assembler/assembler/SparcAssembler.h.orig	2015-06-04 17:42:51.659564348 -0700
++++ mozilla-esr31/js/src/assembler/assembler/SparcAssembler.h	2015-06-04 17:42:51.667904536 -0700
[email protected]@ -161,6 +161,10 @@
+             {
+             }
+ 
++            bool isSet() const {
++                return m_offset != -1;
++            }
++
+         private:
+             JmpSrc(int offset)
+                 : m_offset(offset)
+--- mozilla-esr31/js/src/yarr/YarrJIT.cpp.orig	2015-06-04 17:42:51.665227855 -0700
++++ mozilla-esr31/js/src/yarr/YarrJIT.cpp	2015-06-04 17:42:51.668284205 -0700
[email protected]@ -84,6 +84,7 @@
+     static const RegisterID regT1 = SparcRegisters::i5;
+ 
+     static const RegisterID returnRegister = SparcRegisters::i0;
++    static const RegisterID returnRegister2 = SparcRegisters::i1;
+ #elif WTF_CPU_X86
+     static const RegisterID input = X86Registers::eax;
+     static const RegisterID index = X86Registers::edx;
[email protected]@ -824,6 +825,18 @@
+                 ignoreCaseMask |= 32 << shiftAmount;
+         }
+ 
++#if WTF_CPU_BIG_ENDIAN
++        if (m_charSize == Char8) {
++            allCharacters = (allCharacters << 24) | ((allCharacters << 8) & 0xff0000) |
++                            ((allCharacters >> 8) & 0xff00) | ((allCharacters >> 24) & 0xff);
++            ignoreCaseMask = (ignoreCaseMask << 24) | ((ignoreCaseMask << 8) & 0xff0000) |
++                             ((ignoreCaseMask >> 8) & 0xff00) | ((ignoreCaseMask >> 24) & 0xff);
++        } else {
++            allCharacters = (allCharacters << 16) | ((allCharacters >> 16) & 0xffff);
++            ignoreCaseMask = (ignoreCaseMask << 16) | ((ignoreCaseMask >> 16) & 0xffff);
++        }
++#endif
++
+         if (m_charSize == Char8) {
+             switch (numberCharacters) {
+             case 1:
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-69-ipcv2.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,2115 @@
+There are a lot of separate ipcv2 patches collected here in one file.
+Some of them are Studio specific and can hopefully be removed.
+
+In more detail: 
+
+First part is for studio, we may be able to remove. 
+Need to keep the if defined(OS_LINUX)... parts, should try to send upstream. 
+Using evpoll/devpoll instead of epoll may be Studio specific. 
+asm_volatile changes may also be studio specific. 
+
+For Solaris, we have no proc/self/exe location so we get the name of the 
+process some other way. Should be able to send this part upstream. 
+
+Patch to use FTS (tool for traversing tool hierarchies). We have these
+functions but they're not in libraries for C. This part is included in firefox
+40. 
+
+ENABLE_XSS_SUPPORT links XSS libraries; needs further investigation. 
+
+In Solaris, the queue can be too long so we have it read 32 bits only (?) for
+the wakeup_pip_read function. 
+
+DCHECK(std::find...) may be because we couldn't compile it otherwise. Needs
+namespace added. 
+
+We can remove the part for wstring because it's for studio. 
+
+Solaris specific change for adding definition of thr_self. 
+
+Differing memory for munmap((caddr_t)... patch
+
+We don't have timestruct defined in solaris (#ifndef SOLARIS...timstruct...)
+
+event2/event-config.h: Adds a new file so that libevent will compile on Solaris.In the .mozconfig file, we are using system libevent, so this shouldn't be necessary.
+
+IPC_RMID -- shared memory; on solaris, need to detach the shared memory first. So we move that segment of code up. If we detach the memory in Solaris, we cannot do a new attach.
+
+Add flags for Studio compiler. (CXXFLAGS)
+
+extern *C* int madvise(...) not defined , so we need to define it.
+
+--- mozilla-esr31//configure.orig	2015-06-04 17:42:51.721170546 -0700
++++ mozilla-esr31//configure	2015-06-04 17:42:52.022280764 -0700
[email protected]@ -9675,7 +9675,7 @@
+ EOF
+ 
+        CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all -D__FUNCTION__=__func__"
+-       CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef"
++       CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef -D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
+        LDFLAGS="-xildoff $LDFLAGS"
+        MMX_FLAGS="-xarch=mmx -xO4"
+        SSE_FLAGS="-xarch=sse"
+--- mozilla-esr31/dom/plugins/ipc/PluginMessageUtils.cpp.orig	2015-06-04 17:42:51.729961817 -0700
++++ mozilla-esr31/dom/plugins/ipc/PluginMessageUtils.cpp	2015-06-04 17:42:52.022446816 -0700
[email protected]@ -85,7 +85,7 @@
+   }
+ }
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_SOLARIS)
+ static string
+ ReplaceAll(const string& haystack, const string& needle, const string& with)
+ {
[email protected]@ -104,7 +104,7 @@
+ string
+ MungePluginDsoPath(const string& path)
+ {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_SOLARIS)
+   // https://bugzilla.mozilla.org/show_bug.cgi?id=519601
+   return ReplaceAll(path, "netscape", "[email protected]");
+ #else
[email protected]@ -115,7 +115,7 @@
+ string
+ UnmungePluginDsoPath(const string& munged)
+ {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_SOLARIS)
+   return ReplaceAll(munged, "[email protected]", "netscape");
+ #else
+   return munged;
+--- mozilla-esr31/dom/plugins/ipc/PluginModuleChild.cpp.orig	2015-06-04 17:42:51.732749854 -0700
++++ mozilla-esr31/dom/plugins/ipc/PluginModuleChild.cpp	2015-06-04 17:42:52.022749494 -0700
[email protected]@ -207,7 +207,7 @@
+ 
+     // TODO: use PluginPRLibrary here
+ 
+-#if defined(OS_LINUX) || defined(OS_BSD)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+     mShutdownFunc =
+         (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown");
+ 
[email protected]@ -238,9 +238,11 @@
+ }
+ 
+ #if defined(MOZ_WIDGET_GTK)
++extern "C" {
+ typedef void (*GObjectDisposeFn)(GObject*);
+ typedef gboolean (*GtkWidgetScrollEventFn)(GtkWidget*, GdkEventScroll*);
+ typedef void (*GtkPlugEmbeddedFn)(GtkPlug*);
++}
+ 
+ static GObjectDisposeFn real_gtk_plug_dispose;
+ static GtkPlugEmbeddedFn real_gtk_plug_embedded;
[email protected]@ -1837,7 +1839,7 @@
+     PLUGIN_LOG_DEBUG_METHOD;
+     AssertPluginThread();
+ 
+-#if defined(OS_LINUX) || defined(OS_BSD)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+     return true;
+ #elif defined(OS_WIN) || defined(OS_MACOSX)
+     *_retval = mGetEntryPointsFunc(&mFunctions);
[email protected]@ -1866,7 +1868,7 @@
+     SendBackUpXResources(FileDescriptor(xSocketFd));
+ #endif
+ 
+-#if defined(OS_LINUX) || defined(OS_BSD)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+     *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions);
+     return true;
+ #elif defined(OS_WIN) || defined(OS_MACOSX)
+--- mozilla-esr31/dom/plugins/ipc/PluginModuleChild.h.orig	2015-06-04 17:42:51.740779458 -0700
++++ mozilla-esr31/dom/plugins/ipc/PluginModuleChild.h	2015-06-04 17:42:52.022883746 -0700
[email protected]@ -319,7 +319,7 @@
+ 
+     // we get this from the plugin
+     NP_PLUGINSHUTDOWN mShutdownFunc;
+-#if defined(OS_LINUX) || defined(OS_BSD)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+     NP_PLUGINUNIXINIT mInitializeFunc;
+ #elif defined(OS_WIN) || defined(OS_MACOSX)
+     NP_PLUGININIT mInitializeFunc;
+--- mozilla-esr31/dom/plugins/ipc/PluginModuleParent.h.orig	2015-06-04 17:42:51.746067316 -0700
++++ mozilla-esr31/dom/plugins/ipc/PluginModuleParent.h	2015-06-04 17:42:52.023009056 -0700
[email protected]@ -203,7 +203,7 @@
+ 
+     // Implement the module-level functions from NPAPI; these are
+     // normally resolved directly from the DSO.
+-#ifdef OS_LINUX
++#if defined(OS_LINUX) || defined(OS_SOLARIS)
+     NPError NP_Initialize(const NPNetscapeFuncs* npnIface,
+                           NPPluginFuncs* nppIface);
+ #else
+--- mozilla-esr31/dom/plugins/ipc/PluginProcessParent.cpp.orig	2015-06-04 17:42:51.751413278 -0700
++++ mozilla-esr31/dom/plugins/ipc/PluginProcessParent.cpp	2015-06-04 17:42:52.023117720 -0700
[email protected]@ -68,6 +68,9 @@
+         else if (base::PROCESS_ARCH_ARM & pluginLibArchitectures & containerArchitectures) {
+           selectedArchitecture = base::PROCESS_ARCH_ARM;
+         }
++        else if (base::PROCESS_ARCH_SPARC & pluginLibArchitectures & containerArchitectures) {
++          selectedArchitecture = base::PROCESS_ARCH_SPARC;
++        }
+         else {
+             return false;
+         }
+--- mozilla-esr31/ipc/chromium/chromium-config.mozbuild.orig	2015-06-04 17:42:51.762667985 -0700
++++ mozilla-esr31/ipc/chromium/chromium-config.mozbuild	2015-06-04 17:42:52.023331021 -0700
[email protected]@ -41,6 +41,9 @@
+     if CONFIG['OS_ARCH'] == 'Darwin':
+         DEFINES['OS_MACOSX'] = 1
+ 
++    elif CONFIG['OS_ARCH'] == 'SunOS':
++        DEFINES['OS_SOLARIS'] = 1
++
+     elif CONFIG['OS_ARCH'] == 'DragonFly':
+         OS_LIBS += [ '$(call EXPAND_LIBNAME,kvm)' ]
+         DEFINES.update({
+--- mozilla-esr31/ipc/chromium/moz.build.orig	2015-06-04 17:42:51.765444586 -0700
++++ mozilla-esr31/ipc/chromium/moz.build	2015-06-04 17:42:52.023499565 -0700
[email protected]@ -230,17 +230,25 @@
+             'moc_message_pump_qt.cc',
+         ]
+     if not CONFIG['MOZ_NATIVE_LIBEVENT']:
+-        if CONFIG['OS_TARGET'] != 'Android':
++        if CONFIG['OS_TARGET'] != 'SunOS':
++            if CONFIG['OS_TARGET'] != 'Android':
++                SOURCES += [
++                    'src/third_party/libevent/epoll_sub.c',
++                ]
+             SOURCES += [
+-                'src/third_party/libevent/epoll_sub.c',
++                'src/third_party/libevent/epoll.c',
+             ]
+-        SOURCES += [
+-            'src/third_party/libevent/epoll.c',
+-        ]
+         if CONFIG['OS_TARGET'] == 'Android':
+             LOCAL_INCLUDES += ['src/third_party/libevent/android']
+         else:
+-            LOCAL_INCLUDES += ['src/third_party/libevent/linux']
++            if CONFIG['OS_TARGET'] != 'SunOS':
++                LOCAL_INCLUDES += ['src/third_party/libevent/linux']
++            else:
++                LOCAL_INCLUDES += ['src/third_party/libevent/solaris']
++                SOURCES += [
++                    'src/third_party/libevent/devpoll.c',
++                    'src/third_party/libevent/evport.c',
++                ]
+ 
+ if os_bsd:
+     SOURCES += [
+--- mozilla-esr31/ipc/chromium/src/base/atomicops_internals_x86_gcc.cc.orig	2015-06-04 17:42:51.779492901 -0700
++++ mozilla-esr31/ipc/chromium/src/base/atomicops_internals_x86_gcc.cc	2015-06-04 17:42:52.023724795 -0700
[email protected]@ -19,13 +19,13 @@
+ // Inline cpuid instruction.  In PIC compilations, %ebx contains the address
+ // of the global offset table.  To avoid breaking such executables, this code
+ // must preserve that register's value across cpuid instructions.
+-#if defined(__i386__)
++#if defined(__i386__) || defined (__i386)
+ #define cpuid(a, b, c, d, inp) \
+   asm ("mov %%ebx, %%edi\n"    \
+        "cpuid\n"               \
+        "xchg %%edi, %%ebx\n"   \
+        : "=a" (a), "=D" (b), "=c" (c), "=d" (d) : "a" (inp))
+-#elif defined (__x86_64__)
++#elif defined (__x86_64__) || defined(__x86_64)
+ #define cpuid(a, b, c, d, inp) \
+   asm ("mov %%rbx, %%rdi\n"    \
+        "cpuid\n"               \
+--- mozilla-esr31/ipc/chromium/src/base/atomicops_internals_x86_gcc.h.orig	2015-06-04 17:42:51.785051435 -0700
++++ mozilla-esr31/ipc/chromium/src/base/atomicops_internals_x86_gcc.h	2015-06-04 17:42:52.023927132 -0700
[email protected]@ -29,18 +29,18 @@
+                                          Atomic32 old_value,
+                                          Atomic32 new_value) {
+   Atomic32 prev;
+-  __asm__ __volatile__("lock; cmpxchgl %1,%2"
++  __asm__ __volatile__("lock; cmpxchgl %1,(%2)"
+                        : "=a" (prev)
+-                       : "q" (new_value), "m" (*ptr), "0" (old_value)
++                       : "q" (new_value), "r" (ptr), "0" (old_value)
+                        : "memory");
+   return prev;
+ }
+ 
+ inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
+                                          Atomic32 new_value) {
+-  __asm__ __volatile__("xchgl %1,%0"  // The lock prefix is implicit for xchg.
++  __asm__ __volatile__("xchgl (%1),%0"  // The lock prefix is implicit for xchg.
+                        : "=r" (new_value)
+-                       : "m" (*ptr), "0" (new_value)
++                       : "r" (ptr), "0" (new_value)
+                        : "memory");
+   return new_value;  // Now it's the previous value.
+ }
[email protected]@ -48,8 +48,8 @@
+ inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
+                                           Atomic32 increment) {
+   Atomic32 temp = increment;
+-  __asm__ __volatile__("lock; xaddl %0,%1"
+-                       : "+r" (temp), "+m" (*ptr)
++  __asm__ __volatile__("lock; xaddl %0,(%1)"
++                       : "+r" (temp), "+r" (ptr)
+                        : : "memory");
+   // temp now holds the old value of *ptr
+   return temp + increment;
[email protected]@ -58,8 +58,8 @@
+ inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
+                                         Atomic32 increment) {
+   Atomic32 temp = increment;
+-  __asm__ __volatile__("lock; xaddl %0,%1"
+-                       : "+r" (temp), "+m" (*ptr)
++  __asm__ __volatile__("lock; xaddl %0,(%1)"
++                       : "+r" (temp), "+r" (ptr)
+                        : : "memory");
+   // temp now holds the old value of *ptr
+   if (AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug) {
[email protected]@ -153,18 +153,18 @@
+                                          Atomic64 old_value,
+                                          Atomic64 new_value) {
+   Atomic64 prev;
+-  __asm__ __volatile__("lock; cmpxchgq %1,%2"
++  __asm__ __volatile__("lock; cmpxchgq %1,(%2)"
+                        : "=a" (prev)
+-                       : "q" (new_value), "m" (*ptr), "0" (old_value)
++                       : "q" (new_value), "r" (ptr), "0" (old_value)
+                        : "memory");
+   return prev;
+ }
+ 
+ inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr,
+                                          Atomic64 new_value) {
+-  __asm__ __volatile__("xchgq %1,%0"  // The lock prefix is implicit for xchg.
++  __asm__ __volatile__("xchgq (%1),%0"  // The lock prefix is implicit for xchg.
+                        : "=r" (new_value)
+-                       : "m" (*ptr), "0" (new_value)
++                       : "r" (ptr), "0" (new_value)
+                        : "memory");
+   return new_value;  // Now it's the previous value.
+ }
[email protected]@ -172,8 +172,8 @@
+ inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr,
+                                           Atomic64 increment) {
+   Atomic64 temp = increment;
+-  __asm__ __volatile__("lock; xaddq %0,%1"
+-                       : "+r" (temp), "+m" (*ptr)
++  __asm__ __volatile__("lock; xaddq %0,(%1)"
++                       : "+r" (temp), "+r" (ptr)
+                        : : "memory");
+   // temp now contains the previous value of *ptr
+   return temp + increment;
[email protected]@ -182,8 +182,8 @@
+ inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr,
+                                         Atomic64 increment) {
+   Atomic64 temp = increment;
+-  __asm__ __volatile__("lock; xaddq %0,%1"
+-                       : "+r" (temp), "+m" (*ptr)
++  __asm__ __volatile__("lock; xaddq %0,(%1)"
++                       : "+r" (temp), "+r" (ptr)
+                        : : "memory");
+   // temp now contains the previous value of *ptr
+   if (AtomicOps_Internalx86CPUFeatures.has_amd_lock_mb_bug) {
+--- mozilla-esr31/ipc/chromium/src/base/base_paths.h.orig	2015-06-04 17:42:51.790740170 -0700
++++ mozilla-esr31/ipc/chromium/src/base/base_paths.h	2015-06-04 17:42:52.024028774 -0700
[email protected]@ -13,7 +13,7 @@
+ #include "base/base_paths_win.h"
+ #elif defined(OS_MACOSX)
+ #include "base/base_paths_mac.h"
+-#elif defined(OS_LINUX) || defined(OS_BSD)
++#elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+ #include "base/base_paths_linux.h"
+ #endif
+ #include "base/path_service.h"
+--- mozilla-esr31/ipc/chromium/src/base/base_paths_linux.cc.orig	2015-06-04 17:42:51.796070387 -0700
++++ mozilla-esr31/ipc/chromium/src/base/base_paths_linux.cc	2015-06-04 17:42:52.024134065 -0700
[email protected]@ -21,11 +21,19 @@
+     case base::FILE_EXE:
+     case base::FILE_MODULE: { // TODO(evanm): is this correct?
+       char bin_dir[PATH_MAX + 1];
++#ifdef OS_SOLARIS
++      if (!(realpath(getexecname(), bin_dir) && bin_dir[0] != '[')) {
++        NOTREACHED() << "Unable to get exec name.";
++        return false;
++      }
++      int bin_dir_size = strlen(bin_dir);
++#else
+       int bin_dir_size = readlink("/proc/self/exe", bin_dir, PATH_MAX);
+       if (bin_dir_size < 0 || bin_dir_size > PATH_MAX) {
+         NOTREACHED() << "Unable to resolve /proc/self/exe.";
+         return false;
+       }
++#endif      
+       bin_dir[bin_dir_size] = 0;
+       *result = FilePath(bin_dir);
+       return true;
+--- mozilla-esr31/ipc/chromium/src/base/debug_util_posix.cc.orig	2015-06-04 17:42:51.806726871 -0700
++++ mozilla-esr31/ipc/chromium/src/base/debug_util_posix.cc	2015-06-04 17:42:52.024415350 -0700
[email protected]@ -110,7 +110,7 @@
+   return being_debugged;
+ }
+ 
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_SOLARIS)
+ 
+ // We can look in /proc/self/status for TracerPid.  We are likely used in crash
+ // handling, so we are careful not to use the heap or have side effects.
[email protected]@ -145,7 +145,7 @@
+   return pid_index < status.size() && status[pid_index] != '0';
+ }
+ 
+-#endif  // OS_LINUX
++#endif  // OS_LINUX || OS_SOLARIS
+ 
+ // static
+ void DebugUtil::BreakDebugger() {
+--- mozilla-esr31/ipc/chromium/src/base/file_util.cc.orig	2015-06-04 17:42:51.817383612 -0700
++++ mozilla-esr31/ipc/chromium/src/base/file_util.cc	2015-06-04 17:42:52.024645830 -0700
[email protected]@ -245,4 +245,25 @@
+ int WriteFile(const std::wstring& filename, const char* data, int size) {
+   return WriteFile(FilePath::FromWStringHack(filename), data, size);
+ }
++
++#ifdef OS_SOLARIS
++
++bool IsDot(const FilePath& path) {
++  return FILE_PATH_LITERAL(".") == path.BaseName().value();
++}
++
++bool IsDotDot(const FilePath& path) {
++  return FILE_PATH_LITERAL("..") == path.BaseName().value();
++}
++
++///////////////////////////////////////////////
++// FileEnumerator
++//
++// Note: the main logic is in file_util_<platform>.cc
++
++bool FileEnumerator::ShouldSkip(const FilePath& path) {
++  FilePath::StringType basename = path.BaseName().value();
++  return IsDot(path) || (IsDotDot(path) && !(INCLUDE_DOT_DOT & file_type_));
++}
++#endif
+ }  // namespace
+--- mozilla-esr31/ipc/chromium/src/base/file_util.h.orig	2015-06-04 17:42:51.822731946 -0700
++++ mozilla-esr31/ipc/chromium/src/base/file_util.h	2015-06-04 17:42:52.024795816 -0700
[email protected]@ -12,7 +12,7 @@
+ 
+ #if defined(OS_WIN)
+ #include <windows.h>
+-#elif defined(ANDROID)
++#elif defined(ANDROID) || defined(OS_SOLARIS)
+ #include <sys/stat.h>
+ #elif defined(OS_POSIX) 
+ #include <sys/types.h>
[email protected]@ -241,6 +241,103 @@
+ // Deprecated temporary compatibility function.
+ bool SetCurrentDirectory(const std::wstring& current_directory);
+ 
++#ifdef OS_SOLARIS
++// A class for enumerating the files in a provided path. The order of the
++// results is not guaranteed.
++//
++// DO NOT USE FROM THE MAIN THREAD of your application unless it is a test
++// program where latency does not matter. This class is blocking.
++class FileEnumerator {
++ public:
++  typedef struct {
++    struct stat stat;
++    std::string filename;
++  } FindInfo;
++
++  enum FILE_TYPE {
++    FILES                 = 1 << 0,
++    DIRECTORIES           = 1 << 1,
++    INCLUDE_DOT_DOT       = 1 << 2,
++    SHOW_SYM_LINKS        = 1 << 4,
++  };
++
++  // |root_path| is the starting directory to search for. It may or may not end
++  // in a slash.
++  //  
++  // If |recursive| is true, this will enumerate all matches in any
++  // subdirectories matched as well. It does a breadth-first search, so all
++  // files in one directory will be returned before any files in a
++  // subdirectory.
++  //
++  // |file_type| specifies whether the enumerator should match files,
++  // directories, or both.
++  //
++  // |pattern| is an optional pattern for which files to match. This
++  // works like shell globbing. For example, "*.txt" or "Foo???.doc".
++  // However, be careful in specifying patterns that aren't cross platform
++  // since the underlying code uses OS-specific matching routines.  In general,
++  // Windows matching is less featureful than others, so test there first.
++  // If unspecified, this will match all files.
++  // NOTE: the pattern only matches the contents of root_path, not files in
++  // recursive subdirectories.
++  // TODO(erikkay): Fix the pattern matching to work at all levels.
++  FileEnumerator(const FilePath& root_path,
++                 bool recursive,
++                 FileEnumerator::FILE_TYPE file_type);
++  FileEnumerator(const FilePath& root_path,
++                 bool recursive,
++                 FileEnumerator::FILE_TYPE file_type,
++                 const FilePath::StringType& pattern);
++  ~FileEnumerator();
++
++  // Returns an empty string if there are no more results.
++  FilePath Next();
++
++  // Write the file info into |info|.
++  void GetFindInfo(FindInfo* info);
++
++  // Looks inside a FindInfo and determines if it's a directory.
++  static bool IsDirectory(const FindInfo& info);
++
++  static FilePath GetFilename(const FindInfo& find_info);
++
++ private:
++  // Returns true if the given path should be skipped in enumeration.
++  bool ShouldSkip(const FilePath& path);
++
++
++  typedef struct {
++    FilePath filename;
++    struct stat stat;
++  } DirectoryEntryInfo;
++
++  // Read the filenames in source into the vector of DirectoryEntryInfo's
++  static bool ReadDirectory(std::vector<DirectoryEntryInfo>* entries,
++                            const FilePath& source, bool show_links);
++
++  // The files in the current directory
++  std::vector<DirectoryEntryInfo> directory_entries_;
++
++  // The next entry to use from the directory_entries_ vector
++  size_t current_directory_entry_;
++
++  FilePath root_path_;
++  bool recursive_;
++  FILE_TYPE file_type_;
++  FilePath::StringType pattern_;  // Empty when we want to find everything.
++
++  // Set to true when there is a find operation open. This way, we can lazily
++  // start the operations when the caller calls Next().
++  bool is_in_find_op_;
++
++  // A stack that keeps track of which subdirectories we still need to
++  // enumerate in the breadth-first search.
++  std::stack<FilePath> pending_paths_;
++
++  DISALLOW_COPY_AND_ASSIGN(FileEnumerator);
++};
++#endif
++
+ }  // namespace file_util
+ 
+ #endif  // BASE_FILE_UTIL_H_
+--- mozilla-esr31/ipc/chromium/src/base/file_util_posix.cc.orig	2015-06-04 17:42:51.828082851 -0700
++++ mozilla-esr31/ipc/chromium/src/base/file_util_posix.cc	2015-06-04 17:42:52.025067753 -0700
[email protected]@ -8,7 +8,7 @@
+ #include <errno.h>
+ #include <fcntl.h>
+ #include <fnmatch.h>
+-#ifndef ANDROID
++#if !defined(ANDROID) && !defined(OS_SOLARIS)
+ #include <fts.h>
+ #endif
+ #include <libgen.h>
[email protected]@ -67,9 +67,34 @@
+   if (!recursive)
+     return (rmdir(path_str) == 0);
+ 
+-#ifdef ANDROID
++#if defined(ANDROID)
+   // XXX Need ftsless impl for bionic
+   return false;
++#elif defined(OS_SOLARIS)
++  bool success = true;
++  std::stack<std::string> directories;
++  directories.push(path.value());
++  FileEnumerator traversal(path, true, static_cast<FileEnumerator::FILE_TYPE>(
++        FileEnumerator::FILES | FileEnumerator::DIRECTORIES |
++        FileEnumerator::SHOW_SYM_LINKS));
++  for (FilePath current = traversal.Next(); success && !current.empty();
++       current = traversal.Next()) {
++    FileEnumerator::FindInfo info;
++    traversal.GetFindInfo(&info);
++
++    if (S_ISDIR(info.stat.st_mode))
++      directories.push(current.value());
++    else
++      success = (unlink(current.value().c_str()) == 0);
++  }
++
++  while (success && !directories.empty()) {
++    FilePath dir = FilePath(directories.top());
++    directories.pop();
++    success = (rmdir(dir.value().c_str()) == 0);
++  }
++
++  return success; 
+ #else
+   bool success = true;
+   int ftsflags = FTS_PHYSICAL | FTS_NOSTAT;
[email protected]@ -140,14 +165,98 @@
+     return false;
+   }
+ 
+-#ifdef ANDROID
++#if defined(ANDROID)
+   // XXX Need ftsless impl for bionic
+   return false;
++#elif defined(OS_SOLARIS)
++  // This function does not properly handle destinations within the source
++  FilePath real_to_path = to_path;
++  if (PathExists(real_to_path)) {
++    if (!AbsolutePath(&real_to_path))
++      return false;
++  } else {
++    real_to_path = real_to_path.DirName();
++    if (!AbsolutePath(&real_to_path))
++      return false;
++  }
++  FilePath real_from_path = from_path;
++  if (!AbsolutePath(&real_from_path))
++    return false;
++  if (real_to_path.value().size() >= real_from_path.value().size() &&
++      real_to_path.value().compare(0, real_from_path.value().size(),
++      real_from_path.value()) == 0)
++    return false;
++
++  bool success = true;
++  FileEnumerator::FILE_TYPE traverse_type =
++      static_cast<FileEnumerator::FILE_TYPE>(FileEnumerator::FILES |
++      FileEnumerator::SHOW_SYM_LINKS);
++  if (recursive)
++    traverse_type = static_cast<FileEnumerator::FILE_TYPE>(
++        traverse_type | FileEnumerator::DIRECTORIES);
++  FileEnumerator traversal(from_path, recursive, traverse_type);
++
++  // We have to mimic windows behavior here. |to_path| may not exist yet,
++  // start the loop with |to_path|.
++  FileEnumerator::FindInfo info;
++  FilePath current = from_path;
++  if (stat(from_path.value().c_str(), &info.stat) < 0) {
++    CHROMIUM_LOG(ERROR) << "CopyDirectory() couldn't stat source directory: " <<
++        from_path.value() << " errno = " << errno;
++    success = false;
++  }
++  struct stat to_path_stat;
++  FilePath from_path_base = from_path;
++  if (recursive && stat(to_path.value().c_str(), &to_path_stat) == 0 &&
++      S_ISDIR(to_path_stat.st_mode)) {
++    // If the destination already exists and is a directory, then the
++    // top level of source needs to be copied.
++    from_path_base = from_path.DirName();
++  }
++
++  // The Windows version of this function assumes that non-recursive calls
++  // will always have a directory for from_path.
++  DCHECK(recursive || S_ISDIR(info.stat.st_mode));
++
++  while (success && !current.empty()) {
++    // current is the source path, including from_path, so paste
++    // the suffix after from_path onto to_path to create the target_path.
++    std::string suffix(&current.value().c_str()[from_path_base.value().size()]);
++    // Strip the leading '/' (if any).
++    if (!suffix.empty()) {
++      DCHECK_EQ('/', suffix[0]);
++      suffix.erase(0, 1);
++    }
++    const FilePath target_path = to_path.Append(suffix);
++
++    if (S_ISDIR(info.stat.st_mode)) {
++      if (mkdir(target_path.value().c_str(), info.stat.st_mode & 01777) != 0 &&
++          errno != EEXIST) {
++        CHROMIUM_LOG(ERROR) << "CopyDirectory() couldn't create directory: " <<
++            target_path.value() << " errno = " << errno;
++        success = false;
++      }
++    } else if (S_ISREG(info.stat.st_mode)) {
++      if (!CopyFile(current, target_path)) {
++        CHROMIUM_LOG(ERROR) << "CopyDirectory() couldn't create file: " <<
++            target_path.value();
++        success = false;
++      }
++    } else {
++      CHROMIUM_LOG(WARNING) << "CopyDirectory() skipping non-regular file: " <<
++          current.value();
++    }
++
++    current = traversal.Next();
++    traversal.GetFindInfo(&info);
++  }
++
++  return success;
+ #else
+   char* dir_list[] = { top_dir, NULL };
+   FTS* fts = fts_open(dir_list, FTS_PHYSICAL | FTS_NOSTAT, NULL);
+   if (!fts) {
+-    CHROMIUM_LOG(ERROR) << "fts_open failed: " << strerror(errno);
++    CHROMIUM_CHROMIUM_LOG(ERROR) << "fts_open failed: " << strerror(errno);
+     return false;
+   }
+ 
[email protected]@ -203,11 +312,11 @@
+         break;
+       case FTS_SL:      // Symlink.
+       case FTS_SLNONE:  // Symlink with broken target.
+-        CHROMIUM_LOG(WARNING) << "CopyDirectory() skipping symbolic link: " <<
++        CHROMIUM_CHROMIUM_LOG(WARNING) << "CopyDirectory() skipping symbolic link: " <<
+             ent->fts_path;
+         continue;
+       case FTS_DEFAULT:  // Some other sort of file.
+-        CHROMIUM_LOG(WARNING) << "CopyDirectory() skipping file of unknown type: " <<
++        CHROMIUM_CHROMIUM_LOG(WARNING) << "CopyDirectory() skipping file of unknown type: " <<
+             ent->fts_path;
+         continue;
+       default:
[email protected]@ -227,7 +336,7 @@
+   }
+ 
+   if (error) {
+-    CHROMIUM_LOG(ERROR) << "CopyDirectory(): " << strerror(error);
++    CHROMIUM_CHROMIUM_LOG(ERROR) << "CopyDirectory(): " << strerror(error);
+     return false;
+   }
+   return true;
[email protected]@ -446,7 +555,7 @@
+ }
+ 
+ bool GetShmemTempDir(FilePath* path) {
+-#if defined(OS_LINUX) && !defined(ANDROID)
++#if defined(OS_LINUX) && !defined(ANDROID) && !defined(OS_SOLARIS)
+   *path = FilePath("/dev/shm");
+   return true;
+ #else
[email protected]@ -501,4 +610,144 @@
+ }
+ #endif // !defined(OS_MACOSX)
+ 
++#ifdef OS_SOLARIS
++///////////////////////////////////////////////
++// FileEnumerator
++
++FileEnumerator::FileEnumerator(const FilePath& root_path,
++                               bool recursive,
++                               FileEnumerator::FILE_TYPE file_type)
++    : current_directory_entry_(0),
++      root_path_(root_path),
++      recursive_(recursive),
++      file_type_(file_type),
++      is_in_find_op_(false) {
++  // INCLUDE_DOT_DOT must not be specified if recursive.
++  DCHECK(!(recursive && (INCLUDE_DOT_DOT & file_type_)));
++  pending_paths_.push(root_path);
++}
++
++FileEnumerator::FileEnumerator(const FilePath& root_path,
++                               bool recursive,
++                               FileEnumerator::FILE_TYPE file_type,
++                               const FilePath::StringType& pattern)
++    : current_directory_entry_(0),
++      root_path_(root_path),
++      recursive_(recursive),
++      file_type_(file_type),
++      pattern_(root_path.Append(pattern).value()),
++      is_in_find_op_(false) {
++  // INCLUDE_DOT_DOT must not be specified if recursive.
++  DCHECK(!(recursive && (INCLUDE_DOT_DOT & file_type_)));
++  // The Windows version of this code appends the pattern to the root_path,
++  // potentially only matching against items in the top-most directory.
++  // Do the same here.
++  if (pattern.size() == 0)
++    pattern_ = FilePath::StringType();
++  pending_paths_.push(root_path);
++}
++
++FileEnumerator::~FileEnumerator() {
++}
++
++void FileEnumerator::GetFindInfo(FindInfo* info) {
++  DCHECK(info);
++
++  if (current_directory_entry_ >= directory_entries_.size())
++    return;
++
++  DirectoryEntryInfo* cur_entry = &directory_entries_[current_directory_entry_];
++  memcpy(&(info->stat), &(cur_entry->stat), sizeof(info->stat));
++  info->filename.assign(cur_entry->filename.value());
++}
++
++bool FileEnumerator::IsDirectory(const FindInfo& info) {
++  return S_ISDIR(info.stat.st_mode);
++}
++
++// static
++FilePath FileEnumerator::GetFilename(const FindInfo& find_info) {
++  return FilePath(find_info.filename);
++}
++
++FilePath FileEnumerator::Next() {
++  ++current_directory_entry_;
++
++  // While we've exhausted the entries in the current directory, do the next
++  while (current_directory_entry_ >= directory_entries_.size()) {
++    if (pending_paths_.empty())
++      return FilePath();
++
++    root_path_ = pending_paths_.top();
++    root_path_ = root_path_.StripTrailingSeparators();
++    pending_paths_.pop();
++
++    std::vector<DirectoryEntryInfo> entries;
++    if (!ReadDirectory(&entries, root_path_, file_type_ & SHOW_SYM_LINKS))
++      continue;
++
++    directory_entries_.clear();
++    current_directory_entry_ = 0;
++    for (std::vector<DirectoryEntryInfo>::const_iterator
++        i = entries.begin(); i != entries.end(); ++i) {
++      FilePath full_path = root_path_.Append(i->filename);
++      if (ShouldSkip(full_path))
++        continue;
++
++      if (pattern_.size() &&
++          fnmatch(pattern_.c_str(), full_path.value().c_str(), FNM_NOESCAPE))
++        continue;
++
++      if (recursive_ && S_ISDIR(i->stat.st_mode))
++        pending_paths_.push(full_path);
++
++      if ((S_ISDIR(i->stat.st_mode) && (file_type_ & DIRECTORIES)) ||
++          (!S_ISDIR(i->stat.st_mode) && (file_type_ & FILES)))
++        directory_entries_.push_back(*i);
++    }
++  }
++
++  return root_path_.Append(directory_entries_[current_directory_entry_
++      ].filename);
++}
++
++bool FileEnumerator::ReadDirectory(std::vector<DirectoryEntryInfo>* entries,
++                                   const FilePath& source, bool show_links) {
++
++  DIR* dir = opendir(source.value().c_str());
++  if (!dir)
++    return false;
++  struct {
++          dirent dent_buffer;
++          char chars[MAXNAMLEN];
++  } dent_buf;
++  struct dirent* dent;
++
++  while (readdir_r(dir, (dirent *)&dent_buf, &dent) == 0 && dent) {
++    DirectoryEntryInfo info;
++    info.filename = FilePath(dent->d_name);
++
++    FilePath full_name = source.Append(dent->d_name);
++    int ret;
++    if (show_links)
++      ret = lstat(full_name.value().c_str(), &info.stat);
++    else
++      ret = stat(full_name.value().c_str(), &info.stat);
++    if (ret < 0) {
++      // Print the stat() error message unless it was ENOENT and we're
++      // following symlinks.
++      if (!(errno == ENOENT && !show_links)) {
++        CHROMIUM_LOG(ERROR) << "Couldn't stat "
++                   << source.Append(dent->d_name).value();
++      }
++      memset(&info.stat, 0, sizeof(info.stat));
++    }
++    entries->push_back(info);
++  }
++
++  closedir(dir);
++  return true;
++}
++#endif
++
+ } // namespace file_util
+--- mozilla-esr31/ipc/chromium/src/base/idle_timer.cc.orig	2015-06-04 17:42:51.839092878 -0700
++++ mozilla-esr31/ipc/chromium/src/base/idle_timer.cc	2015-06-04 17:42:52.025292118 -0700
[email protected]@ -7,13 +7,13 @@
+ // We may not want to port idle_timer to Linux, but we have implemented it
+ // anyway.  Define this to 1 to enable the Linux idle timer and then add the
+ // libs that need to be linked (Xss).
+-#define ENABLE_XSS_SUPPORT 0
++#define ENABLE_XSS_SUPPORT 1
+ 
+ #if defined(OS_MACOSX)
+ #include <ApplicationServices/ApplicationServices.h>
+ #endif
+ 
+-#if defined(OS_LINUX) && ENABLE_XSS_SUPPORT
++#if (defined(OS_LINUX) || defined(OS_SOLARIS)) && ENABLE_XSS_SUPPORT
+ // We may not want to port idle_timer to Linux, but we have implemented it
+ // anyway.  Remove the 0 above if we want it.
+ #include <gdk/gdkx.h>
[email protected]@ -54,7 +54,7 @@
+           kCGAnyInputEventType) * 1000.0;
+   return true;
+ }
+-#elif defined(OS_LINUX) && ENABLE_XSS_SUPPORT
++#elif (defined(OS_LINUX) || defined(OS_SOLARIS)) && ENABLE_XSS_SUPPORT
+ class IdleState {
+  public:
+   IdleState() {
+--- mozilla-esr31/ipc/chromium/src/base/message_loop.cc.orig	2015-06-04 17:42:51.844404204 -0700
++++ mozilla-esr31/ipc/chromium/src/base/message_loop.cc	2015-06-04 17:42:52.025433046 -0700
[email protected]@ -20,7 +20,7 @@
+ #if defined(OS_POSIX)
+ #include "base/message_pump_libevent.h"
+ #endif
+-#if defined(OS_LINUX) || defined(OS_BSD)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+ #if defined(MOZ_WIDGET_GTK)
+ #include "base/message_pump_glib.h"
+ #endif
[email protected]@ -140,9 +140,9 @@
+   if (type_ == TYPE_UI) {
+ #if defined(OS_MACOSX)
+     pump_ = base::MessagePumpMac::Create();
+-#elif defined(OS_LINUX) || defined(OS_BSD)
++#elif defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+     pump_ = new base::MessagePumpForUI();
+-#endif  // OS_LINUX
++#endif  // OS_LINUX || OS_SOLARIS
+   } else if (type_ == TYPE_IO) {
+     pump_ = new base::MessagePumpLibevent();
+   } else {
+--- mozilla-esr31/ipc/chromium/src/base/message_pump_glib.cc.orig	2015-06-04 17:42:51.849699822 -0700
++++ mozilla-esr31/ipc/chromium/src/base/message_pump_glib.cc	2015-06-04 17:42:52.025576630 -0700
[email protected]@ -131,6 +131,12 @@
+   // Create our wakeup pipe, which is used to flag when work was scheduled.
+   int fds[2];
+   CHECK(pipe(fds) == 0);
++
++  int flags = fcntl(fds[0], F_GETFL, 0);
++  if (flags == -1)
++    flags = 0;
++  fcntl(fds[0], F_SETFL, flags | O_NDELAY);
++
+   wakeup_pipe_read_  = fds[0];
+   wakeup_pipe_write_ = fds[1];
+   wakeup_gpollfd_->fd = wakeup_pipe_read_;
[email protected]@ -237,10 +243,9 @@
+   // are only signaled when the queue went from empty to non-empty.  The glib
+   // poll will tell us whether there was data, so this read shouldn't block.
+   if (wakeup_gpollfd_->revents & G_IO_IN) {
+-    char msg;
+-    if (HANDLE_EINTR(read(wakeup_pipe_read_, &msg, 1)) != 1 || msg != '!') {
+-      NOTREACHED() << "Error reading from the wakeup pipe.";
+-    }
++    char buf[32];
++    while (HANDLE_EINTR(read(wakeup_pipe_read_, &buf, 32)));
++
+     // Since we ate the message, we need to record that we have more work,
+     // because HandleCheck() may be called without HandleDispatch being called
+     // afterwards.
[email protected]@ -304,6 +309,9 @@
+   // variables as we would then need locks all over.  This ensures that if
+   // we are sleeping in a poll that we will wake up.
+   char msg = '!';
++  char buf[32];
++  while (HANDLE_EINTR(read(wakeup_pipe_read_, &buf, 32)));
++
+   if (HANDLE_EINTR(write(wakeup_pipe_write_, &msg, 1)) != 1) {
+     NOTREACHED() << "Could not write to the UI message loop wakeup pipe!";
+   }
+--- mozilla-esr31/ipc/chromium/src/base/message_pump_libevent.cc.orig	2015-06-04 17:42:51.855133081 -0700
++++ mozilla-esr31/ipc/chromium/src/base/message_pump_libevent.cc	2015-06-04 17:42:52.025700484 -0700
[email protected]@ -6,6 +6,10 @@
+ 
+ #include <errno.h>
+ #include <fcntl.h>
++#if defined(OS_SOLARIS)
++#include <unistd.h>
++#include <sys/stat.h>
++#endif
+ #if defined(ANDROID) || defined(OS_POSIX)
+ #include <unistd.h>
+ #endif
+--- mozilla-esr31/ipc/chromium/src/base/observer_list.h.orig	2015-06-04 17:42:51.860470602 -0700
++++ mozilla-esr31/ipc/chromium/src/base/observer_list.h	2015-06-04 17:42:52.025805253 -0700
[email protected]@ -88,7 +88,7 @@
+ 
+   // Add an observer to the list.
+   void AddObserver(ObserverType* obs) {
+-    DCHECK(find(observers_.begin(), observers_.end(), obs) == observers_.end())
++    DCHECK(std::find(observers_.begin(), observers_.end(), obs) == observers_.end())
+         << "Observers can only be added once!";
+     observers_.push_back(obs);
+   }
+--- mozilla-esr31/ipc/chromium/src/base/path_service.cc.orig	2015-06-04 17:42:51.865762507 -0700
++++ mozilla-esr31/ipc/chromium/src/base/path_service.cc	2015-06-04 17:42:52.025978038 -0700
[email protected]@ -24,7 +24,7 @@
+   bool PathProviderWin(int key, FilePath* result);
+ #elif defined(OS_MACOSX)
+   bool PathProviderMac(int key, FilePath* result);
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_SOLARIS)
+   bool PathProviderLinux(int key, FilePath* result);
+ #endif
+ }
[email protected]@ -80,7 +80,7 @@
+ };
+ #endif
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_SOLARIS)
+ static Provider base_provider_linux = {
+   base::PathProviderLinux,
+   &base_provider,
[email protected]@ -92,6 +92,17 @@
+ };
+ #endif
+ 
++#if 0//defined(OS_SOLARIS)
++static Provider base_provider_posix = {
++  base::PathProviderPosix,
++  &base_provider,
++#ifndef NDEBUG
++  0,
++  0,
++#endif
++  true
++};
++#endif
+ 
+ struct PathData {
+   Lock      lock;
[email protected]@ -104,7 +115,7 @@
+     providers = &base_provider_win;
+ #elif defined(OS_MACOSX)
+     providers = &base_provider_mac;
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_SOLARIS)
+     providers = &base_provider_linux;
+ #endif
+   }
[email protected]@ -206,6 +217,24 @@
+   return path_data->overrides.find(key) != path_data->overrides.end();
+ }
+ 
++#ifdef OS_SOLARIS
++bool PathService::Override(int key, const FilePath& path) {
++  PathData* path_data = GetPathData();
++  DCHECK(path_data);
++  DCHECK(key > base::DIR_CURRENT) << "invalid path key";
++
++  FilePath file_path = path;
++
++  // make sure the directory exists:
++  if (!file_util::CreateDirectory(file_path))
++    return false;
++
++  AutoLock scoped_lock(path_data->lock);
++  path_data->cache[key] = file_path;
++  path_data->overrides.insert(key);
++  return true;
++}
++#else
+ bool PathService::Override(int key, const std::wstring& path) {
+   PathData* path_data = GetPathData();
+   DCHECK(path_data);
[email protected]@ -231,8 +260,13 @@
+   path_data->overrides.insert(key);
+   return true;
+ }
++#endif
+ 
++#ifdef OS_SOLARIS
++bool PathService::SetCurrentDirectory(const FilePath& current_directory) {
++#else
+ bool PathService::SetCurrentDirectory(const std::wstring& current_directory) {
++#endif
+   return file_util::SetCurrentDirectory(current_directory);
+ }
+ 
+--- mozilla-esr31/ipc/chromium/src/base/path_service.h.orig	2015-06-04 17:42:51.871131068 -0700
++++ mozilla-esr31/ipc/chromium/src/base/path_service.h	2015-06-04 17:42:52.026081564 -0700
[email protected]@ -48,13 +48,21 @@
+   //
+   // WARNING: Consumers of PathService::Get may expect paths to be constant
+   // over the lifetime of the app, so this method should be used with caution.
++#ifdef OS_SOLARIS  
++  static bool Override(int key, const FilePath& path);
++#else
+   static bool Override(int key, const std::wstring& path);
++#endif
+ 
+   // Return whether a path was overridden.
+   static bool IsOverridden(int key);
+ 
+   // Sets the current directory.
++#ifdef OS_SOLARIS  
++  static bool SetCurrentDirectory(const FilePath& current_directory);
++#else  
+   static bool SetCurrentDirectory(const std::wstring& current_directory);
++#endif
+ 
+   // To extend the set of supported keys, you can register a path provider,
+   // which is just a function mirroring PathService::Get.  The ProviderFunc
+--- mozilla-esr31/ipc/chromium/src/base/platform_thread.h.orig	2015-06-04 17:42:51.876432809 -0700
++++ mozilla-esr31/ipc/chromium/src/base/platform_thread.h	2015-06-04 17:42:52.026181532 -0700
[email protected]@ -22,7 +22,7 @@
+ #elif defined(OS_POSIX)
+ #include <pthread.h>
+ typedef pthread_t PlatformThreadHandle;
+-#if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(__GLIBC__)
++#if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(__GLIBC__)
+ #include <unistd.h>
+ typedef pid_t PlatformThreadId;
+ #elif defined(OS_BSD)
+--- mozilla-esr31/ipc/chromium/src/base/platform_thread_posix.cc.orig	2015-06-04 17:42:51.881741384 -0700
++++ mozilla-esr31/ipc/chromium/src/base/platform_thread_posix.cc	2015-06-04 17:42:52.026320376 -0700
[email protected]@ -27,6 +27,12 @@
+ #include <pthread_np.h>
+ #endif
+ 
++#if defined(OS_SOLARIS)
++#include <sys/syscall.h>
++#include <unistd.h>
++#include <thread.h>
++#endif
++
+ #if defined(OS_MACOSX)
+ namespace base {
+ void InitThreading();
[email protected]@ -54,6 +60,8 @@
+ #else
+   return syscall(__NR_gettid);
+ #endif
++#elif defined(OS_SOLARIS)
++  return thr_self();
+ #elif defined(OS_OPENBSD) || defined(__GLIBC__)
+   return (intptr_t) (pthread_self());
+ #elif defined(OS_NETBSD)
[email protected]@ -96,6 +104,7 @@
+ 
+ // static
+ void PlatformThread::SetName(const char* name) {
++#ifndef OS_SOLARIS
+   // On linux we can get the thread names to show up in the debugger by setting
+   // the process name for the LWP.  We don't want to do this for the main
+   // thread because that would rename the process, causing tools like killall
[email protected]@ -116,6 +125,7 @@
+   pthread_set_name_np(pthread_self(), name);
+ #else
+ #endif
++#endif // !OS_SOLARIS
+ }
+ #endif // !OS_MACOSX
+ 
+--- mozilla-esr31/ipc/chromium/src/base/port.h.orig	2015-06-04 17:42:51.887028405 -0700
++++ mozilla-esr31/ipc/chromium/src/base/port.h	2015-06-04 17:42:52.026427782 -0700
[email protected]@ -56,7 +56,7 @@
+ // Define an OS-neutral wrapper for shared library entry points
+ #if defined(OS_WIN)
+ #define API_CALL __stdcall
+-#elif defined(OS_LINUX) || defined(OS_MACOSX)
++#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(OS_MACOSX)
+ #define API_CALL
+ #endif
+ 
+--- mozilla-esr31/ipc/chromium/src/base/process_util.h.orig	2015-06-04 17:42:51.892333219 -0700
++++ mozilla-esr31/ipc/chromium/src/base/process_util.h	2015-06-04 17:42:52.026584078 -0700
[email protected]@ -13,7 +13,7 @@
+ #if defined(OS_WIN)
+ #include <windows.h>
+ #include <tlhelp32.h>
+-#elif defined(OS_LINUX) || defined(__GLIBC__)
++#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(__GLIBC__)
+ #include <dirent.h>
+ #include <limits.h>
+ #include <sys/types.h>
[email protected]@ -21,6 +21,10 @@
+ #include <mach/mach.h>
+ #endif
+ 
++#if defined(OS_SOLARIS)
++#define NAME_MAX 14
++#endif
++
+ #include <map>
+ #include <string>
+ #include <vector>
[email protected]@ -62,7 +66,8 @@
+   PROCESS_ARCH_I386 = 0x1,
+   PROCESS_ARCH_X86_64 = 0x2,
+   PROCESS_ARCH_PPC = 0x4,
+-  PROCESS_ARCH_ARM = 0x8
++  PROCESS_ARCH_ARM = 0x8,
++  PROCESS_ARCH_SPARC = 0x10
+ };
+ 
+ inline ProcessArchitecture GetCurrentProcessArchitecture()
[email protected]@ -76,6 +81,8 @@
+   currentArchitecture = base::PROCESS_ARCH_PPC;
+ #elif defined(ARCH_CPU_ARMEL)
+   currentArchitecture = base::PROCESS_ARCH_ARM;
++#elif defined(ARCH_CPU_SPARC)
++  currentArchitecture = base::PROCESS_ARCH_SPARC;
+ #endif
+   return currentArchitecture;
+ }
[email protected]@ -249,7 +256,7 @@
+ #if defined(OS_WIN)
+   HANDLE snapshot_;
+   bool started_iteration_;
+-#elif defined(OS_LINUX) || defined(__GLIBC__)
++#elif defined(OS_LINUX) || defined(OS_SOLARIS) || defined(__GLIBC__)
+   DIR *procfs_dir_;
+ #elif defined(OS_BSD)
+   std::vector<ProcessEntry> content;
+--- mozilla-esr31/ipc/chromium/src/base/process_util_posix.cc.orig	2015-06-04 17:42:51.897626965 -0700
++++ mozilla-esr31/ipc/chromium/src/base/process_util_posix.cc	2015-06-04 17:42:52.026710300 -0700
[email protected]@ -110,7 +110,7 @@
+ #if defined(ANDROID)
+   static const rlim_t kSystemDefaultMaxFds = 1024;
+   static const char kFDDir[] = "/proc/self/fd";
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_SOLARIS)
+   static const rlim_t kSystemDefaultMaxFds = 8192;
+   static const char kFDDir[] = "/proc/self/fd";
+ #elif defined(OS_MACOSX)
[email protected]@ -202,7 +202,7 @@
+ // TODO(agl): Remove this function. It's fundamentally broken for multithreaded
+ // apps.
+ void SetAllFDsToCloseOnExec() {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_SOLARIS)
+   const char fd_dir[] = "/proc/self/fd";
+ #elif defined(OS_MACOSX) || defined(OS_BSD)
+   const char fd_dir[] = "/dev/fd";
+--- mozilla-esr31/ipc/chromium/src/base/shared_memory_posix.cc.orig	2015-06-04 17:42:51.902973938 -0700
++++ mozilla-esr31/ipc/chromium/src/base/shared_memory_posix.cc	2015-06-04 17:42:52.026834474 -0700
[email protected]@ -124,9 +124,15 @@
+   if (file_util::GetShmemTempDir(&temp_dir) == false)
+     return false;
+ 
++#ifndef OS_SOLARIS    
+   mem_filename = UTF8ToWide(temp_dir.value());
+   file_util::AppendToPath(&mem_filename, L"com.google.chrome.shmem." + memname);
+   *filename = mem_filename;
++#else  
++  *filename = (temp_dir.Append("com.google.chrome.shmem." +
++                               WideToUTF8(memname))).ToWStringHack();
++#endif                               
++
+   return true;
+ }
+ 
[email protected]@ -246,7 +252,7 @@
+   if (memory_ == NULL)
+     return false;
+ 
+-  munmap(memory_, max_size_);
++  munmap((caddr_t)memory_, max_size_);
+   memory_ = NULL;
+   max_size_ = 0;
+   return true;
+--- mozilla-esr31/ipc/chromium/src/base/sys_info_posix.cc.orig	2015-06-04 17:42:51.929533186 -0700
++++ mozilla-esr31/ipc/chromium/src/base/sys_info_posix.cc	2015-06-04 17:42:52.027419274 -0700
[email protected]@ -119,7 +119,7 @@
+ 
+ // static
+ std::string SysInfo::OperatingSystemName() {
+-  utsname info;
++  struct utsname info;
+   if (uname(&info) < 0) {
+     NOTREACHED();
+     return "";
[email protected]@ -129,7 +129,7 @@
+ 
+ // static
+ std::string SysInfo::OperatingSystemVersion() {
+-  utsname info;
++  struct utsname info;
+   if (uname(&info) < 0) {
+     NOTREACHED();
+     return "";
[email protected]@ -139,7 +139,7 @@
+ 
+ // static
+ std::string SysInfo::CPUArchitecture() {
+-  utsname info;
++  struct utsname info;
+   if (uname(&info) < 0) {
+     NOTREACHED();
+     return "";
+--- mozilla-esr31/ipc/chromium/src/base/time.h.orig	2015-06-04 17:42:51.935020865 -0700
++++ mozilla-esr31/ipc/chromium/src/base/time.h	2015-06-04 17:42:52.027549556 -0700
[email protected]@ -62,6 +62,10 @@
+     return delta_;
+   }
+ 
++#if defined(OS_POSIX)
++  struct timespec ToTimeSpec() const;
++#endif
++
+   // Returns the time delta in some unit. The F versions return a floating
+   // point value, the "regular" versions return a rounded-down value.
+   int InDays() const;
[email protected]@ -224,6 +228,10 @@
+   static Time FromDoubleT(double dt);
+   double ToDoubleT() const;
+ 
++#if defined(OS_POSIX)
++  struct timeval ToTimeVal() const;
++#endif
++
+ 
+ #if defined(OS_WIN)
+   static Time FromFileTime(FILETIME ft);
+--- mozilla-esr31/ipc/chromium/src/base/time_posix.cc.orig	2015-06-04 17:42:51.940371366 -0700
++++ mozilla-esr31/ipc/chromium/src/base/time_posix.cc	2015-06-04 17:42:52.027684078 -0700
[email protected]@ -65,11 +65,13 @@
+   timestruct.tm_wday   = exploded.day_of_week;  // mktime/timegm ignore this
+   timestruct.tm_yday   = 0;     // mktime/timegm ignore this
+   timestruct.tm_isdst  = -1;    // attempt to figure it out
++#ifndef OS_SOLARIS
+   timestruct.tm_gmtoff = 0;     // not a POSIX field, so mktime/timegm ignore
+   timestruct.tm_zone   = NULL;  // not a POSIX field, so mktime/timegm ignore
+-
++#endif
++  
+   time_t seconds;
+-#ifdef ANDROID
++#if defined(ANDROID) || defined(OS_SOLARIS)
+     seconds = mktime(&timestruct);
+ #else
+   if (is_local)
[email protected]@ -167,7 +169,7 @@
+   // With numer and denom = 1 (the expected case), the 64-bit absolute time
+   // reported in nanoseconds is enough to last nearly 585 years.
+ 
+-#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \
++#elif defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_POSIX) && \
+       defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0
+ 
+   struct timespec ts;
[email protected]@ -192,4 +194,25 @@
+   return Now();
+ }
+ 
++struct timespec TimeDelta::ToTimeSpec() const {
++  int64_t microseconds = InMicroseconds();
++  time_t seconds = 0;
++  if (microseconds >= Time::kMicrosecondsPerSecond) {
++    seconds = InSeconds();
++    microseconds -= seconds * Time::kMicrosecondsPerSecond;
++  }
++  struct timespec result =
++      {seconds,
++       microseconds * Time::kNanosecondsPerMicrosecond};
++  return result;
++}
++
++struct timeval Time::ToTimeVal() const {
++  struct timeval result;
++  int64_t us = us_ - kTimeTToMicrosecondsOffset;
++  result.tv_sec = us / Time::kMicrosecondsPerSecond;
++  result.tv_usec = us % Time::kMicrosecondsPerSecond;
++  return result;
++}
++
+ }  // namespace base
+--- mozilla-esr31/ipc/chromium/src/build/build_config.h.orig	2015-06-04 17:42:51.945838858 -0700
++++ mozilla-esr31/ipc/chromium/src/build/build_config.h	2015-06-04 17:42:52.027834010 -0700
[email protected]@ -4,9 +4,9 @@
+ 
+ // This file adds defines about the platform we're currently building on.
+ //  Operating System:
+-//    OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX)
++//    OS_WIN / OS_MACOSX / OS_LINUX / OS_SOLARIS / OS_POSIX (MACOSX or LINUX)
+ //  Compiler:
+-//    COMPILER_MSVC / COMPILER_GCC
++//    COMPILER_MSVC / COMPILER_GCC / COMPILER_SUNPRO
+ //  Processor:
+ //    ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64)
+ //    ARCH_CPU_32_BITS / ARCH_CPU_64_BITS
[email protected]@ -30,6 +30,8 @@
+ #define OS_NETBSD 1
+ #elif defined(__OpenBSD__)
+ #define OS_OPENBSD 1
++#elif defined(__sun__) || defined(__sun)
++#define OS_SOLARIS 1
+ #elif defined(_WIN32)
+ #define OS_WIN 1
+ #else
[email protected]@ -45,13 +47,15 @@
+ 
+ // For access to standard POSIX features, use OS_POSIX instead of a more
+ // specific macro.
+-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+ #define OS_POSIX 1
+ #endif
+ 
+ // Compiler detection.
+ #if defined(__GNUC__)
+ #define COMPILER_GCC 1
++#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
++#define COMPILER_SUNPRO 1
+ #elif defined(_MSC_VER)
+ #define COMPILER_MSVC 1
+ #else
[email protected]@ -62,11 +66,11 @@
+ //   http://msdn.microsoft.com/en-us/library/b0084kay.aspx
+ //   http://www.agner.org/optimize/calling_conventions.pdf
+ //   or with gcc, run: "echo | gcc -E -dM -"
+-#if defined(_M_X64) || defined(__x86_64__)
++#if defined(_M_X64) || defined(__x86_64__) || defined(__x86_64)
+ #define ARCH_CPU_X86_FAMILY 1
+ #define ARCH_CPU_X86_64 1
+ #define ARCH_CPU_64_BITS 1
+-#elif defined(_M_IX86) || defined(__i386__)
++#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
+ #define ARCH_CPU_X86_FAMILY 1
+ #define ARCH_CPU_X86 1
+ #define ARCH_CPU_32_BITS 1
[email protected]@ -84,7 +88,7 @@
+ #elif defined(__sparc64__)
+ #define ARCH_CPU_SPARC 1
+ #define ARCH_CPU_64_BITS 1
+-#elif defined(__sparc__)
++#elif defined(__sparc__) || defined(__sparc)
+ #define ARCH_CPU_SPARC 1
+ #define ARCH_CPU_32_BITS 1
+ #elif defined(__mips__)
+--- mozilla-esr31/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc.orig	2015-06-04 17:42:51.951499640 -0700
++++ mozilla-esr31/ipc/chromium/src/chrome/common/file_descriptor_set_posix.cc	2015-06-04 17:42:52.027937295 -0700
[email protected]@ -4,6 +4,10 @@
+ 
+ #include "chrome/common/file_descriptor_set_posix.h"
+ 
++#if defined(OS_SOLARIS)
++#include <unistd.h>
++#endif
++
+ #include "base/eintr_wrapper.h"
+ #include "base/logging.h"
+ 
+--- mozilla-esr31/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig	2015-06-04 17:42:51.956835709 -0700
++++ mozilla-esr31/ipc/chromium/src/chrome/common/ipc_channel_posix.h	2015-06-04 17:42:52.028050266 -0700
[email protected]@ -111,7 +111,7 @@
+   };
+ 
+   // This is a control message buffer large enough to hold kMaxReadFDs
+-#if defined(OS_MACOSX) || defined(OS_NETBSD)
++#if defined(OS_MACOSX) || defined(OS_NETBSD) || defined(OS_SOLARIS)
+   // TODO(agl): OSX appears to have non-constant CMSG macros!
+   char input_cmsg_buf_[1024];
+ #else
+--- mozilla-esr31/ipc/chromium/src/chrome/common/transport_dib.h.orig	2015-06-04 17:42:51.962135898 -0700
++++ mozilla-esr31/ipc/chromium/src/chrome/common/transport_dib.h	2015-06-04 17:42:52.028183580 -0700
[email protected]@ -13,7 +13,7 @@
+ 
+ #if defined(OS_WIN)
+ #include <windows.h>
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_SOLARIS)
+ #include "chrome/common/x11_util.h"
+ #endif
+ 
[email protected]@ -66,7 +66,7 @@
+   typedef base::SharedMemoryHandle Handle;
+   // On Mac, the inode number of the backing file is used as an id.
+   typedef base::SharedMemoryId Id;
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_SOLARIS)
+   typedef int Handle;  // These two ints are SysV IPC shared memory keys
+   typedef int Id;
+ #endif
[email protected]@ -96,7 +96,7 @@
+   // wire to give this transport DIB to another process.
+   Handle handle() const;
+ 
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_SOLARIS)
+   // Map the shared memory into the X server and return an id for the shared
+   // segment.
+   XID MapToX(Display* connection);
[email protected]@ -107,7 +107,7 @@
+ #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD)
+   explicit TransportDIB(base::SharedMemoryHandle dib);
+   base::SharedMemory shared_memory_;
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_SOLARIS)
+   int key_;  // SysV shared memory id
+   void* address_;  // mapped address
+   XID x_shm_;  // X id for the shared segment
+--- mozilla-esr31/ipc/chromium/src/third_party/libevent/solaris/event2/event-config.h.orig	1969-12-31 16:00:00.000000000 -0800
++++ mozilla-esr31/ipc/chromium/src/third_party/libevent/solaris/event2/event-config.h	2015-06-04 17:42:52.028377621 -0700
[email protected]@ -0,0 +1,455 @@
++/* event2/event-config.h
++ *
++ * This file was generated by autoconf when libevent was built, and post-
++ * processed by Libevent so that its macros would have a uniform prefix.
++ *
++ * DO NOT EDIT THIS FILE.
++ *
++ * Do not rely on macros in this file existing in later versions.
++ */
++
++#ifndef _EVENT2_EVENT_CONFIG_H_
++#define _EVENT2_EVENT_CONFIG_H_
++
++/* config.h.  Generated from config.h.in by configure.  */
++/* config.h.in.  Generated from configure.in by autoheader.  */
++
++/* Define if libevent should build without support for a debug mode */
++/* #undef _EVENT_DISABLE_DEBUG_MODE */
++
++/* Define if libevent should not allow replacing the mm functions */
++/* #undef _EVENT_DISABLE_MM_REPLACEMENT */
++
++/* Define if libevent should not be compiled with thread support */
++/* #undef _EVENT_DISABLE_THREAD_SUPPORT */
++
++/* Define to 1 if you have the `arc4random' function. */
++/* #undef _EVENT_HAVE_ARC4RANDOM */
++
++/* Define to 1 if you have the `arc4random_buf' function. */
++/* #undef _EVENT_HAVE_ARC4RANDOM_BUF */
++
++/* Define to 1 if you have the <arpa/inet.h> header file. */
++#define _EVENT_HAVE_ARPA_INET_H 1
++
++/* Define to 1 if you have the `clock_gettime' function. */
++#define _EVENT_HAVE_CLOCK_GETTIME 1
++
++/* Define to 1 if you have the declaration of `CTL_KERN', and to 0 if you
++   don't. */
++/* #undef _EVENT_HAVE_DECL_CTL_KERN */
++
++/* Define to 1 if you have the declaration of `KERN_ARND', and to 0 if you
++   don't. */
++/* #undef _EVENT_HAVE_DECL_KERN_ARND */
++
++/* Define to 1 if you have the declaration of `KERN_RANDOM', and to 0 if you
++   don't. */
++/* #undef _EVENT_HAVE_DECL_KERN_RANDOM */
++
++/* Define to 1 if you have the declaration of `RANDOM_UUID', and to 0 if you
++   don't. */
++#define _EVENT_HAVE_DECL_RANDOM_UUID 1
++
++/* Define if /dev/poll is available */
++#define _EVENT_HAVE_DEVPOLL 1
++
++/* Define to 1 if you have the <dlfcn.h> header file. */
++#define _EVENT_HAVE_DLFCN_H 1
++
++/* Define if your system supports the epoll system calls */
++/* #undef _EVENT_HAVE_EPOLL */
++
++/* Define to 1 if you have the `epoll_ctl' function. */
++/* #undef _EVENT_HAVE_EPOLL_CTL */
++
++/* Define to 1 if you have the `eventfd' function. */
++/* #undef _EVENT_HAVE_EVENTFD */
++
++/* Define if your system supports event ports */
++#define _EVENT_HAVE_EVENT_PORTS 1
++
++/* Define to 1 if you have the `fcntl' function. */
++#define _EVENT_HAVE_FCNTL 1
++
++/* Define to 1 if you have the <fcntl.h> header file. */
++#define _EVENT_HAVE_FCNTL_H 1
++
++/* Define to 1 if the system has the type `fd_mask'. */
++#define _EVENT_HAVE_FD_MASK 1
++
++/* Do we have getaddrinfo()? */
++#define _EVENT_HAVE_GETADDRINFO 1
++
++/* Define to 1 if you have the `getegid' function. */
++#define _EVENT_HAVE_GETEGID 1
++
++/* Define to 1 if you have the `geteuid' function. */
++#define _EVENT_HAVE_GETEUID 1
++
++/* Define this if you have any gethostbyname_r() */
++/* #undef _EVENT_HAVE_GETHOSTBYNAME_R */
++
++/* Define this if gethostbyname_r takes 3 arguments */
++/* #undef _EVENT_HAVE_GETHOSTBYNAME_R_3_ARG */
++
++/* Define this if gethostbyname_r takes 5 arguments */
++/* #undef _EVENT_HAVE_GETHOSTBYNAME_R_5_ARG */
++
++/* Define this if gethostbyname_r takes 6 arguments */
++/* #undef _EVENT_HAVE_GETHOSTBYNAME_R_6_ARG */
++
++/* Define to 1 if you have the `getnameinfo' function. */
++#define _EVENT_HAVE_GETNAMEINFO 1
++
++/* Define to 1 if you have the `getprotobynumber' function. */
++#define _EVENT_HAVE_GETPROTOBYNUMBER 1
++
++/* Define to 1 if you have the `getservbyname' function. */
++/* #undef _EVENT_HAVE_GETSERVBYNAME */
++
++/* Define to 1 if you have the `gettimeofday' function. */
++#define _EVENT_HAVE_GETTIMEOFDAY 1
++
++/* Define to 1 if you have the `inet_aton' function. */
++#define _EVENT_HAVE_INET_ATON 1
++
++/* Define to 1 if you have the `inet_ntop' function. */
++#define _EVENT_HAVE_INET_NTOP 1
++
++/* Define to 1 if you have the `inet_pton' function. */
++#define _EVENT_HAVE_INET_PTON 1
++
++/* Define to 1 if you have the <inttypes.h> header file. */
++#define _EVENT_HAVE_INTTYPES_H 1
++
++/* Define to 1 if you have the `issetugid' function. */
++#define _EVENT_HAVE_ISSETUGID 1
++
++/* Define to 1 if you have the `kqueue' function. */
++/* #undef _EVENT_HAVE_KQUEUE */
++
++/* Define if the system has zlib */
++#define _EVENT_HAVE_LIBZ 1
++
++/* Define to 1 if you have the <memory.h> header file. */
++#define _EVENT_HAVE_MEMORY_H 1
++
++/* Define to 1 if you have the `mmap' function. */
++#define _EVENT_HAVE_MMAP 1
++
++/* Define to 1 if you have the <netdb.h> header file. */
++#define _EVENT_HAVE_NETDB_H 1
++
++/* Define to 1 if you have the <netinet/in6.h> header file. */
++/* #undef _EVENT_HAVE_NETINET_IN6_H */
++
++/* Define to 1 if you have the <netinet/in.h> header file. */
++#define _EVENT_HAVE_NETINET_IN_H 1
++
++/* Define if the system has openssl */
++#define _EVENT_HAVE_OPENSSL 1
++
++/* Define to 1 if you have the <openssl/bio.h> header file. */
++#define _EVENT_HAVE_OPENSSL_BIO_H 1
++
++/* Define to 1 if you have the `pipe' function. */
++#define _EVENT_HAVE_PIPE 1
++
++/* Define to 1 if you have the `poll' function. */
++#define _EVENT_HAVE_POLL 1
++
++/* Define to 1 if you have the <poll.h> header file. */
++#define _EVENT_HAVE_POLL_H 1
++
++/* Define to 1 if you have the `port_create' function. */
++#define _EVENT_HAVE_PORT_CREATE 1
++
++/* Define to 1 if you have the <port.h> header file. */
++#define _EVENT_HAVE_PORT_H 1
++
++/* Define if you have POSIX threads libraries and header files. */
++/* #undef _EVENT_HAVE_PTHREAD */
++
++/* Define if we have pthreads on this system */
++#define _EVENT_HAVE_PTHREADS 1
++
++/* Define to 1 if you have the `putenv' function. */
++#define _EVENT_HAVE_PUTENV 1
++
++/* Define to 1 if the system has the type `sa_family_t'. */
++#define _EVENT_HAVE_SA_FAMILY_T 1
++
++/* Define to 1 if you have the `select' function. */
++#define _EVENT_HAVE_SELECT 1
++
++/* Define to 1 if you have the `sendfile' function. */
++#define _EVENT_HAVE_SENDFILE 1
++
++/* Define to 1 if you have the `setenv' function. */
++#define _EVENT_HAVE_SETENV 1
++
++/* Define if F_SETFD is defined in <fcntl.h> */
++#define _EVENT_HAVE_SETFD 1
++
++/* Define to 1 if you have the `sigaction' function. */
++#define _EVENT_HAVE_SIGACTION 1
++
++/* Define to 1 if you have the `signal' function. */
++#define _EVENT_HAVE_SIGNAL 1
++
++/* Define to 1 if you have the `splice' function. */
++#define _EVENT_HAVE_SPLICE 1
++
++/* Define to 1 if you have the <stdarg.h> header file. */
++#define _EVENT_HAVE_STDARG_H 1
++
++/* Define to 1 if you have the <stddef.h> header file. */
++#define _EVENT_HAVE_STDDEF_H 1
++
++/* Define to 1 if you have the <stdint.h> header file. */
++#define _EVENT_HAVE_STDINT_H 1
++
++/* Define to 1 if you have the <stdlib.h> header file. */
++#define _EVENT_HAVE_STDLIB_H 1
++
++/* Define to 1 if you have the <strings.h> header file. */
++#define _EVENT_HAVE_STRINGS_H 1
++
++/* Define to 1 if you have the <string.h> header file. */
++#define _EVENT_HAVE_STRING_H 1
++
++/* Define to 1 if you have the `strlcpy' function. */
++#define _EVENT_HAVE_STRLCPY 1
++
++/* Define to 1 if you have the `strsep' function. */
++#define _EVENT_HAVE_STRSEP 1
++
++/* Define to 1 if you have the `strtok_r' function. */
++#define _EVENT_HAVE_STRTOK_R 1
++
++/* Define to 1 if you have the `strtoll' function. */
++#define _EVENT_HAVE_STRTOLL 1
++
++/* Define to 1 if the system has the type `struct addrinfo'. */
++#define _EVENT_HAVE_STRUCT_ADDRINFO 1
++
++/* Define to 1 if the system has the type `struct in6_addr'. */
++#define _EVENT_HAVE_STRUCT_IN6_ADDR 1
++
++/* Define to 1 if `s6_addr16' is a member of `struct in6_addr'. */
++/* #undef _EVENT_HAVE_STRUCT_IN6_ADDR_S6_ADDR16 */
++
++/* Define to 1 if `s6_addr32' is a member of `struct in6_addr'. */
++/* #undef _EVENT_HAVE_STRUCT_IN6_ADDR_S6_ADDR32 */
++
++/* Define to 1 if the system has the type `struct sockaddr_in6'. */
++#define _EVENT_HAVE_STRUCT_SOCKADDR_IN6 1
++
++/* Define to 1 if `sin6_len' is a member of `struct sockaddr_in6'. */
++/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN */
++
++/* Define to 1 if `sin_len' is a member of `struct sockaddr_in'. */
++/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */
++
++/* Define to 1 if the system has the type `struct sockaddr_storage'. */
++#define _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE 1
++
++/* Define to 1 if `ss_family' is a member of `struct sockaddr_storage'. */
++#define _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
++
++/* Define to 1 if `__ss_family' is a member of `struct sockaddr_storage'. */
++/* #undef _EVENT_HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */
++
++/* Define to 1 if you have the `sysctl' function. */
++/* #undef _EVENT_HAVE_SYSCTL */
++
++/* Define to 1 if you have the <sys/devpoll.h> header file. */
++#define _EVENT_HAVE_SYS_DEVPOLL_H 1
++
++/* Define to 1 if you have the <sys/epoll.h> header file. */
++/* #undef _EVENT_HAVE_SYS_EPOLL_H 1 */
++
++/* Define to 1 if you have the <sys/eventfd.h> header file. */
++/* #define _EVENT_HAVE_SYS_EVENTFD_H 1 */
++
++/* Define to 1 if you have the <sys/event.h> header file. */
++/* #undef _EVENT_HAVE_SYS_EVENT_H */
++
++/* Define to 1 if you have the <sys/ioctl.h> header file. */
++#define _EVENT_HAVE_SYS_IOCTL_H 1
++
++/* Define to 1 if you have the <sys/mman.h> header file. */
++#define _EVENT_HAVE_SYS_MMAN_H 1
++
++/* Define to 1 if you have the <sys/param.h> header file. */
++#define _EVENT_HAVE_SYS_PARAM_H 1
++
++/* Define to 1 if you have the <sys/queue.h> header file. */
++#define _EVENT_HAVE_SYS_QUEUE_H 1
++
++/* Define to 1 if you have the <sys/select.h> header file. */
++#define _EVENT_HAVE_SYS_SELECT_H 1
++
++/* Define to 1 if you have the <sys/sendfile.h> header file. */
++#define _EVENT_HAVE_SYS_SENDFILE_H 1
++
++/* Define to 1 if you have the <sys/socket.h> header file. */
++#define _EVENT_HAVE_SYS_SOCKET_H 1
++
++/* Define to 1 if you have the <sys/stat.h> header file. */
++#define _EVENT_HAVE_SYS_STAT_H 1
++
++/* Define to 1 if you have the <sys/sysctl.h> header file. */
++/* #undef _EVENT_HAVE_SYS_SYSCTL_H */
++
++/* Define to 1 if you have the <sys/time.h> header file. */
++#define _EVENT_HAVE_SYS_TIME_H 1
++
++/* Define to 1 if you have the <sys/types.h> header file. */
++#define _EVENT_HAVE_SYS_TYPES_H 1
++
++/* Define to 1 if you have the <sys/uio.h> header file. */
++#define _EVENT_HAVE_SYS_UIO_H 1
++
++/* Define to 1 if you have the <sys/wait.h> header file. */
++#define _EVENT_HAVE_SYS_WAIT_H 1
++
++/* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
++#define _EVENT_HAVE_TAILQFOREACH 1
++
++/* Define if timeradd is defined in <sys/time.h> */
++#define _EVENT_HAVE_TIMERADD 1
++
++/* Define if timerclear is defined in <sys/time.h> */
++#define _EVENT_HAVE_TIMERCLEAR 1
++
++/* Define if timercmp is defined in <sys/time.h> */
++#define _EVENT_HAVE_TIMERCMP 1
++
++/* Define if timerisset is defined in <sys/time.h> */
++#define _EVENT_HAVE_TIMERISSET 1
++
++/* Define to 1 if the system has the type `uint16_t'. */
++#define _EVENT_HAVE_UINT16_T 1
++
++/* Define to 1 if the system has the type `uint32_t'. */
++#define _EVENT_HAVE_UINT32_T 1
++
++/* Define to 1 if the system has the type `uint64_t'. */
++#define _EVENT_HAVE_UINT64_T 1
++
++/* Define to 1 if the system has the type `uint8_t'. */
++#define _EVENT_HAVE_UINT8_T 1
++
++/* Define to 1 if the system has the type `uintptr_t'. */
++#define _EVENT_HAVE_UINTPTR_T 1
++
++/* Define to 1 if you have the `umask' function. */
++#define _EVENT_HAVE_UMASK 1
++
++/* Define to 1 if you have the <unistd.h> header file. */
++#define _EVENT_HAVE_UNISTD_H 1
++
++/* Define to 1 if you have the `unsetenv' function. */
++#define _EVENT_HAVE_UNSETENV 1
++
++/* Define to 1 if you have the `vasprintf' function. */
++#define _EVENT_HAVE_VASPRINTF 1
++
++/* Define if kqueue works correctly with pipes */
++/* #undef _EVENT_HAVE_WORKING_KQUEUE */
++
++/* Define to 1 if you have the <zlib.h> header file. */
++#define _EVENT_HAVE_ZLIB_H 1
++
++/* Define to the sub-directory in which libtool stores uninstalled libraries.
++   */
++#define _EVENT_LT_OBJDIR ".libs/"
++
++/* Define to 1 if your C compiler doesn't accept -c and -o together. */
++/* #undef _EVENT_NO_MINUS_C_MINUS_O */
++
++/* Numeric representation of the version */
++#define _EVENT_NUMERIC_VERSION 0x02001500
++
++/* Name of package */
++#define _EVENT_PACKAGE "libevent"
++
++/* Define to the address where bug reports for this package should be sent. */
++#define _EVENT_PACKAGE_BUGREPORT ""
++
++/* Define to the full name of this package. */
++#define _EVENT_PACKAGE_NAME ""
++
++/* Define to the full name and version of this package. */
++#define _EVENT_PACKAGE_STRING ""
++
++/* Define to the one symbol short name of this package. */
++#define _EVENT_PACKAGE_TARNAME ""
++
++/* Define to the home page for this package. */
++#define _EVENT_PACKAGE_URL ""
++
++/* Define to the version of this package. */
++#define _EVENT_PACKAGE_VERSION ""
++
++/* Define to necessary symbol if this constant uses a non-standard name on
++   your system. */
++/* #undef _EVENT_PTHREAD_CREATE_JOINABLE */
++
++/* The size of `int', as computed by sizeof. */
++#define _EVENT_SIZEOF_INT 4
++
++/* The size of `long', as computed by sizeof. */
++#define _EVENT_SIZEOF_LONG 4
++
++/* The size of `long long', as computed by sizeof. */
++#define _EVENT_SIZEOF_LONG_LONG 8
++
++/* The size of `pthread_t', as computed by sizeof. */
++#define _EVENT_SIZEOF_PTHREAD_T 4
++
++/* The size of `short', as computed by sizeof. */
++#define _EVENT_SIZEOF_SHORT 2
++
++/* The size of `size_t', as computed by sizeof. */
++#define _EVENT_SIZEOF_SIZE_T 4
++
++/* The size of `void *', as computed by sizeof. */
++#define _EVENT_SIZEOF_VOID_P 4
++
++/* Define to 1 if you have the ANSI C header files. */
++#define _EVENT_STDC_HEADERS 1
++
++/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
++#define _EVENT_TIME_WITH_SYS_TIME 1
++
++/* Version number of package */
++#define _EVENT_VERSION "2.0.21-stable"
++
++/* Define to appropriate substitue if compiler doesnt have __func__ */
++/* #undef _EVENT___func__ */
++
++/* Define to empty if `const' does not conform to ANSI C. */
++/* #undef _EVENT_const */
++
++/* Define to `__inline__' or `__inline' if that's what the C compiler
++   calls it, or to nothing if 'inline' is not supported under any name.  */
++#ifndef _EVENT___cplusplus
++/* #undef _EVENT_inline */
++#endif
++
++/* Define to `int' if <sys/types.h> does not define. */
++/* #undef _EVENT_pid_t */
++
++/* Define to `unsigned int' if <sys/types.h> does not define. */
++/* #undef _EVENT_size_t */
++
++/* Define to unsigned int if you dont have it */
++/* #undef _EVENT_socklen_t */
++
++/* Define to `int' if <sys/types.h> does not define. */
++/* #undef _EVENT_ssize_t */
++
++#endif /* event2/event-config.h */
+--- mozilla-esr31/ipc/glue/BrowserProcessSubThread.cpp.orig	2015-06-04 17:42:51.968125755 -0700
++++ mozilla-esr31/ipc/glue/BrowserProcessSubThread.cpp	2015-06-04 17:42:52.028493604 -0700
[email protected]@ -25,7 +25,7 @@
+ //  "Chrome_FileThread",  // FILE
+ //  "Chrome_DBThread",  // DB
+ //  "Chrome_HistoryThread",  // HISTORY
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_SOLARIS)
+   "Gecko_Background_X11Thread",  // BACKGROUND_X11
+ #endif
+ };
[email protected]@ -36,7 +36,7 @@
+ //  nullptr,  // FILE
+ //  nullptr,  // DB
+ //  nullptr,  // HISTORY
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_SOLARIS)
+   nullptr,  // BACKGROUND_X11
+ #endif
+ };
+--- mozilla-esr31/ipc/glue/BrowserProcessSubThread.h.orig	2015-06-04 17:42:51.973476461 -0700
++++ mozilla-esr31/ipc/glue/BrowserProcessSubThread.h	2015-06-04 17:42:52.028585516 -0700
[email protected]@ -28,7 +28,7 @@
+       //FILE,
+       //DB,
+       //HISTORY,
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_SOLARIS)
+       // This thread has a second connection to the X server and is used
+       // to process UI requests when routing the request to the UI
+       // thread would risk deadlock.
+--- mozilla-esr31/ipc/glue/GeckoChildProcessHost.cpp.orig	2015-06-04 17:42:51.978784250 -0700
++++ mozilla-esr31/ipc/glue/GeckoChildProcessHost.cpp	2015-06-04 17:42:52.028760031 -0700
[email protected]@ -548,12 +548,15 @@
+   // and passing wstrings from one config to the other is unsafe.  So
+   // we split the logic here.
+ 
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+-  base::environment_map newEnvVars;
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) || defined(OS_SOLARIS)
+   ChildPrivileges privs = mPrivileges;
+   if (privs == base::PRIVILEGES_DEFAULT) {
+     privs = DefaultChildPrivileges();
+   }
++#endif
++
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
++  base::environment_map newEnvVars;
+   // XPCOM may not be initialized in some subprocesses.  We don't want
+   // to initialize XPCOM just for the directory service, especially
+   // since LD_LIBRARY_PATH is already set correctly in subprocesses
[email protected]@ -671,7 +674,7 @@
+   childArgv.push_back(pidstring);
+ 
+ #if defined(MOZ_CRASHREPORTER)
+-#  if defined(OS_LINUX) || defined(OS_BSD)
++#  if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
+   int childCrashFd, childCrashRemapFd;
+   if (!CrashReporter::CreateNotificationPipeForChild(
+         &childCrashFd, &childCrashRemapFd))
[email protected]@ -687,7 +690,7 @@
+   }
+ #  elif defined(MOZ_WIDGET_COCOA)
+   childArgv.push_back(CrashReporter::GetChildNotificationPipe());
+-#  endif  // OS_LINUX
++#  endif  // OS_LINUX || defined(OS_SOLARIS)
+ #endif
+ 
+ #ifdef MOZ_WIDGET_COCOA
[email protected]@ -706,6 +709,8 @@
+   base::LaunchApp(childArgv, mFileMap,
+ #if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+                   newEnvVars, privs,
++#elif defined(OS_SOLARIS)
++                  base::environment_map(), privs,
+ #endif
+                   false, &process, arch);
+ 
+--- mozilla-esr31/ipc/glue/SharedMemorySysV.h.orig	2015-06-04 17:42:51.984117091 -0700
++++ mozilla-esr31/ipc/glue/SharedMemorySysV.h	2015-06-04 17:42:52.028880854 -0700
[email protected]@ -8,7 +8,7 @@
+ #ifndef mozilla_ipc_SharedMemorySysV_h
+ #define mozilla_ipc_SharedMemorySysV_h
+ 
+-#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD)
++#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD) || defined(OS_SOLARIS)
+ 
+ // SysV shared memory isn't available on Windows, but we define the
+ // following macro so that #ifdefs are clearer (compared to #ifdef
[email protected]@ -55,6 +55,9 @@
+   virtual ~SharedMemorySysV()
+   {
+     shmdt(mData);
++#ifdef OS_SOLARIS    
++    shmctl(mHandle, IPC_RMID, 0);
++#endif    
+     mHandle = -1;
+     mData = nullptr;
+   }
[email protected]@ -94,7 +97,9 @@
+ 
+     // Mark the handle as deleted so that, should this process go away, the
+     // segment is cleaned up.
++#ifndef OS_SOLARIS
+     shmctl(mHandle, IPC_RMID, 0);
++#endif
+ 
+     mData = mem;
+ 
[email protected]@ -145,6 +150,6 @@
+ } // namespace ipc
+ } // namespace mozilla
+ 
+-#endif // OS_LINUX
++#endif // OS_LINUX || OS_SOLARIS
+ 
+ #endif // ifndef mozilla_ipc_SharedMemorySysV_h
+--- mozilla-esr31/ipc/ipdl/test/cxx/Makefile.in.orig	2015-06-04 17:42:51.989770256 -0700
++++ mozilla-esr31/ipc/ipdl/test/cxx/Makefile.in	2015-06-04 17:42:52.028974010 -0700
[email protected]@ -9,6 +9,10 @@
+   TestBridgeSub \
+   $(NULL)
+ 
++ifeq ($(OS_ARCH),SunOS)
++IPDLTESTS += TestSysVShmem
++endif
++
+ IPDLTESTHDRS = $(addprefix $(srcdir)/,$(addsuffix .h,$(IPDLTESTS)))
+ 
+ TESTER_TEMPLATE := $(srcdir)/IPDLUnitTests.template.cpp
+--- mozilla-esr31/ipc/ipdl/test/cxx/TestShutdown.cpp.orig	2015-06-04 17:42:51.995172293 -0700
++++ mozilla-esr31/ipc/ipdl/test/cxx/TestShutdown.cpp	2015-06-04 17:42:52.029072732 -0700
[email protected]@ -184,6 +184,8 @@
+         // detectors
+         _exit(0);
+     }
++
++    return false;
+ }
+ 
+ void
+--- mozilla-esr31/js/src/configure.orig	2015-06-04 17:42:52.000916637 -0700
++++ mozilla-esr31/js/src/configure	2015-06-04 17:42:52.030137803 -0700
[email protected]@ -8283,7 +8283,7 @@
+ EOF
+ 
+        CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all -D__FUNCTION__=__func__"
+-       CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef"
++       CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife,tmplrefstatic,extensions,no%except -norunpath -D__FUNCTION__=__func__ -template=no%extdef -D_XOPEN_SOURCE=500 -D__EXTENSIONS__"
+        LDFLAGS="-xildoff $LDFLAGS"
+        if test -z "$CROSS_COMPILE" -a -f /usr/lib/ld/map.noexstk; then
+            _SAVE_LDFLAGS=$LDFLAGS
+--- mozilla-esr31/mfbt/Poison.cpp.orig	2015-06-04 17:42:52.006353842 -0700
++++ mozilla-esr31/mfbt/Poison.cpp	2015-06-04 17:42:52.030249726 -0700
[email protected]@ -25,6 +25,7 @@
+ #  endif
+ # endif
+ #endif
++extern "C" int madvise(caddr_t, size_t, int);
+ 
+ extern "C" {
+ uintptr_t gMozillaPoisonValue;
[email protected]@ -125,7 +126,7 @@
+ static bool
+ ProbeRegion(uintptr_t region, uintptr_t size)
+ {
+-  if (madvise(reinterpret_cast<void*>(region), size, MADV_NORMAL)) {
++  if (madvise(reinterpret_cast<char*>(region), size, MADV_NORMAL)) {
+     return true;
+   } else {
+     return false;
+--- mozilla-esr31/mfbt/tests/TestPoisonArea.cpp.orig	2015-06-04 17:42:52.011890810 -0700
++++ mozilla-esr31/mfbt/tests/TestPoisonArea.cpp	2015-06-04 17:42:52.030377829 -0700
[email protected]@ -104,6 +104,7 @@
+ #include <sys/wait.h>
+ 
+ #include <sys/mman.h>
++extern "C" int madvise(caddr_t, size_t, int);
+ #ifndef MAP_ANON
+ #ifdef MAP_ANONYMOUS
+ #define MAP_ANON MAP_ANONYMOUS
[email protected]@ -261,7 +262,7 @@
+ static bool
+ ProbeRegion(uintptr_t page)
+ {
+-  if (madvise(reinterpret_cast<void*>(page), PAGESIZE, MADV_NORMAL)) {
++  if (madvise(reinterpret_cast<char*>(page), PAGESIZE, MADV_NORMAL)) {
+     return true;
+   } else {
+     return false;
+--- mozilla-esr31/modules/libjar/nsZipArchive.cpp.orig	2015-06-04 17:42:52.017442262 -0700
++++ mozilla-esr31/modules/libjar/nsZipArchive.cpp	2015-06-04 17:42:52.030536960 -0700
[email protected]@ -40,7 +40,8 @@
+     #include <sys/stat.h>
+     #include <limits.h>
+     #include <unistd.h>
+-#elif defined(XP_WIN)
++extern "C" int madvise(caddr_t, size_t, int);
++#elif defined(XP_WIN) || defined(XP_OS2)
+     #include <io.h>
+ #endif
+ 
[email protected]@ -596,7 +597,7 @@
+     uint32_t readaheadLength = xtolong(startp);
+     if (readaheadLength) {
+ #if defined(XP_UNIX)
+-      madvise(const_cast<uint8_t*>(startp), readaheadLength, MADV_WILLNEED);
++      madvise((caddr_t)const_cast<uint8_t*>(startp), readaheadLength, MADV_WILLNEED);
+ #elif defined(XP_WIN)
+       if (aFd) {
+         HANDLE hFile = (HANDLE) PR_FileDesc2NativeHandle(aFd);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-92-dtrace.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,58 @@
+See Mozilla bug #702179 - dtrace probes are not installed on Solaris with 
+static js lib.
+We haven't enabled dtrace. dtrace will trim the function name (too long). 
+
+--- mozilla-esr31//configure.orig	2015-06-04 17:42:52.277140630 -0700
++++ mozilla-esr31//configure	2015-06-04 17:42:52.307036479 -0700
[email protected]@ -6472,7 +6472,7 @@
+ MOZ_PNG_CFLAGS="-I$_objdir/dist/include" # needed for freetype compilation
+ MOZ_PNG_LIBS='$(call EXPAND_LIBNAME_PATH,mozpng,$(DEPTH)/media/libpng)'
+ 
+-MOZ_JS_STATIC_LIBS='$(call EXPAND_LIBNAME_PATH,js_static,$(LIBXUL_DIST)/lib)'
++MOZ_JS_STATIC_LIBS='$(call EXPAND_LIBNAME_PATH,js_static,$(DEPTH)/js/src)'
+ MOZ_JS_SHARED_LIBS='$(call EXPAND_LIBNAME_PATH,mozjs,$(LIBXUL_DIST)/lib)'
+ MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
+ XPCOM_FROZEN_LDOPTS='$(call EXPAND_LIBNAME_PATH,xul mozalloc,$(LIBXUL_DIST)/bin)'
+--- mozilla-esr31/js/src/Makefile.in.orig	2015-06-04 17:42:52.285669989 -0700
++++ mozilla-esr31/js/src/Makefile.in	2015-06-04 17:42:52.307164501 -0700
[email protected]@ -20,7 +20,6 @@
+ STATIC_LIBRARY_NAME = js_static
+ LIBS		= $(NSPR_LIBS)
+ 
+-DIST_INSTALL = 1
+ 
+ ifdef JS_STANDALONE
+ SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,mfbt,$(DEPTH)/mfbt)
+--- mozilla-esr31/js/src/jsobj.cpp.orig	2015-06-04 17:42:52.291238156 -0700
++++ mozilla-esr31/js/src/jsobj.cpp	2015-06-04 17:42:52.307610718 -0700
[email protected]@ -1324,6 +1324,8 @@
+     return fill(entry, clasp, proto.raw(), kind, obj);
+ }
+ 
++#pragma weak _ZN2js23NewObjectWithGivenProtoEPNS_16ExclusiveContextEPKNS_5ClassENS_11TaggedProtoEP8JSObjectNS_2gc9AllocKindENS_13NewObjectKi = _ZN2js23NewObjectWithGivenProtoEPNS_16ExclusiveContextEPKNS_5ClassENS_11TaggedProtoEP8JSObjectNS_2gc9AllocKindENS_13NewObjectKindE
++
+ JSObject*
+ js::NewObjectWithGivenProto(ExclusiveContext* cxArg, const js::Class* clasp,
+                             js::TaggedProto protoArg, JSObject* parentArg,
+--- mozilla-esr31/js/src/vm/Interpreter.cpp.orig	2015-06-04 17:42:52.296891616 -0700
++++ mozilla-esr31/js/src/vm/Interpreter.cpp	2015-06-04 17:42:52.307913120 -0700
[email protected]@ -603,6 +603,8 @@
+     return Invoke(cx, ObjectValue(*obj), fval, argc, argv, rval);
+ }
+ 
++#pragma weak "__1cCjsNExecuteKernel6FpnJJSContext_nCJSGHandle4CpnIJSScript___rnIJSObject_rkn0CFValue_n0ALExecuteType_n0AQAbstractFramePtr_p9A" = "__1cCjsNExecuteKernel6FpnJJSContext_nCJSGHandle4CpnIJSScript___rnIJSObject_rkn0CFValue_n0ALExecuteType_n0AQAbstractFramePtr_p9A_b_"
++
+ bool
+ js::ExecuteKernel(JSContext* cx, HandleScript script, JSObject& scopeChainArg, const Value& thisv,
+                   ExecuteType type, AbstractFramePtr evalInFrame, Value* result)
+--- mozilla-esr31/js/src/vm/OldDebugAPI.cpp.orig	2015-06-04 17:42:52.302287919 -0700
++++ mozilla-esr31/js/src/vm/OldDebugAPI.cpp	2015-06-04 17:42:52.308077570 -0700
[email protected]@ -237,6 +237,8 @@
+     return true;
+ }
+ 
++#pragma weak "__1cMJS_ClearTrap6FpnJJSContext_pnIJSScript_pCppF134pnCJSFValue_6_nMJSTrapStatus_7_v_" = "__1cMJS_ClearTrap6FpnJJSContext_pnIJSScript_pCppF134pnCJSFValue_6_nMJSTrapStatus_p6_v_"
++
+ JS_PUBLIC_API(void)
+ JS_ClearTrap(JSContext* cx, JSScript* script, jsbytecode* pc,
+              JSTrapHandler* handlerp, jsval* closurep)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-97-ycbcr2.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,54 @@
+For studio. We can remove if we don't care about studio. 
+
+EMMS() is not in sparc. 
+
+--- mozilla-esr31/gfx/ycbcr/chromium_types.h.orig	2015-06-04 17:42:52.382798534 -0700
++++ mozilla-esr31/gfx/ycbcr/chromium_types.h	2015-06-04 17:42:52.407116949 -0700
[email protected]@ -10,7 +10,7 @@
+ // On Windows, protypes.h is #included, which defines these types.  This sucks!
+ #ifndef PROTYPES_H
+ typedef uint8_t uint8;
+-typedef int8_t int8;
++//typedef int8_t int8;
+ typedef int16_t int16;
+ typedef uint16_t uint16;
+ typedef uint32_t uint32;
+--- mozilla-esr31/gfx/ycbcr/moz.build.orig	2015-06-04 17:42:52.388097037 -0700
++++ mozilla-esr31/gfx/ycbcr/moz.build	2015-06-04 17:42:52.407236264 -0700
[email protected]@ -34,7 +34,8 @@
+             ]
+     else:
+         SOURCES += ['yuv_convert_mmx.cpp']
+-        SOURCES['yuv_convert_mmx.cpp'].flags += CONFIG['MMX_FLAGS']
++        if CONFIG['GNU_CC']:
++            SOURCES['yuv_convert_mmx.cpp'].flags += CONFIG['MMX_FLAGS']
+ 
+ if CONFIG['_MSC_VER']:
+     if CONFIG['OS_TEST'] == 'x86_64':
+--- mozilla-esr31/gfx/ycbcr/yuv_convert.cpp.orig	2015-06-04 17:42:52.393413194 -0700
++++ mozilla-esr31/gfx/ycbcr/yuv_convert.cpp	2015-06-04 17:42:52.407392523 -0700
[email protected]@ -105,9 +105,11 @@
+     }
+   }
+ 
++#ifdef ARCH_CPU_X86_FAMILY
+   // MMX used for FastConvertYUVToRGB32Row requires emms instruction.
+   if (has_sse)
+     EMMS();
++#endif
+ }
+ 
+ // C version does 8 at a time to mimic MMX code
[email protected]@ -348,9 +350,12 @@
+ #endif
+     }
+   }
++
++#ifdef ARCH_CPU_X86_FAMILY
+   // MMX used for FastConvertYUVToRGB32Row and FilterRows requires emms.
+   if (has_mmx)
+     EMMS();
++#endif
+ }
+ 
+ }  // namespace gfx
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-gnu-105-lz4-restrict-keyword.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,15 @@
+Correctly recognize the "restrict" keyword for the lz4.c file included in
+Compression.cpp
+https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57025
+
+--- mozilla-esr31/mfbt/lz4.c.orig	2015-06-04 11:17:03.957437771 -0700
++++ mozilla-esr31/mfbt/lz4.c	2015-06-04 11:17:03.963371797 -0700
[email protected]@ -104,7 +104,7 @@
+ /**************************************
+  Compiler Options
+ **************************************/
+-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)   /* C99 */
++#if defined(__STDC_VERSION__) && !defined(__cplusplus) && (__STDC_VERSION__ >= 199901L)   /* C99 */
+ /* "restrict" is a known keyword */
+ #else
+ #  define restrict /* Disable restrict */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-gnu-125-mozalloc.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,29 @@
+Correctly define malloc_usable_size
+
+Get correct abort() function definition for Solaris.
+
+--- mozilla-esr31/memory/mozalloc/mozalloc.cpp.orig	2015-06-04 11:10:38.830585129 -0700
++++ mozilla-esr31/memory/mozalloc/mozalloc.cpp	2015-06-04 11:10:38.830522608 -0700
[email protected]@ -200,6 +200,8 @@
+ }
+ #endif // if defined(HAVE_VALLOC)
+ 
++extern "C" size_t malloc_usable_size(const void *ptr);
++
+ size_t
+ moz_malloc_usable_size(void *ptr)
+ {
+--- mozilla-esr31/memory/mozalloc/mozalloc_abort.cpp.orig	2015-06-04 11:10:38.830454359 -0700
++++ mozilla-esr31/memory/mozalloc/mozalloc_abort.cpp	2015-06-04 11:10:38.830381114 -0700
[email protected]@ -34,7 +34,11 @@
+ // Define abort() here, so that it is used instead of the system abort(). This
+ // lets us control the behavior when aborting, in order to get better results
+ // on *NIX platforms. See mozalloc_abort for details.
++#if defined(SOLARIS)
++void std::abort(void)
++#else
+ void abort(void)
++#endif
+ {
+     mozalloc_abort("Redirecting call to abort() to mozalloc_abort\n");
+ }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-gnu-130-xopen.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+Prevent:
+error: #error "Compiler or options invalid for pre-UNIX 03 X/Open applications  and pre-2001 POSIX applications
+
+--- mozilla-esr31/media/libpng/pngpriv.h.orig	2015-06-04 13:00:52.516503541 -0700
++++ mozilla-esr31/media/libpng/pngpriv.h	2015-06-04 13:00:52.515657420 -0700
[email protected]@ -39,6 +39,8 @@
+  */
+ #define _POSIX_SOURCE 1 /* Just the POSIX 1003.1 and C89 APIs */
+ 
++#define _XOPEN_SOURCE 600
++
+ #ifndef PNG_VERSION_INFO_ONLY
+ /* Standard library headers not required by png.h: */
+ #  include <stdlib.h>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-gnu-ReadAheadFile.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,27 @@
+In-house patch for firefox to build with GNU compilers. 
+With GNU compiler, we have hunspell_fopen_hooks.h included 
+through mozilla-config.h.
+But we don't have an implementation for mozilla::ReadAheadFile().
+
+diff --git a/xpcom/glue/FileUtils.cpp b/xpcom/glue/FileUtils.cpp
+--- a/xpcom/glue/FileUtils.cpp
++++ b/xpcom/glue/FileUtils.cpp
[email protected]@ -481,17 +481,17 @@ mozilla::ReadAheadFile(mozilla::pathstr_
+   }
+   if (fd == INVALID_HANDLE_VALUE) {
+     return;
+   }
+   ReadAhead(fd, aOffset, aCount);
+   if (!aOutFd) {
+     CloseHandle(fd);
+   }
+-#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX)
++#elif defined(LINUX) && !defined(ANDROID) || defined(XP_MACOSX) || defined(SOLARIS)
+   if (!aFilePath) {
+     if (aOutFd) {
+       *aOutFd = -1;
+     }
+     return;
+   }
+   int fd = open(aFilePath, O_RDONLY);
+   if (aOutFd) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/patches/firefox31-sparc-ta-6.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,80 @@
+Adds asm("ta 6") which suppresses bus error caused by misalignment.
+
+diff --git a/js/xpconnect/src/XPCShellImpl.cpp b/js/xpconnect/src/XPCShellImpl.cpp
+--- a/js/xpconnect/src/XPCShellImpl.cpp
++++ b/js/xpconnect/src/XPCShellImpl.cpp
[email protected]@ -1320,16 +1320,22 @@ GetCurrentWorkingDirectory(nsAString& wo
+     return true;
+ }
+ 
+ static JSSecurityCallbacks shellSecurityCallbacks;
+ 
+ int
+ XRE_XPCShellMain(int argc, char** argv, char** envp)
+ {
++
++#if defined (__GNUC__) && (defined(__sparc) || defined(__sparc__))
++    // make unaligned memory access no crash
++    asm ( "ta 6" );
++#endif
++
+     JSRuntime* rt;
+     JSContext* cx;
+     int result;
+     nsresult rv;
+ 
+     gErrFile = stderr;
+     gOutFile = stdout;
+     gInFile = stdin;
+diff --git a/memory/mozjemalloc/jemalloc.c b/memory/mozjemalloc/jemalloc.c
+--- a/memory/mozjemalloc/jemalloc.c
++++ b/memory/mozjemalloc/jemalloc.c
[email protected]@ -5551,16 +5551,22 @@ malloc_init(void)
+ #endif
+ 
+ #if !defined(MOZ_MEMORY_WINDOWS)
+ static
+ #endif
+ bool
+ malloc_init_hard(void)
+ {
++
++#if defined (__GNUC__) && (defined(__sparc) || defined(__sparc__))
++    // make unaligned memory access no crash
++    asm ( "ta 6" );
++#endif
++
+ 	unsigned i;
+ 	char buf[PATH_MAX + 1];
+ 	const char *opts;
+ 	long result;
+ #ifndef MOZ_MEMORY_WINDOWS
+ 	int linklen;
+ #endif
+ #ifdef MOZ_MEMORY_DARWIN
+diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp
+--- a/toolkit/xre/nsAppRunner.cpp
++++ b/toolkit/xre/nsAppRunner.cpp
[email protected]@ -4016,16 +4016,22 @@ XREMain::XRE_mainRun()
+ }
+ 
+ /*
+  * XRE_main - A class based main entry point used by most platforms.
+  */
+ int
+ XREMain::XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
+ {
++
++#if defined (__GNUC__) && (defined(__sparc) || defined(__sparc__))
++    // make unaligned memory access no crash
++    asm ( "ta 6" );
++#endif
++
+   char aLocal;
+   GeckoProfilerInitRAII profilerGuard(&aLocal);
+   PROFILER_LABEL("Startup", "XRE_Main");
+ 
+   mozilla::IOInterposerInit ioInterposerGuard;
+ 
+   nsresult rv = NS_OK;
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/firefox/test/results-32.master	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,9 @@
+make[1]: Entering directory `$(@D)/js/src'
+../../dist/bin/run-mozilla.sh $(@D)/_virtualenv/bin/python -u $(SOURCE_DIR)/js/src/jit-test/jit_test.py \
+        --no-slow --no-progress --tinderbox --tbpl -j 2 -f  \
+        ../../dist/bin/js
+PASSED ALL
+Result summary:
+Passed: 24660
+Failed: 0
+make[1]: Leaving directory `$(@D)/js/src'
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/Makefile	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,188 @@
+#
+# CDDL HEADER START
+#
+# The contents of this file are subject to the terms of the
+# Common Development and Distribution License (the "License").
+# You may not use this file except in compliance with the License.
+#
+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
+# or http://www.opensolaris.org/os/licensing.
+# See the License for the specific language governing permissions
+# and limitations under the License.
+#
+# When distributing Covered Code, include this CDDL HEADER in each
+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
+# If applicable, add the following below this CDDL HEADER, with the
+# fields enclosed by brackets "[]" replaced with your own identifying
+# information: Portions Copyright [yyyy] [name of copyright owner]
+#
+# CDDL HEADER END
+#
+
+#
+# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+#
+
+COMPILER =	gcc
+
+include ../../../make-rules/shared-macros.mk
+
+COMPONENT_NAME=		thunderbird
+COMPONENT_VERSION=	31.6.0
+COMPONENT_PROJECT_URL=	http://www.mozilla.com/thunderbird
+COMPONENT_SRC=		comm-esr31
+COMPONENT_SRC_NAME =	$(COMPONENT_NAME)-$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE=	$(COMPONENT_SRC_NAME).source.tar.bz2
+COMPONENT_ARCHIVE_HASH= \
+    sha256:ccbf8cbb740bc1b30ecf4fe39aab226607f9a41e23a07e994c508a90e8b70508
+MOZILLA_FTP = 		http://ftp.mozilla.org/pub/mozilla.org/$(COMPONENT_NAME)/releases/$(COMPONENT_VERSION)
+COMPONENT_ARCHIVE_URL=	$(MOZILLA_FTP)/source/$(COMPONENT_ARCHIVE)
+COMPONENT_BUGDB=	thunderbird/mailer
+
+TPNO=			22326
+
+# There are a set of .xpi files (as given in the LANG_LIST definition below)
+# that we need. These are available under:
+# http://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/31.6.0/linux-i686/xpi/
+# This downloads the xpis. 
+
+LANG_LIST = ar bg ca cs da de el es-AR es-ES et eu fi \
+	fr gl he hu id is it ja ko lt nb-NO nl nn-NO pa-IN pl \
+	pt-BR pt-PT ro ru sk sl sq sv-SE tr uk zh-CN zh-TW
+
+COMPONENT_PREP_ACTION += \
+        ($(MKDIR) xpi ; \
+        cd xpi ; \
+        for l in $(LANG_LIST) ; do \
+                $(WS_TOOLS)/userland-fetch --file $$l.xpi --url $(MOZILLA_FTP)/linux-i686/xpi/ ; \
+        done ; )
+
+include $(WS_MAKE_RULES)/prep.mk
+include $(WS_MAKE_RULES)/configure.mk
+include $(WS_MAKE_RULES)/ips.mk
+
+# /usr/sbin needed for dtrace.
+PATH =         /usr/gnu/bin:/usr/bin:/usr/sbin
+
+COMPONENT_PRE_CONFIGURE_ACTION += \
+	echo "mk_add_options BUILD_OFFICIAL=1" > .mozconfig ; \
+	echo "mk_add_options MOZILLA_OFFICIAL=1" >> .mozconfig ; \
+	echo "ac_add_options --prefix=/usr" >> .mozconfig ; \
+	echo "ac_add_options --libdir=/usr/lib" >> .mozconfig ; \
+	echo "ac_add_options --mandir=/usr/share/man" >> .mozconfig ; \
+	echo "ac_add_options --disable-debug" >> .mozconfig ; \
+	echo "ac_add_options --enable-optimize" >> .mozconfig ; \
+	echo "ac_add_options --disable-tests" >> .mozconfig ; \
+	echo "ac_add_options --with-system-libevent" >> .mozconfig ; \
+	echo "ac_add_options --with-system-zlib" >> .mozconfig ; \
+	echo "ac_add_options --with-system-bz2" >> .mozconfig ; \
+	echo "ac_add_options --enable-system-ffi" >> .mozconfig ; \
+	echo "ac_add_options --enable-system-sqlite" >> .mozconfig ; \
+	echo "ac_add_options --enable-libxul" >> .mozconfig ; \
+	echo "ac_add_options --enable-jemalloc" >> .mozconfig ; \
+	echo "ac_add_options --enable-official-branding" >> .mozconfig ; \
+	echo "ac_add_options --disable-updater" >> .mozconfig ; \
+	echo "ac_add_options --enable-update-packaging" >> .mozconfig ; \
+	echo "ac_add_options --enable-ipc" >> .mozconfig ; \
+	echo "ac_add_options --with-system-zlib" >> .mozconfig ; \
+	echo "ac_add_options --with-system-bz2" >> .mozconfig ; \
+	echo "ac_add_options --enable-gstreamer" >> .mozconfig ; \
+	echo "ac_add_options --enable-system-pixman" >> .mozconfig ; \
+	echo "ac_add_options --without-intl-api" >> .mozconfig ; \
+	echo "ac_add_options --disable-crashreporter" >> .mozconfig ; \
+	echo "ac_add_options --enable-debug-symbols=no" >> .mozconfig ; \
+	echo "ac_add_options --enable-calendar" >> .mozconfig ; \
+	echo "ac_add_options --enable-startup-notification" >> .mozconfig ;
+
+CXXFLAGS += 		-Wno-invalid-offsetof
+
+CONFIGURE_ENV +=	PKG_CONFIG_PATH=$(CONFIGURE_LIBDIR.$(BITS))/pkgconfig
+CONFIGURE_ENV +=	OS_DEFINES="-D__USE_LEGACY_PROTOTYPES__"
+CONFIGURE_ENV +=	LDFLAGS="-z ignore"
+
+CONFIGURE_ENV +=	MOZCONFIG=$(shell pwd)/.mozconfig
+CONFIGURE_ENV +=	"CC=$(CC)"
+CONFIGURE_ENV +=	"CXX=$(CXX)"
+CONFIGURE_ENV += 	"CFLAGS=$(CFLAGS)"
+CONFIGURE_ENV +=	"CXXFLAGS=$(CXXFLAGS)"
+
+# If the configure options are not explicitly set, then configure fails with:
+# configure: warning: CC=/usr/gcc/4.8/bin/gcc: invalid host type
+# invalid host type
+# configure: warning: CXX=/usr/gcc/4.8/bin/gcc: invalid host type
+# invalid host type
+# configure: error: can only configure for one host and one target at a time
+CONFIGURE_OPTIONS = --prefix=$(CONFIGURE_PREFIX)
+CONFIGURE_OPTIONS += --mandir=$(CONFIGURE_MANDIR)
+
+COMPONENT_POST_BUILD_ACTION = \
+        (cd $(@D)/mail/installer ; $(ENV) $(COMPONENT_BUILD_ENV) \
+                $(GMAKE) $(COMPONENT_BUILD_ARGS) $(COMPONENT_BUILD_TARGETS))
+
+COMPONENT_POST_INSTALL_ACTION += \
+	$(CP) $(BUILD_DIR_32)/mozilla/dist/thunderbird/precomplete \
+		$(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/precomplete ;
+
+COMPONENT_POST_INSTALL_ACTION += \
+	$(CP) -r $(BUILD_DIR_32)/mozilla/dist/bin/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} \
+		$(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/extensions/{e2fda1a4-762b-4020-b5ad-a41df1933103} ;
+
+COMPONENT_POST_INSTALL_ACTION += \
+        list1='$(LANG_LIST)' ; for f in $$list1 ; do \
+            $(CP) xpi/$$f.xpi \
+                $(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/extensions/[email protected] ; \
+        done ;
+
+LIB_LIST.i386 =
+LIB_LIST.sparc = $(PROTOUSRLIBDIR)/thunderbird-devel-$(COMPONENT_VERSION)/sdk/lib/cpu/sparcv8plus/libnspr_flt4.so
+LIB_LIST = $(LIB_LIST.$(MACH))
+
+COMPONENT_POST_INSTALL_ACTION += \
+	slist='$(LIB_LIST)' ; for f in $$slist ; do \
+	    $(MKDIR) $(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/cpu/sparcv8plus ; \
+	    $(CP) $$f $(PROTOUSRLIBDIR)/thunderbird-$(COMPONENT_VERSION)/cpu/sparcv8plus/libnspr_flt4.so ; \
+	done ;
+
+ASLR_MODE =	$(ASLR_ENABLE)
+
+COMPONENT_TEST_DIR =    $(@D)/mozilla/js/src
+COMPONENT_TEST_TARGETS=check-jit-test
+COMPONENT_TEST_TRANSFORMS += \
+        '-e "/\(^TEST-PASS\).*/d" '
+
+configure:	$(CONFIGURE_32)
+
+build:          $(BUILD_32)
+
+install:        $(INSTALL_32)
+
+test:           $(TEST_32)
+
+system-test:    $(NO_TESTS)
+
+REQUIRED_PACKAGES += compress/bzip2
+REQUIRED_PACKAGES += database/sqlite-3
+REQUIRED_PACKAGES += library/desktop/atk
+REQUIRED_PACKAGES += library/desktop/cairo
+REQUIRED_PACKAGES += library/desktop/gdk-pixbuf
+REQUIRED_PACKAGES += library/desktop/gtk2
+REQUIRED_PACKAGES += library/desktop/pango
+REQUIRED_PACKAGES += library/glib2
+REQUIRED_PACKAGES += library/gnome/gnome-libs
+REQUIRED_PACKAGES += library/graphics/pixman
+REQUIRED_PACKAGES += library/libevent
+REQUIRED_PACKAGES += library/libffi
+REQUIRED_PACKAGES += library/samba/libsmbclient
+REQUIRED_PACKAGES += library/zlib
+REQUIRED_PACKAGES += system/library
+REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
+REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
+REQUIRED_PACKAGES += system/library/fontconfig
+REQUIRED_PACKAGES += system/library/freetype-2
+REQUIRED_PACKAGES += system/library/libdbus
+REQUIRED_PACKAGES += system/library/libdbus-glib
+REQUIRED_PACKAGES += system/library/math
+REQUIRED_PACKAGES += x11/library/libx11
+REQUIRED_PACKAGES += x11/library/libxext
+REQUIRED_PACKAGES += x11/library/libxrender
+REQUIRED_PACKAGES += x11/library/toolkit/libxt
Binary file components/desktop/thunderbird/files/thunderbird-icon.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/files/thunderbird.1	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,225 @@
+'\" te
+.TH thunderbird 1 "8 Jun 2006" "SunOS 5.12" "User Commands"
+.SH "NAME"
+thunderbird \- Thunderbird for 
+Sun Java Desktop System
+.SH "SYNOPSIS"
+.PP
+\fBthunderbird\fR [\fBoptions \&.\&.\&. \fR] [\fBurl\fR]
+.SH "DESCRIPTION"
+.PP
+Thunderbird is a free, open-source mail client based on the Mozilla codebase\&.
+It is a robust and easy to use client,similar to competing products like other mail
+client, but with some major advantages such as junk mail classification\&.
+.SH "OPTIONS"
+.PP
+The following options are supported:
+.sp
+.ne 2
+.mk
+\fB-\fBheight \fIvalue\fR\fR\fR
+.in +24n
+.rt
+Set the height of startup window to \fIvalue\fR\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBh \fRor -\fBhelp \fR\fR
+.in +24n
+.rt
+Display the help message\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBwidth \fIvalue\fR\fR\fR
+.in +24n
+.rt
+Set the width of startup window to \fIvalue\fR\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBv \fRor -\fBversion \fR\fR
+.in +24n
+.rt
+Display the version message\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBP \fIprofile\fR\fR\fR
+.in +24n
+.rt
+Start with the profile named: \fIprofile\fR\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBProfileManager \fR\fR
+.in +24n
+.rt
+Start with profile manager\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBUILocale \fIlocale\fR\fR\fR
+.in +24n
+.rt
+Start with the UI Locale listed: \fIlocale\fR\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBcontentLocale \fIlocale\fR\fR\fR
+.in +24n
+.rt
+Start with the content Locale listed: \fIlocale\fR\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBjsconsole \fR\fR
+.in +24n
+.rt
+Open the JavaScript console\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBaddressbook \fR\fR
+.in +24n
+.rt
+Open the address book at startup\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBcompose \fR\fR
+.in +24n
+.rt
+Compose a mail or news message\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBmail \fR\fR
+.in +24n
+.rt
+Open the mail folder view\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBoptions \fR\fR
+.in +24n
+.rt
+Open the options dialog\&.
+.sp
+.sp 1
+.in -24n
+.sp
+.ne 2
+.mk
+\fB-\fBnews \fR\fR
+.in +24n
+.rt
+Open the news client\&.
+.sp
+.sp 1
+.in -24n
+.SH "EXAMPLES"
+.PP
+\fBExample 1: Launching Thunderbird\fR
+.PP
+.PP
+.nf
+example% \fBthunderbird \fR
+.fi
+.SH "EXIT STATUS"
+.PP
+The following exit values are returned:
+.sp
+.ne 2
+.mk
+\fB\fB0\fR\fR
+.in +9n
+.rt
+Application
+exited successfully
+.sp
+.sp 1
+.in -9n
+.sp
+.ne 2
+.mk
+\fB\fB1\fR\fR
+.in +9n
+.rt
+Application
+exited with failure
+.sp
+.sp 1
+.in -9n
+.SH "FILES"
+.PP
+The following files are used by this application:
+.sp
+.ne 2
+.mk
+\fB\fB/usr/bin/thunderbird\fR \fR
+.in +32n
+.rt
+Executable for Thunderbird application
+.sp
+.sp 1
+.in -32n
+.sp
+.ne 2
+.mk
+\fB\fB$HOME/\&.mozilla/thunderbird\fR \fR
+.in +32n
+.rt
+User configuration files for Thunderbird
+.sp
+.sp 1
+.in -32n
+.SH "SEE ALSO"
+.PP
+For more information about thunderbird, please refer to
+\fBhttp://www\&.mozilla\&.org/thunderbird\fR
+.PP
+Refer to Help->Mozilla Thunderbird Help for more information\&.
+.SH "NOTES"
+.PP
+Updated by Leon Sha, Sun Microsystems Inc\&., 2006\&. 
+...\" created by instant / solbook-to-man, Tue 27 Jan 2015, 17:23
+...\" LSARC 2006/237 Thunderbird 1.5
+...\" LSARC 2006/693 Thunderbird 2 for Solaris Nevada and Solaris10 Update
+...\" LSARC 2009/085 Thunderbird 3.0.x
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/files/thunderbird.desktop	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,38 @@
+[Desktop Entry]
+Encoding=UTF-8
+Name=Thunderbird Mail/Calendar
+Name[cz]=Thunderbird - Pošta/Kalendář 
+Name[de]= Thunderbird - E-Mail/Kalender
+Name[es]=Correo y Agenda de Thunderbird 
+Name[fr]=Messagerie/Calendrier Thunderbird
+Name[it]=Posta e gruppi di discussione Thunderbird
+Name[ja]=Thunderbird メール/カレンダー
+Name[ko]=Thunderbird 메일/캘린더 
+Name[pl]=Thunderbird Poczta/Kalendarz
+Name[pt_BR]=Correio/Agenda Thunderbird
+Name[ru]=Thunderbird Почта/Календарь
+Name[sv]=Thunderbird Post/Kalender 
+Name[zh_CN]=Thunderbird 邮件/日历 
+Name[zh_TW]=Thunderbird 郵件/行事曆 
+GenericName=Email
+Comment=Read email, blogs and usenet newsgroups and calendar
+Comment[cz]=Čtení pošty, blogů, diskuzních skupin a kalendáře
+Comment[de]=Lesen von E-Mails, Blogs, Newsgroup und Kalender
+Comment[es]=Consultar correo electrónico, blogs, grupos de noticias Usenet y la agenda
+Comment[fr]=Consulter les e-mails, blogs, forums de discussion Usenet et le calendrier
+Comment[it]=Consulta posta elettronica, blog, gruppi di discussione e agenda 
+Comment[ja]=電子メール、ブログ、usenet ニュースグループ、カレンダを見る
+Comment[ko]=전자 메일, 블로그, 유즈넷 뉴스그룹 및 캘린더 읽기 
+Comment[pl]=Czytanie wiadomości, blogów, grup dyskusyjnych oraz kalendarza 
+Comment[pt_BR]=Ver e-mails, blogs, fóruns de discussão da Usenet e agenda 
+Comment[ru]=Чтение почты, просмотр блогов, новостных групп usenet и календаря
+Comment[sv]=Läs e-post, bloggar, usenet-diskussionsgrupper och kalender
+Comment[zh_CN]=阅读电子邮件、博客、usenet 新闻组,查阅日历
+Comment[zh_TW]=讀取電子郵件、部落格、Usenet 新聞群組以及行事曆
+TryExec=/usr/bin/thunderbird
+Exec=/usr/bin/thunderbird
+Icon=thunderbird-icon
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Application;Network;X-Sun-Quick-Start;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox100-39-cairo-perf.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,32 @@
+This enables tracking of ARGB values for image masks, since some machines do
+not use ARGB values.
+See Mozilla bug #716462 - Performance regression with xBGR visual and no
+RENDER extension.
+We would like to try to get this upstream in the future.
+--- comm-esr31/mozilla/gfx/cairo/cairo/src/cairo-xlib-surface.c.orig	2015-06-04 17:42:51.419088049 -0700
++++ comm-esr31/mozilla/gfx/cairo/cairo/src/cairo-xlib-surface.c	2015-06-04 17:42:51.424665839 -0700
[email protected]@ -2325,6 +2325,7 @@
+ 			   cairo_region_t *clip_region)
+ {
+     cairo_image_surface_t *image;
++    cairo_format_masks_t image_masks;
+     cairo_rectangle_int_t extents;
+     cairo_status_t status;
+     int tx, ty;
[email protected]@ -2341,6 +2342,16 @@
+ 	    (image->base.content & CAIRO_CONTENT_ALPHA) == 0)))
+ 	return CAIRO_INT_STATUS_UNSUPPORTED;
+ 
++    if (image->base.backend->type == CAIRO_SURFACE_TYPE_IMAGE) {
++	if (_pixman_format_to_masks (image->pixman_format, &image_masks)) {
++	    if (! ((image_masks.alpha_mask == surface->a_mask || surface->a_mask == 0) &&
++		   (image_masks.red_mask   == surface->r_mask || surface->r_mask == 0) &&
++		   (image_masks.green_mask == surface->g_mask || surface->g_mask == 0) &&
++		   (image_masks.blue_mask  == surface->b_mask || surface->b_mask == 0)))
++		return CAIRO_INT_STATUS_UNSUPPORTED;
++	}
++    }
++
+     if (image->base.backend->type != CAIRO_SURFACE_TYPE_IMAGE) {
+ 	if (image->base.backend->type == CAIRO_INTERNAL_SURFACE_TYPE_SNAPSHOT) {
+ 	    image = (cairo_image_surface_t *) ((cairo_surface_snapshot_t *) image)->target;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox12-00-libnspr_flt4.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+This adds a library necessary for sparc.
+This will probably not be sent upstream because it would be difficult to
+add a sparc-only ifdef condition for this.
+
+--- comm-esr31/mozilla/browser/installer/package-manifest.in.orig	2015-06-04 17:42:52.445166224 -0700
++++ comm-esr31/mozilla/browser/installer/package-manifest.in	2015-06-04 17:42:52.450333944 -0700
[email protected]@ -741,6 +741,7 @@
+ bin/libfreebl_32fpu_3.so
+ bin/libfreebl_32int_3.so
+ bin/libfreebl_32int64_3.so
++bin/cpu/sparcv8plus/libnspr_flt4.so
+ #endif
+ 
+ ; [Updater]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox16-48-sparc-lea.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,21 @@
+Implements PolyIC for sparc.
+This is going away in the future so no need to send upstream.
+
+--- comm-esr31/mozilla/js/src/assembler/assembler/MacroAssemblerSparc.h.orig	2015-06-04 17:42:51.582947696 -0700
++++ comm-esr31/mozilla/js/src/assembler/assembler/MacroAssemblerSparc.h	2015-06-04 17:42:51.585565407 -0700
[email protected]@ -1005,9 +1005,12 @@
+ 
+         void lea(BaseIndex address, RegisterID dest)
+         {
+-            // lea only used by PolyIC.
+-            // PolyIC is not enabled for sparc now.
+-            ASSERT(0);
++            move(address.index, dest);
++            if (address.scale != 0)
++                lshift32(Imm32(address.scale), dest);
++            if (address.offset)
++                add32(Imm32(address.offset), dest);
++            add32(address.base, dest);
+         }
+ 
+         void add32(Imm32 imm, AbsoluteAddress address)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox18-93-libffi-sparc.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,87 @@
+This is already upstream in libffi, but not yet in Mozilla.
+
+--- comm-esr31/mozilla/js/src/ctypes/libffi/src/sparc/ffi.c.orig	2015-06-04 17:42:52.335127713 -0700
++++ comm-esr31/mozilla/js/src/ctypes/libffi/src/sparc/ffi.c	2015-06-04 17:42:52.343504239 -0700
[email protected]@ -406,8 +406,50 @@
+       /* We don't yet support calling 32bit code from 64bit */
+       FFI_ASSERT(0);
+ #else
+-      ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes, 
+-		  cif->flags, rvalue, fn);
++      if (rvalue && (cif->rtype->type == FFI_TYPE_STRUCT
++#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE  
++	  || cif->flags == FFI_TYPE_LONGDOUBLE
++#endif
++	  ))
++	{
++	  /* For v8, we need an "unimp" with size of returning struct */
++	  /* behind "call", so we alloc some executable space for it. */
++	  /* l7 is used, we need to make sure v8.S doesn't use %l7.   */
++	  unsigned int *call_struct = NULL;
++	  ffi_closure_alloc(32, &call_struct);
++	  if (call_struct)
++	    {
++	      unsigned long f = (unsigned long)fn;
++	      call_struct[0] = 0xae10001f;		 /* mov   %i7, %l7	 */
++	      call_struct[1] = 0xbe10000f;		 /* mov   %o7, %i7	 */
++	      call_struct[2] = 0x03000000 | f >> 10;     /* sethi %hi(fn), %g1	 */
++	      call_struct[3] = 0x9fc06000 | (f & 0x3ff); /* jmp %g1+%lo(fn), %o7 */
++	      call_struct[4] = 0x01000000;		 /* nop			 */
++	      if (cif->rtype->size < 0x7f)
++		call_struct[5] = cif->rtype->size;	 /* unimp		 */
++	      else
++		call_struct[5] = 0x01000000;	     	 /* nop			 */
++	      call_struct[6] = 0x81c7e008;		 /* ret			 */
++	      call_struct[7] = 0xbe100017;		 /* mov   %l7, %i7	 */
++	      asm volatile ("iflush %0; iflush %0+8; iflush %0+16; iflush %0+24" : : 
++			    "r" (call_struct) : "memory");
++	      /* SPARC v8 requires 5 instructions for flush to be visible */
++	      asm volatile ("nop; nop; nop; nop; nop");
++	      ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes,
++			  cif->flags, rvalue, call_struct);
++	      ffi_closure_free(call_struct);
++	    }
++	  else
++	    {
++	      ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes, 
++			  cif->flags, rvalue, fn);
++	    }
++	}
++      else
++	{
++	  ffi_call_v8(ffi_prep_args_v8, &ecif, cif->bytes, 
++		      cif->flags, rvalue, fn);
++	}
+ #endif
+       break;
+     case FFI_V9:
[email protected]@ -468,13 +510,13 @@
+   closure->fun = fun;
+   closure->user_data = user_data;
+ 
+-  /* Flush the Icache.  FIXME: alignment isn't certain, assume 8 bytes */
++  /* Flush the Icache.  closure is 8 bytes aligned */
+ #ifdef SPARC64
+-  asm volatile ("flush	%0" : : "r" (closure) : "memory");
+-  asm volatile ("flush	%0" : : "r" (((char *) closure) + 8) : "memory");
++  asm volatile ("flush	%0; flush %0+8" : : "r" (closure) : "memory");
+ #else
+-  asm volatile ("iflush	%0" : : "r" (closure) : "memory");
+-  asm volatile ("iflush	%0" : : "r" (((char *) closure) + 8) : "memory");
++  asm volatile ("iflush %0; iflush %0+8" : : "r" (closure) : "memory");
++  /* SPARC v8 requires 5 instructions for flush to be visible */
++  asm volatile ("nop; nop; nop; nop; nop");
+ #endif
+ 
+   return FFI_OK;
+--- comm-esr31/mozilla/js/src/ctypes/libffi/configure.orig	2015-06-04 17:42:52.338127066 -0700
++++ comm-esr31/mozilla/js/src/ctypes/libffi/configure	2015-06-04 17:42:52.344846571 -0700
[email protected]@ -12425,7 +12425,7 @@
+ 
+ case "$target" in
+      # Darwin 10 (OSX 10.6) and beyond allocate non-executable pages
+-     *-apple-darwin1* | *-*-freebsd* | *-*-openbsd* | *-pc-solaris*)
++     *-apple-darwin1* | *-*-freebsd* | *-*-openbsd* | *-*-solaris*)
+ 
+ $as_echo "#define FFI_MMAP_EXEC_WRIT 1" >>confdefs.h
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox20-24-stackwalk_compile.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,35 @@
+Adds an sp argument for the load_address() function. The sp argument is used
+in the NS_WalkStackCallback() function. This is to match a new argument
+that was added in the function for other platforms.
+See Mozilla bug #766579.
+Need more followup to fully understand.
+
+--- comm-esr31/mozilla/xpcom/base/nsStackWalk.cpp.orig	2015-06-04 17:42:51.321202120 -0700
++++ comm-esr31/mozilla/xpcom/base/nsStackWalk.cpp	2015-06-04 17:42:51.326394782 -0700
[email protected]@ -891,7 +891,7 @@
+ #include <sys/regset.h>
+ #include <sys/stack.h>
+ 
+-static int    load_address ( void * pc, void * arg );
++static int    load_address ( void * pc, void * sp, void * arg );
+ static struct bucket * newbucket ( void * pc );
+ static struct frame * cs_getmyframeptr ( void );
+ static void   cs_walk_stack ( void * (*read_func)(char * address),
[email protected]@ -966,7 +966,7 @@
+ 
+ 
+ static int
+-load_address(void * pc, void * arg)
++load_address(void * pc, void * sp, void * arg )
+ {
+     static struct bucket table[2048];
+     static mutex_t lock;
[email protected]@ -988,7 +988,7 @@
+     if (ptr->next) {
+         mutex_unlock(&lock);
+     } else {
+-        (args->callback)(pc, args->closure);
++        (args->callback)(pc, NULL, args->closure);
+         args->numFrames++;
+         if (args->maxFrames != 0 && args->numFrames == args->maxFrames)
+           stop = 1;   // causes us to stop getting frames
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox20-46-strcasestr.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,42 @@
+The strcasestr function is not available in Solaris 10, so this replaces it
+with an alternate function. This is not necessary for Solaris 12+.
+The 'uname' part is necessary because the uname() function returns a
+non-negative value.
+
+--- comm-esr31/mozilla/widget/xpwidgets/GfxInfoX11.cpp.orig	2015-06-04 17:42:51.546213832 -0700
++++ comm-esr31/mozilla/widget/xpwidgets/GfxInfoX11.cpp	2015-06-04 17:42:51.548646551 -0700
[email protected]@ -12,6 +12,7 @@
+ #include <sys/utsname.h>
+ #include "nsCRTGlue.h"
+ #include "prenv.h"
++#include "plstr.h"
+ 
+ #include "GfxInfoX11.h"
+ 
[email protected]@ -135,7 +136,7 @@
+     // only useful for Linux kernel version check for FGLRX driver.
+     // assumes X client == X server, which is sad.
+     struct utsname unameobj;
+-    if (!uname(&unameobj))
++    if (uname(&unameobj) >= 0)
+     {
+       mOS.Assign(unameobj.sysname);
+       mOSRelease.Assign(unameobj.release);
[email protected]@ -210,13 +211,13 @@
+         // with Mesa, the version string contains "Mesa major.minor" and that's all the version information we get:
+         // there is no actual driver version info.
+         whereToReadVersionNumbers = Mesa_in_version_string + strlen("Mesa");
+-        if (strcasestr(mVendor.get(), "nouveau"))
++        if (PL_strcasestr(mVendor.get(), "nouveau"))
+             mIsNouveau = true;
+-        if (strcasestr(mRenderer.get(), "intel")) // yes, intel is in the renderer string
++        if (PL_strcasestr(mRenderer.get(), "intel")) // yes, intel is in the renderer string
+             mIsIntel = true;
+-        if (strcasestr(mRenderer.get(), "llvmpipe"))
++        if (PL_strcasestr(mRenderer.get(), "llvmpipe"))
+             mIsLlvmpipe = true;
+-        if (strcasestr(mRenderer.get(), "software rasterizer"))
++        if (PL_strcasestr(mRenderer.get(), "software rasterizer"))
+             mIsOldSwrast = true;
+     } else if (strstr(mVendor.get(), "NVIDIA Corporation")) {
+         mIsNVIDIA = true;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox20-52-check_test.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,13 @@
+This patch is for testing. Potential for sending upstream.
+
+--- comm-esr31/mozilla/testing/runcppunittests.py.orig	2015-06-04 17:42:51.633983468 -0700
++++ comm-esr31/mozilla/testing/runcppunittests.py	2015-06-04 17:42:51.638876910 -0700
[email protected]@ -80,6 +80,8 @@
+         pathvar = ""
+         if mozinfo.os == "linux":
+             pathvar = "LD_LIBRARY_PATH"
++        if mozinfo.os == "unix":
++            pathvar = "LD_LIBRARY_PATH"
+         elif mozinfo.os == "mac":
+             pathvar = "DYLD_LIBRARY_PATH"
+         elif mozinfo.os == "win":
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox20-82-sqlite3-unix-excl.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,16 @@
+This provides the option to set the indicator for a NFS profile to true.
+It may be necessary for users on NFS to use bookmarks/logging.
+Needs further investigation, will probably be difficult to send upstream.
+
+--- comm-esr31/mozilla/browser/app/profile/firefox.js.orig	2015-06-04 17:42:52.206758105 -0700
++++ comm-esr31/mozilla/browser/app/profile/firefox.js	2015-06-04 17:42:52.212124280 -0700
[email protected]@ -1022,6 +1022,9 @@
+ // allow META refresh by default
+ pref("accessibility.blockautorefresh", false);
+ 
++// Whether profile is on NFS
++pref("storage.nfs_filesystem", true);
++
+ // Whether history is enabled or not.
+ pref("places.history.enabled", true);
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox21-49-hnjfile.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+This allows us to access some function from wchar.h that other platforms
+can get from stdio.h.
+Potentially send upstream with an ifdef Solaris statement.
+
+--- comm-esr31/mozilla/intl/hyphenation/src/hnjalloc.h.orig	2015-06-04 17:42:51.598696275 -0700
++++ comm-esr31/mozilla/intl/hyphenation/src/hnjalloc.h	2015-06-04 17:42:51.603672670 -0700
[email protected]@ -24,6 +24,7 @@
+  */
+ 
+ #include <stdio.h> /* ensure stdio.h is loaded before our macros */
++#include <wchar.h>
+ 
+ #undef FILE
+ #define FILE hnjFile
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox21-50-nsMathUtils.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+This allows us to get some function from math.h that other platforms are
+getting from ieeefp.h.
+Easy to send upstream since it already has ifdef statement.
+
+--- comm-esr31/mozilla/xpcom/ds/nsMathUtils.h.orig	2015-06-04 17:42:51.616409449 -0700
++++ comm-esr31/mozilla/xpcom/ds/nsMathUtils.h	2015-06-04 17:42:51.621339786 -0700
[email protected]@ -13,6 +13,7 @@
+ #include <float.h>
+ 
+ #ifdef SOLARIS
++#include <math.h>
+ #include <ieeefp.h>
+ #endif
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox22-76-skip_mozbuild_test.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,23 @@
+For testing. Runs the test from a different environment than the Mozilla
+default. Needs further investigation.
+
+--- comm-esr31/mozilla/python/mozbuild/mozbuild/test/test_mozconfig.py.orig	2015-06-04 17:42:52.122873933 -0700
++++ comm-esr31/mozilla/python/mozbuild/mozbuild/test/test_mozconfig.py	2015-06-04 17:42:52.133296079 -0700
[email protected]@ -477,5 +477,5 @@
+             self.assertEquals(e.exception.output, ['hello world'])
+ 
+ 
+-if __name__ == '__main__':
+-    main()
++#if __name__ == '__main__':
++#    main()
+--- comm-esr31/mozilla/python/mozbuild/mozbuild/test/test_base.py.orig	2015-06-04 17:42:52.128263022 -0700
++++ comm-esr31/mozilla/python/mozbuild/mozbuild/test/test_base.py	2015-06-04 17:42:52.133425656 -0700
[email protected]@ -393,5 +393,5 @@
+         self.assertEqual(p.srcdir_path(), "/src/foo/bar")
+         self.assertEqual(p.objdir_path(), "/src/obj/foo/bar")
+ 
+-if __name__ == '__main__':
+-    main()
++#if __name__ == '__main__':
++#    main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox22-79-gthread-dlopen.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,11 @@
+--- comm-esr31/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp.orig	2015-06-04 17:42:52.147539933 -0700
++++ comm-esr31/mozilla/xpcom/glue/standalone/nsXPCOMGlue.cpp	2015-06-04 17:42:52.152710273 -0700
[email protected]@ -418,6 +418,8 @@
+         }
+     }
+ 
++    static void* gthreadso = dlopen("libgthread-2.0.so.0", RTLD_GLOBAL | RTLD_LAZY);
++
+     GetFrozenFunctionsFunc sym =
+         (GetFrozenFunctionsFunc) GetSymbol(sTop->libHandle, LEADING_UNDERSCORE "NS_GetFrozenFunctions");
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox25-07-webaudio_math.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,20 @@
+--- comm-esr31/mozilla/content/media/webaudio/blink/DenormalDisabler.h.orig	2015-06-04 17:42:51.279492311 -0700
++++ comm-esr31/mozilla/content/media/webaudio/blink/DenormalDisabler.h	2015-06-04 17:42:51.288558769 -0700
[email protected]@ -27,6 +27,7 @@
+ 
+ #define _USE_MATH_DEFINES
+ #include <cmath>
++#include <math.h>
+ #include <float.h>
+ 
+ namespace WebCore {
+--- comm-esr31/mozilla/content/media/webaudio/ThreeDPoint.h.orig	2015-06-04 17:42:51.286104792 -0700
++++ comm-esr31/mozilla/content/media/webaudio/ThreeDPoint.h	2015-06-04 17:42:51.288664521 -0700
[email protected]@ -8,6 +8,7 @@
+ #define ThreeDPoint_h_
+ 
+ #include <cmath>
++#include <math.h>
+ #include <algorithm>
+ 
+ namespace mozilla {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox26-06-donot-delay-stopping-realplayer.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,26 @@
+See Mozilla bug #451007 - Reload page causing problems with
+RealPlayer/Helix plugin.
+We can potentially drop this patch since RealPlayer is no longer being
+supported.
+
+--- comm-esr31/mozilla/content/base/src/nsObjectLoadingContent.cpp.orig	2015-06-04 17:42:51.184423172 -0700
++++ comm-esr31/mozilla/content/base/src/nsObjectLoadingContent.cpp	2015-06-04 17:42:51.208745161 -0700
[email protected]@ -2744,7 +2744,8 @@
+               bool aDelayedStop)
+ {
+   // Don't delay stopping QuickTime (bug 425157), Flip4Mac (bug 426524),
+-  // XStandard (bug 430219), CMISS Zinc (bug 429604).
++  // XStandard (bug 430219), CMISS Zinc (bug 429604),
++  // RealPlayer/Helix (bug 451007).
+   if (aDelayedStop
+ #if !(defined XP_WIN || defined MOZ_X11)
+       && !aInstanceOwner->MatchPluginName("QuickTime")
[email protected]@ -2752,6 +2753,8 @@
+       && !aInstanceOwner->MatchPluginName("XStandard plugin")
+       && !aInstanceOwner->MatchPluginName("CMISS Zinc Plugin")
+ #endif
++      && !aInstanceOwner->MatchPluginName("RealPlayer")
++      && !aInstanceOwner->MatchPluginName("Helix")
+       ) {
+     nsCOMPtr<nsIRunnable> evt =
+       new nsStopPluginRunnable(aInstanceOwner, aContent);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox26-36-package_warning.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,16 @@
+Disables fatal warnings. Inside package-manifest.in, there is a sparc-specific
+line that we can't ifdef out. So we want to make sure this doesn't exit on
+an error for x86.  
+We will want to redo this patch with an ifdef for x86 vs sparc.
+
+--- comm-esr31/mozilla/browser/installer/Makefile.in.orig	2015-06-04 17:42:51.400825465 -0700
++++ comm-esr31/mozilla/browser/installer/Makefile.in	2015-06-04 17:42:51.405890984 -0700
[email protected]@ -12,7 +12,7 @@
+ MOZ_PKG_MANIFEST_P = $(srcdir)/package-manifest.in
+ # Some files have been already bundled with xulrunner
+ ifndef SYSTEM_LIBXUL
+-MOZ_PKG_FATAL_WARNINGS = 1
++#MOZ_PKG_FATAL_WARNINGS = 1
+ endif
+ 
+ DEFINES += -DAB_CD=$(AB_CD) -DMOZ_APP_NAME=$(MOZ_APP_NAME) -DPREF_DIR=$(PREF_DIR)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox26-99-LocalFileUnix.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+Another ifdef Solaris patch. Some function is defined in limits.h that other 
+platforms can get elsewhere.  
+Can potentially send upstream with ifdef Solaris statement.
+
+--- comm-esr31/mozilla/xpcom/io/nsLocalFileUnix.cpp.orig	2015-06-04 17:42:52.429921172 -0700
++++ comm-esr31/mozilla/xpcom/io/nsLocalFileUnix.cpp	2015-06-04 17:42:52.432611314 -0700
[email protected]@ -13,6 +13,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
++#include <limits.h>
+ #include <fcntl.h>
+ #include <errno.h>
+ #include <utime.h>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox27-206-build-config.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,29 @@
+This is used for Sun Studio because the depend files are different.
+Can potentially remove this patch, but need to investigate to see when
+link_deps is run.
+
+--- comm-esr31/mozilla/python/mozbuild/mozbuild/action/link_deps.py.orig	2015-06-04 17:42:52.548434964 -0700
++++ comm-esr31/mozilla/python/mozbuild/mozbuild/action/link_deps.py	2015-06-04 17:42:52.553642029 -0700
[email protected]@ -129,9 +129,9 @@
+             if deps:
+                 deps = list(self.normpaths(deps))
+                 for t in self.normpaths(rule.targets()):
+-                    if t in self._targets:
+-                        raise Exception('Found target %s in %s and %s'
+-                                        % (t, self._targets[t][0], depfile))
++#                   if t in self._targets:
++#                       raise Exception('Found target %s in %s and %s'
++#                                       % (t, self._targets[t][0], depfile))
+                     self._targets[t] = (depfile, deps)
+ 
+     def dump(self, fh, removal_guard=True):
[email protected]@ -216,7 +216,8 @@
+                               group=group,
+                               abspaths=opts.abspaths)
+     for f in opts.dependency_files:
+-        linker.add_dependencies(open(f))
++        if os.path.isfile(f):
++            linker.add_dependencies(open(f))
+ 
+     if opts.output:
+         out = open(opts.output, 'w')
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox27-47-uname.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,13 @@
+The uname() function on Solaris can return a non-negative value. 
+
+--- comm-esr31/mozilla/toolkit/components/startup/nsUserInfoUnix.cpp.orig	2015-06-04 17:42:51.565111934 -0700
++++ comm-esr31/mozilla/toolkit/components/startup/nsUserInfoUnix.cpp	2015-06-04 17:42:51.567398410 -0700
[email protected]@ -106,7 +106,7 @@
+     char *domainname = nullptr;
+ 
+     // is this portable?  that is a POSIX compliant call, but I need to check
+-    if (uname(&buf)) { 
++    if (uname(&buf) < 0) { 
+         return rv;
+     }
+ 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox27-67-ion_AsmJS_x86.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,14 @@
+REG_EIP is already defined elsewhere for Linux. 
+
+--- comm-esr31/mozilla/js/src/jit/AsmJSSignalHandlers.cpp.orig	2015-06-04 17:42:51.702781399 -0700
++++ comm-esr31/mozilla/js/src/jit/AsmJSSignalHandlers.cpp	2015-06-04 17:42:51.707794331 -0700
[email protected]@ -58,6 +58,9 @@
+ # define R14_sig(p) ((p)->sc_r14)
+ # define R15_sig(p) ((p)->sc_r15)
+ #elif defined(__linux__) || defined(SOLARIS)
++# if defined(SOLARIS)
++#  define REG_EIP EIP
++# endif
+ # if defined(__linux__)
+ #  define XMM_sig(p,i) ((p)->uc_mcontext.fpregs->_xmm[i])
+ #  define EIP_sig(p) ((p)->uc_mcontext.gregs[REG_EIP])
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox27-80-mftt_infinity.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,32 @@
+We use a different function from the one in ieeefp.h.
+This may be a studio specific patch. Need to investigate if this can be
+removed.
+
+--- comm-esr31/mozilla/mfbt/decimal/Decimal.cpp.orig	2015-06-04 17:42:52.191270749 -0700
++++ comm-esr31/mozilla/mfbt/decimal/Decimal.cpp	2015-06-04 17:42:52.193703088 -0700
[email protected]@ -33,6 +33,7 @@
+ 
+ #include <algorithm>
+ #include <float.h>
++#include <ieeefp.h>
+ 
+ using namespace moz_decimal_utils;
+ 
[email protected]@ -686,13 +687,13 @@
+ 
+ Decimal Decimal::fromDouble(double doubleValue)
+ {
+-    if (std::isfinite(doubleValue))
++    if (finite(doubleValue))
+         return fromString(mozToString(doubleValue));
+ 
+-    if (std::isinf(doubleValue))
+-        return infinity(doubleValue < 0 ? Negative : Positive);
++    if (isnand(doubleValue))
++        return nan();
+ 
+-    return nan();
++    return infinity(doubleValue < 0 ? Negative : Positive);
+ }
+ 
+ Decimal Decimal::fromString(const String& str)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox28-217-xpt-as-flag.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,36 @@
+We need the xptcstubsdef_asm file for Sun Studio, but not necessary for GCC.
+One of the files was placed in the wrong location and needs to be moved. This
+part can probably be sent upstream.
+
+--- comm-esr31/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in.orig	2015-06-04 17:42:52.626316900 -0700
++++ comm-esr31/mozilla/xpcom/reflect/xptcall/src/md/unix/Makefile.in	2015-06-04 17:42:52.636686080 -0700
[email protected]@ -98,6 +98,7 @@
+ 	  -e 's/^\(STUB_ENTRY\)(\([0-9][0-9]\))/\12\(\2\)/' \
+ 	  -e 's/^\(STUB_ENTRY\)(\([0-9][0-9][0-9]\))/\13\(\2\)/' \
+ 	$(DIST)/include/xptcstubsdef.inc > [email protected]
++ASFLAGS += -I.
+ ifeq (x86_64,$(OS_TEST))
+ ASFLAGS += -xarch=amd64
+ endif
+--- comm-esr31/mozilla/xpcom/reflect/xptcall/src/md/unix/moz.build.orig	2015-06-04 17:42:52.631590433 -0700
++++ comm-esr31/mozilla/xpcom/reflect/xptcall/src/md/unix/moz.build	2015-06-04 17:42:52.636848564 -0700
[email protected]@ -74,6 +74,9 @@
+                 'xptcstubs_gcc_x86_unix.cpp'
+             ]
+         else:
++            GENERATED_FILES = [
++                'xptcstubsdef_asm.solx86',
++            ]
+             SOURCES += [
+                 'xptcinvoke_asm_x86_solaris_SUNW.s',
+                 'xptcinvoke_x86_solaris.cpp',
[email protected]@ -273,9 +276,6 @@
+     ]
+ 
+ if CONFIG['OS_ARCH'] == 'SunOS' and CONFIG['OS_TEST'].find('86') == -1:
+-    GENERATED_FILES = [
+-        'xptcstubsdef_asm.solx86',
+-    ]
+     if CONFIG['HAVE_64BIT_OS']:
+         SOURCES += [
+             'xptcinvoke_sparcv9_solaris.cpp',
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox28-88-libvpx_compile.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,54 @@
+Can probably send upstream.
+
+--- comm-esr31/mozilla/media/libvpx/Makefile.in.orig	2015-06-04 17:42:52.225216512 -0700
++++ comm-esr31/mozilla/media/libvpx/Makefile.in	2015-06-04 17:42:52.235644957 -0700
[email protected]@ -8,6 +8,10 @@
+ AS_DASH_C_FLAG=$(VPX_DASH_C_FLAG)
+ ASM_SUFFIX=$(VPX_ASM_SUFFIX)
+ 
++ifeq ($(OS_TARGET),SunOS)
++ASFLAGS+=-DSOLARIS=1
++endif
++
+ ifdef VPX_ARM_ASM
+ # Building on an ARM platform with a supported assembler, include
+ # the optimized assembly in the build.
[email protected]@ -115,7 +119,7 @@
+ # Workaround a bug of Sun Studio (CR 6963410)
+ ifdef SOLARIS_SUNPRO_CC
+ ifeq (86,$(findstring 86,$(OS_TEST)))
+-filter.o: filter.c Makefile.in
++filter.o: vp8/common/filter.c Makefile.in
+ 	$(REPORT_BUILD)
+ 	@$(MAKE_DEPS_AUTO_CC)
+ 	$(CC) -o [email protected] -c $(patsubst -xO[45],-xO3,$(COMPILE_CFLAGS)) $<
+--- comm-esr31/mozilla/media/libvpx/vpx_ports/x86_abi_support.asm.orig	2015-06-04 17:42:52.233318593 -0700
++++ comm-esr31/mozilla/media/libvpx/vpx_ports/x86_abi_support.asm	2015-06-04 17:42:52.235792816 -0700
[email protected]@ -225,9 +225,13 @@
+   %ifdef CHROMIUM
+     %ifidn __OUTPUT_FORMAT__,macho32
+       %define HIDDEN_DATA(x) x:private_extern
++    %elifidn SOLARIS,1
++      %define HIDDEN_DATA(x) x:data hidden
+     %else
+       %define HIDDEN_DATA(x) x
+     %endif
++  %elifidn SOLARIS,1
++    %define HIDDEN_DATA(x) x:data hidden
+   %else
+     %define HIDDEN_DATA(x) x
+   %endif
[email protected]@ -244,9 +248,13 @@
+   %elifidn __OUTPUT_FORMAT__,macho64
+     %ifdef CHROMIUM
+       %define HIDDEN_DATA(x) x:private_extern
++    %elifidn SOLARIS,1
++      %define HIDDEN_DATA(x) x:data hidden
+     %else
+       %define HIDDEN_DATA(x) x
+     %endif
++  %elifidn SOLARIS,1
++    %define HIDDEN_DATA(x) x:data hidden
+   %else
+     %define HIDDEN_DATA(x) x
+   %endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/desktop/thunderbird/patches/firefox28-90-cubeb.patch	Mon Jan 11 09:27:45 2016 -0800
@@ -0,0 +1,543 @@
+For SunAudio audio playback. We need to investigate whether we care about
+this or whether we are just going to support PulseAudio.
+
+--- comm-esr31/mozilla/media/libcubeb/src/cubeb.c.orig	2015-06-04 17:42:52.252769663 -0700
++++ comm-esr31/mozilla/media/libcubeb/src/cubeb.c	2015-06-04 17:42:52.260965308 -0700
[email protected]@ -54,6 +54,9 @@
+ #if defined(USE_AUDIOTRACK)
+ int audiotrack_init(cubeb ** context, char const * context_name);
+ #endif
++#if defined(USE_SUN)
++int sunaudio_init(cubeb ** context, char const * context_name);
++#endif
+ 
+ int
+ validate_stream_params(cubeb_stream_params stream_params)
[email protected]@ -120,6 +123,9 @@
+ #if defined(USE_AUDIOTRACK)
+     audiotrack_init,
+ #endif
++#if defined(USE_SUN)
++    sunaudio_init,
++#endif
+   };
+   int i;
+ 
+--- comm-esr31/mozilla/media/libcubeb/src/cubeb_sun.c.orig	1969-12-31 16:00:00.000000000 -0800
++++ comm-esr31/mozilla/media/libcubeb/src/cubeb_sun.c	2015-06-04 17:42:52.261184916 -0700
[email protected]@ -0,0 +1,500 @@
++/*
++ * Copyright (c) 2013 Ginn Chen <[email protected]>
++ *
++ * This program is made available under an ISC-style license.  See the
++ * accompanying file LICENSE for details.
++ */
++#include <poll.h>
++#include <pthread.h>
++#include <stdlib.h>
++#include <stdio.h>
++#include <errno.h>
++#include <fcntl.h>
++#include <sys/audio.h>
++#include <sys/stat.h>
++#include <unistd.h>
++#include <sys/stropts.h>
++#include "cubeb/cubeb.h"
++#include "cubeb-internal.h"
++
++/* Macros copied from audio_oss.h */
++/*
++ * CDDL HEADER START
++ *
++ * The contents of this file are subject to the terms of the
++ * Common Development and Distribution License (the "License").
++ * You may not use this file except in compliance with the License.
++ *
++ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++ * or http://www.opensolaris.org/os/licensing.
++ * See the License for the specific language governing permissions
++ * and limitations under the License.
++ *
++ * When distributing Covered Code, include this CDDL HEADER in each
++ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++ * If applicable, add the following below this CDDL HEADER, with the
++ * fields enclosed by brackets "[]" replaced with your own identifying
++ * information: Portions Copyright [yyyy] [name of copyright owner]
++ *
++ * CDDL HEADER END
++ */
++/*
++ * Copyright (C) 4Front Technologies 1996-2008.
++ *
++ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
++ * Use is subject to license terms.
++ */
++#define OSSIOCPARM_MASK 0x1fff          /* parameters must be < 8192 bytes */
++#define OSSIOC_VOID     0x00000000      /* no parameters */
++#define OSSIOC_OUT      0x20000000      /* copy out parameters */
++#define OSSIOC_IN       0x40000000      /* copy in parameters */
++#define OSSIOC_INOUT    (OSSIOC_IN|OSSIOC_OUT)
++#define OSSIOC_SZ(t)    ((sizeof (t) & OSSIOCPARM_MASK) << 16)
++#define __OSSIO(x, y)           ((int)(OSSIOC_VOID|(x<<8)|y))
++#define __OSSIOR(x, y, t)       ((int)(OSSIOC_OUT|OSSIOC_SZ(t)|(x<<8)|y))
++#define __OSSIOWR(x, y, t)      ((int)(OSSIOC_INOUT|OSSIOC_SZ(t)|(x<<8)|y))
++#define SNDCTL_DSP_SPEED        __OSSIOWR('P', 2, int)
++#define SNDCTL_DSP_CHANNELS     __OSSIOWR('P', 6, int)
++#define SNDCTL_DSP_SETFMT       __OSSIOWR('P', 5, int)  /* Selects ONE fmt */
++#define SNDCTL_DSP_GETODELAY    __OSSIOR('P', 23, int)
++#define SNDCTL_DSP_HALT_OUTPUT  __OSSIO('P', 34)
++#define AFMT_S16_LE     0x00000010
++#define AFMT_S16_BE     0x00000020
++
++#if defined(WORDS_BIGENDIAN) || defined(__BIG_ENDIAN__)
++#define AFMT_S16_NE    AFMT_S16_BE
++#else
++#define AFMT_S16_NE    AFMT_S16_LE
++#endif
++
++#define DEFAULT_AUDIO_DEVICE "/dev/audio"
++#define DEFAULT_DSP_DEVICE   "/dev/dsp"
++
++#define BUF_SIZE_MS 10
++
++#if defined(CUBEB_SUNAUDIO_DEBUG)
++#define DPR(...) fprintf(stderr, __VA_ARGS__);
++#else
++#define DPR(...) do {} while(0)
++#endif
++
++static struct cubeb_ops const sunaudio_ops;
++
++struct cubeb {
++  struct cubeb_ops const * ops;
++};
++
++struct cubeb_stream {
++  cubeb * context;
++  pthread_t th;			  /* to run real-time audio i/o */
++  pthread_mutex_t mutex;	  /* protects fd and frm_played */
++  int fd;			  /* link us to sunaudio */
++  int active;			  /* cubec_start() called */
++  int conv;			  /* need float->s16 conversion */
++  int using_oss;
++  unsigned char *buf;		  /* data is prepared here */
++  unsigned int rate;
++  unsigned int n_channles;
++  unsigned int bytes_per_c