diff -Nurb 000__VANILLA/MAKE_INSTALL.sh 001__PORTED/MAKE_INSTALL.sh
--- 000__VANILLA/MAKE_INSTALL.sh	1970-01-01 01:00:00.000000000 +0100
+++ 001__PORTED/MAKE_INSTALL.sh	2015-11-11 04:14:08.466918574 +0100
@@ -0,0 +1,39 @@
+#!/bin/bash
+#
+#*
+#* CDDL HEADER START
+#*
+#* The contents of this file are subject to the terms of the
+#* Common Development and Distribution License, Version 1.0 only
+#* (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 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
+export PATH=/opt/csw/gcc4/bin:/opt/csw/bin:/usr/gnu/bin:/usr/sfw/bin:/usr/bin:/usr/openwin/bin:/usr/ucb
+export FFvers=`/bin/cat /tmp/FFvers`
+
+cd firefox-${FFvers}/RELEASE_BUILD
+echo "\n\ngmake install can only be run as superuser via sudo."
+echo "Please authenticate yourself ... :\n"
+echo "(you may need to add the following line with visudo to /etc/sudoers and rerun ./MAKE_INSTALL.sh:)\n"
+echo "yourusername	ALL=(ALL) NOPASSWD: ALL\n"
+mkdir -p ../../log
+sudo -u root gmake install |tee ../../log/004__GMAKE__FF${FFvers}_OpenSolaris_x86_x64_INSTALL_AS_SUPERUSER-LOG.txt
+
diff -Nurb 000__VANILLA/MAKE_WORLD.sh 001__PORTED/MAKE_WORLD.sh
--- 000__VANILLA/MAKE_WORLD.sh	1970-01-01 01:00:00.000000000 +0100
+++ 001__PORTED/MAKE_WORLD.sh	2015-11-11 04:09:23.051716078 +0100
@@ -0,0 +1,73 @@
+#!/bin/bash
+#
+#*
+#* CDDL HEADER START
+#*
+#* The contents of this file are subject to the terms of the
+#* Common Development and Distribution License, Version 1.0 only
+#* (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 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
+export FFvers=43.0b3
+set -- `getopt v: "$@"`
+[ $# -lt 1 ] && exit 1	# getopt failed
+while [ $# -gt 0 ]
+do
+    case "$1" in
+	-v)	export FFvers="$2"; shift;;
+	--)	shift; break;;
+	-*)
+                echo >&2 \
+		"usage: $0 [-v FFvers] (default: 43.0b3) ..."
+		exit 1;;
+	*)	break;;		# terminate while loop
+    esac
+    shift
+done
+export PATH=/opt/csw/gcc4/bin:/opt/csw/bin:/usr/gnu/bin:/usr/sfw/bin:/usr/bin:/usr/openwin/bin:/usr/ucb
+/bin/echo ${FFvers}>/tmp/FFvers
+export FFvers=`/bin/cat /tmp/FFvers`
+export SRC=firefox-${FFvers}.source.tar.xz
+
+if [ -e ${SRC} ];
+then
+   echo "SRC archive ${SRC} already there, nothing to do."
+else
+   wget https://ftp.mozilla.org/pub/firefox/releases/${FFvers}/source/${SRC} --no-check-certificate
+fi
+
+PATH=/usr/local/bin:$PATH gtar xvfJ ./${SRC}
+mkdir -p ./log
+if [ -e firefox-${FFvers} ];
+then
+   rm -f firefox-beta;ln -s firefox-${FFvers} firefox-beta
+fi
+gpatch -p1<./FF${FFvers}_OpenSolaris_x86_x64.patch&>log/000__GPATCH__FF${FFvers}_OpenSolaris_x86_x64__SXCE_snv-130-LOG.txt
+cd firefox-${FFvers}
+mkdir RELEASE_BUILD
+cd RELEASE_BUILD
+set&>../../log/001__ENV-LOG.txt
+uname -a >>../../log/001__ENV-LOG.txt
+bash ../x05CONFIGURE__NONDEBUG.sh&>../../log/002__CONFIGURE__FF${FFvers}_OpenSolaris_x86_x64-LOG.txt
+gmake &>../../log/003__GMAKE__FF${FFvers}_OpenSolaris_x86_x64-LOG.txt
+gmake install &>../../log/004__GMAKE__FF${FFvers}_OpenSolaris_x86_x64_INSTALL_AS_SUPERUSER-LOG.txt
+
+diff -Nurb 000__VANILLA/firefox-beta/browser/installer/package-manifest.in 001__PORTED/firefox-beta/browser/installer/package-manifest.in
--- 000__VANILLA/firefox-beta/browser/installer/package-manifest.in	2015-11-09 23:55:53.000000000 +0100
+++ 001__PORTED/firefox-beta/browser/installer/package-manifest.in	2015-11-11 04:46:30.234444306 +0100
@@ -1,3 +1,8 @@
+;*
+;* Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+;* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+;*
+
 ; 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/.
@@ -810,13 +815,6 @@
 #endif
 #endif
 
-; for Solaris SPARC
-#ifdef SOLARIS
-bin/libfreebl_32fpu_3.so
-bin/libfreebl_32int_3.so
-bin/libfreebl_32int64_3.so
-#endif
-
 ; [Updater]
 ;
 #ifdef MOZ_UPDATER
diff -Nurb 000__VANILLA/firefox-beta/config/system-headers 001__PORTED/firefox-beta/config/system-headers
--- 000__VANILLA/firefox-beta/config/system-headers	2015-11-09 23:55:56.000000000 +0100
+++ 001__PORTED/firefox-beta/config/system-headers	2015-11-11 02:58:17.492081093 +0100
@@ -1064,7 +1064,6 @@
 sys/stat.h
 sys/statvfs.h
 sys/syscall.h
-sys/sysctl.h
 sys/sysinfo.h
 sys/sysmp.h
 sys/syssgi.h
diff -Nurb 000__VANILLA/firefox-beta/dom/canvas/WebGLFormats.cpp 001__PORTED/firefox-beta/dom/canvas/WebGLFormats.cpp
--- 000__VANILLA/firefox-beta/dom/canvas/WebGLFormats.cpp	2015-11-09 23:56:01.000000000 +0100
+++ 001__PORTED/firefox-beta/dom/canvas/WebGLFormats.cpp	2015-11-11 04:44:41.436550983 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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
@@ -136,7 +140,7 @@
     case UnsizedFormat::S:
         hasStencil = true;
         break;
-    case UnsizedFormat::DS:
+    case UnsizedFormat::XDS:
         hasDepth = true;
         hasStencil = true;
         break;
@@ -224,8 +228,8 @@
     AddFormatInfo(FOO(DEPTH_COMPONENT16 ), 2, UnsizedFormat::D , ComponentType::None);
     AddFormatInfo(FOO(DEPTH_COMPONENT24 ), 3, UnsizedFormat::D , ComponentType::None);
     AddFormatInfo(FOO(DEPTH_COMPONENT32F), 4, UnsizedFormat::D , ComponentType::None);
-    AddFormatInfo(FOO(DEPTH24_STENCIL8  ), 4, UnsizedFormat::DS, ComponentType::None);
-    AddFormatInfo(FOO(DEPTH32F_STENCIL8 ), 5, UnsizedFormat::DS, ComponentType::None);
+    AddFormatInfo(FOO(DEPTH24_STENCIL8  ), 4, UnsizedFormat::XDS, ComponentType::None);
+    AddFormatInfo(FOO(DEPTH32F_STENCIL8 ), 5, UnsizedFormat::XDS, ComponentType::None);
 
     // GLES 3.0.4, p205-206, "Required Renderbuffer Formats"
     AddFormatInfo(FOO(STENCIL_INDEX8), 1, UnsizedFormat::S, ComponentType::None);
diff -Nurb 000__VANILLA/firefox-beta/dom/canvas/WebGLFormats.h 001__PORTED/firefox-beta/dom/canvas/WebGLFormats.h
--- 000__VANILLA/firefox-beta/dom/canvas/WebGLFormats.h	2015-11-09 23:56:01.000000000 +0100
+++ 001__PORTED/firefox-beta/dom/canvas/WebGLFormats.h	2015-11-11 04:44:14.706470478 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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
@@ -154,7 +158,7 @@
     A,
     D,
     S,
-    DS,
+    XDS,
 };
 
 // GLES 3.0.4 p114 Table 3.4
diff -Nurb 000__VANILLA/firefox-beta/dom/media/AudioStream.h 001__PORTED/firefox-beta/dom/media/AudioStream.h
--- 000__VANILLA/firefox-beta/dom/media/AudioStream.h	2015-11-09 23:56:07.000000000 +0100
+++ 001__PORTED/firefox-beta/dom/media/AudioStream.h	2015-11-11 04:43:51.521691999 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim:set ts=2 sw=2 sts=2 et cindent: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
@@ -17,6 +21,7 @@
 #include "mozilla/UniquePtr.h"
 #include "CubebUtils.h"
 #include "soundtouch/SoundTouchFactory.h"
+#include "soundtouch/SoundTouch.h"
 
 namespace mozilla {
 
diff -Nurb 000__VANILLA/firefox-beta/dom/plugins/base/npapi.h 001__PORTED/firefox-beta/dom/plugins/base/npapi.h
--- 000__VANILLA/firefox-beta/dom/plugins/base/npapi.h	2015-11-09 23:56:12.000000000 +0100
+++ 001__PORTED/firefox-beta/dom/plugins/base/npapi.h	2015-11-11 04:43:27.875790631 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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
@@ -283,7 +287,7 @@
  *   gcc 3.x generated vtables on UNIX and OSX are incompatible with
  *   previous compilers.
  */
-#if (defined(XP_UNIX) && defined(__GNUC__) && (__GNUC__ >= 3))
+#if (defined(XP_UNIX) && defined(__GNUC__) && (__GNUC__ == 3))
 #define _NP_ABI_MIXIN_FOR_GCC3 NP_ABI_GCC3_MASK
 #else
 #define _NP_ABI_MIXIN_FOR_GCC3 0
diff -Nurb 000__VANILLA/firefox-beta/dom/plugins/ipc/PluginModuleChild.cpp 001__PORTED/firefox-beta/dom/plugins/ipc/PluginModuleChild.cpp
--- 000__VANILLA/firefox-beta/dom/plugins/ipc/PluginModuleChild.cpp	2015-11-09 23:56:12.000000000 +0100
+++ 001__PORTED/firefox-beta/dom/plugins/ipc/PluginModuleChild.cpp	2015-11-11 04:42:58.979915241 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* vim: set sw=4 ts=4 et : */
 /* This Source Code Form is subject to the terms of the Mozilla Public
@@ -308,7 +312,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");
 
@@ -339,9 +343,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;
@@ -1882,7 +1888,7 @@
     AssertPluginThread();
     MOZ_ASSERT(mIsChrome);
 
-#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);
@@ -1927,7 +1933,7 @@
 #endif
 
     NPError result;
-#if defined(OS_LINUX) || defined(OS_BSD)
+#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_SOLARIS)
     result = mInitializeFunc(&sBrowserFuncs, &mFunctions);
 #elif defined(OS_WIN) || defined(OS_MACOSX)
     result = mInitializeFunc(&sBrowserFuncs);
diff -Nurb 000__VANILLA/firefox-beta/dom/plugins/ipc/PluginModuleChild.h 001__PORTED/firefox-beta/dom/plugins/ipc/PluginModuleChild.h
--- 000__VANILLA/firefox-beta/dom/plugins/ipc/PluginModuleChild.h	2015-11-09 23:56:12.000000000 +0100
+++ 001__PORTED/firefox-beta/dom/plugins/ipc/PluginModuleChild.h	2015-11-11 04:42:25.085941460 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: sw=4 ts=4 et :
  * This Source Code Form is subject to the terms of the Mozilla Public
@@ -284,7 +288,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;
diff -Nurb 000__VANILLA/firefox-beta/ipc/app/moz.build 001__PORTED/firefox-beta/ipc/app/moz.build
--- 000__VANILLA/firefox-beta/ipc/app/moz.build	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/app/moz.build	2015-11-11 04:48:03.629457619 +0100
@@ -1,3 +1,8 @@
+#*
+#* Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
@@ -118,3 +123,15 @@
         'binder',
         'utils',
     ]
+
+OS_LIBS += [
+         '$(DEPTH)/security/nss/lib/util/libnssutil3.so',
+         '$(DEPTH)/security/nss/lib/ssl/libssl3.so',
+         '$(DEPTH)/security/nss/lib/smime/libsmime3.so',
+         '$(DEPTH)/security/nss/lib/nss/libnss3.so',
+         '$(DEPTH)/config/external/sqlite/libmozsqlite3.so',
+         '$(DEPTH)/config/external/lgpllibs/liblgpllibs.so',
+         '-lsendfile',
+         '-last'
+   ]
+
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/chromium-config.mozbuild 001__PORTED/firefox-beta/ipc/chromium/chromium-config.mozbuild
--- 000__VANILLA/firefox-beta/ipc/chromium/chromium-config.mozbuild	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/chromium-config.mozbuild	2015-11-11 04:47:34.468768986 +0100
@@ -1,3 +1,8 @@
+#*
+#* Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
@@ -68,5 +73,11 @@
             'OS_BSD': 1,
         })
 
+    elif CONFIG['OS_ARCH'] == 'SunOS':
+        DEFINES.update({
+            'OS_SOLARIS': 1,
+            'OS_POSIX': 1,
+        })
+
     else:
         DEFINES['OS_LINUX'] = 1
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/moz.build 001__PORTED/firefox-beta/ipc/chromium/moz.build
--- 000__VANILLA/firefox-beta/ipc/chromium/moz.build	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/moz.build	2015-11-11 04:47:03.023810618 +0100
@@ -1,3 +1,8 @@
+#*
+#* Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
@@ -13,6 +18,7 @@
 os_openbsd = 0
 os_bsd = 0
 os_linux = 0
+os_solaris = 0
 
 if CONFIG['OS_ARCH'] == 'WINNT':
     os_win = 1
@@ -32,6 +38,8 @@
     elif CONFIG['OS_ARCH'] == 'OpenBSD':
         os_openbsd = 1
         os_bsd = 1
+    elif CONFIG['OS_ARCH'] == 'SunOS':
+	os_solaris = 1
     else:
         os_linux = 1
 
@@ -246,6 +254,23 @@
         ]
         LOCAL_INCLUDES += ['src/third_party/libevent/bsd']
 
+if os_solaris:
+    SOURCES += [
+	'src/base/atomicops_internals_x86_gcc.cc',
+	'src/base/idle_timer_none.cc',
+	'src/base/process_util_linux.cc',
+	'src/base/time_posix.cc',
+    ]
+    if CONFIG['MOZ_WIDGET_GTK']:
+	SOURCES += [
+            'src/base/message_pump_glib.cc',
+	]
+    if not CONFIG['MOZ_NATIVE_LIBEVENT']:
+	SOURCES += [
+            'src/third_party/libevent/devpoll.c',
+	]
+    LOCAL_INCLUDES += ['src/third_party/libevent/linux']
+
 ost = CONFIG['OS_TEST']
 if '86' not in ost and 'arm' not in ost and 'mips' not in ost:
     SOURCES += [
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/base/message_loop.cc 001__PORTED/firefox-beta/ipc/chromium/src/base/message_loop.cc
--- 000__VANILLA/firefox-beta/ipc/chromium/src/base/message_loop.cc	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/base/message_loop.cc	2015-11-11 04:41:51.712388429 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
@@ -19,7 +23,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
@@ -145,7 +149,7 @@
   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
   } else if (type_ == TYPE_IO) {
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/base/message_pump_glib.cc 001__PORTED/firefox-beta/ipc/chromium/src/base/message_pump_glib.cc
--- 000__VANILLA/firefox-beta/ipc/chromium/src/base/message_pump_glib.cc	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/base/message_pump_glib.cc	2015-11-11 04:41:28.072188302 +0100
@@ -1,9 +1,14 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 // Copyright (c) 2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
 #include "base/message_pump_glib.h"
 
+#include <unistd.h>
 #include <fcntl.h>
 #include <math.h>
 
@@ -128,6 +133,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_;
@@ -234,10 +245,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.
@@ -301,6 +311,10 @@
   // 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!";
   }
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/base/message_pump_libevent.cc 001__PORTED/firefox-beta/ipc/chromium/src/base/message_pump_libevent.cc
--- 000__VANILLA/firefox-beta/ipc/chromium/src/base/message_pump_libevent.cc	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/base/message_pump_libevent.cc	2015-11-11 04:41:03.966933389 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 // Copyright (c) 2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
@@ -6,6 +10,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
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/base/platform_thread.h 001__PORTED/firefox-beta/ipc/chromium/src/base/platform_thread.h
--- 000__VANILLA/firefox-beta/ipc/chromium/src/base/platform_thread.h	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/base/platform_thread.h	2015-11-11 04:40:34.815215762 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
@@ -25,6 +29,9 @@
 #if defined(OS_LINUX) || defined(OS_OPENBSD) || defined(__GLIBC__)
 #include <unistd.h>
 typedef pid_t PlatformThreadId;
+#elif defined(OS_SOLARIS)
+#include <sys/lwp.h>
+typedef lwpid_t PlatformThreadId;
 #elif defined(OS_BSD)
 #include <sys/types.h>
 typedef lwpid_t PlatformThreadId;
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/base/platform_thread_posix.cc 001__PORTED/firefox-beta/ipc/chromium/src/base/platform_thread_posix.cc
--- 000__VANILLA/firefox-beta/ipc/chromium/src/base/platform_thread_posix.cc	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/base/platform_thread_posix.cc	2015-11-11 04:40:08.527414731 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
@@ -10,7 +14,13 @@
 #if defined(OS_MACOSX)
 #include <mach/mach.h>
 #elif defined(OS_NETBSD)
+_Pragma("GCC visibility push(default)")
 #include <lwp.h>
+_Pragma("GCC visibility pop")
+#elif defined(OS_SOLARIS)
+_Pragma("GCC visibility push(default)")
+#include <sys/lwp.h>
+_Pragma("GCC visibility pop")
 #elif defined(OS_LINUX)
 #include <sys/syscall.h>
 #include <sys/prctl.h>
@@ -27,6 +37,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();
@@ -54,6 +70,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)
@@ -114,7 +132,8 @@
   pthread_setname_np(pthread_self(), "%s", (void *)name);
 #elif defined(OS_BSD) && !defined(__GLIBC__)
   pthread_set_name_np(pthread_self(), name);
-#else
+#elif !defined(OS_SOLARIS)
+  prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0);
 #endif
 }
 #endif // !OS_MACOSX
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/base/process_util.h 001__PORTED/firefox-beta/ipc/chromium/src/base/process_util.h
--- 000__VANILLA/firefox-beta/ipc/chromium/src/base/process_util.h	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/base/process_util.h	2015-11-11 04:39:22.965415698 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
@@ -17,7 +21,7 @@
 #ifndef STDOUT_FILENO
 #define STDOUT_FILENO 1
 #endif
-#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>
@@ -25,6 +29,10 @@
 #include <mach/mach.h>
 #endif
 
+#if defined(OS_SOLARIS)
+#define NAME_MAX 14
+#endif
+
 #include <map>
 #include <string>
 #include <vector>
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/base/process_util_posix.cc 001__PORTED/firefox-beta/ipc/chromium/src/base/process_util_posix.cc
--- 000__VANILLA/firefox-beta/ipc/chromium/src/base/process_util_posix.cc	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/base/process_util_posix.cc	2015-11-11 04:38:55.326186202 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 //* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
@@ -116,7 +120,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)
@@ -208,7 +212,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";
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/base/sys_info_posix.cc 001__PORTED/firefox-beta/ipc/chromium/src/base/sys_info_posix.cc
--- 000__VANILLA/firefox-beta/ipc/chromium/src/base/sys_info_posix.cc	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/base/sys_info_posix.cc	2015-11-11 04:38:19.299666009 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 // Copyright (c) 2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
@@ -119,7 +123,7 @@
 
 // static
 std::string SysInfo::OperatingSystemName() {
-  utsname info;
+  struct utsname info;
   if (uname(&info) < 0) {
     NOTREACHED();
     return "";
@@ -129,7 +133,7 @@
 
 // static
 std::string SysInfo::OperatingSystemVersion() {
-  utsname info;
+  struct utsname info;
   if (uname(&info) < 0) {
     NOTREACHED();
     return "";
@@ -139,7 +143,7 @@
 
 // static
 std::string SysInfo::CPUArchitecture() {
-  utsname info;
+  struct utsname info;
   if (uname(&info) < 0) {
     NOTREACHED();
     return "";
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/base/time.h 001__PORTED/firefox-beta/ipc/chromium/src/base/time.h
--- 000__VANILLA/firefox-beta/ipc/chromium/src/base/time.h	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/base/time.h	2015-11-11 04:37:56.089579002 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
@@ -62,6 +66,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;
@@ -224,6 +232,9 @@
   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);
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/base/time_posix.cc 001__PORTED/firefox-beta/ipc/chromium/src/base/time_posix.cc
--- 000__VANILLA/firefox-beta/ipc/chromium/src/base/time_posix.cc	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/base/time_posix.cc	2015-11-11 04:37:32.672493005 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
@@ -65,11 +69,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)
@@ -167,7 +173,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;
@@ -192,4 +198,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
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/build/build_config.h 001__PORTED/firefox-beta/ipc/chromium/src/build/build_config.h
--- 000__VANILLA/firefox-beta/ipc/chromium/src/build/build_config.h	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/build/build_config.h	2015-11-11 04:37:06.456569677 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
@@ -30,6 +34,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
@@ -45,7 +51,7 @@
 
 // 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
 
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/chrome/common/transport_dib.h 001__PORTED/firefox-beta/ipc/chromium/src/chrome/common/transport_dib.h
--- 000__VANILLA/firefox-beta/ipc/chromium/src/chrome/common/transport_dib.h	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/chrome/common/transport_dib.h	2015-11-11 04:36:35.796719710 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
@@ -13,7 +17,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
 
@@ -66,7 +70,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
@@ -96,7 +100,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);
@@ -107,7 +111,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
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/third_party/libevent/arc4random.c 001__PORTED/firefox-beta/ipc/chromium/src/third_party/libevent/arc4random.c
--- 000__VANILLA/firefox-beta/ipc/chromium/src/third_party/libevent/arc4random.c	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/third_party/libevent/arc4random.c	2015-11-11 04:36:11.632868848 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* Portable arc4random.c based on arc4random.c from OpenBSD.
  * Portable version by Chris Davis, adapted for Libevent by Nick Mathewson
  * Copyright (c) 2010 Chris Davis, Niels Provos, and Nick Mathewson
@@ -41,6 +45,8 @@
  * RC4 is a registered trademark of RSA Laboratories.
  */
 
+#include "build/build_config.h"
+
 #ifndef ARC4RANDOM_EXPORT
 #define ARC4RANDOM_EXPORT
 #endif
@@ -59,7 +65,7 @@
 #include <sys/param.h>
 #include <sys/time.h>
 #ifdef _EVENT_HAVE_SYS_SYSCTL_H
-#include <sys/sysctl.h>
+;//#include <sys/sysctl.h>
 #endif
 #endif
 #include <limits.h>
@@ -167,6 +173,10 @@
 }
 #endif
 
+#if defined (OS_SOLARIS)
+ #undef _EVENT_HAVE_SYS_SYSCTL_H
+#endif
+
 #if defined(_EVENT_HAVE_SYS_SYSCTL_H) && defined(_EVENT_HAVE_SYSCTL)
 #if _EVENT_HAVE_DECL_CTL_KERN && _EVENT_HAVE_DECL_KERN_RANDOM && _EVENT_HAVE_DECL_RANDOM_UUID
 #define TRY_SEED_SYSCTL_LINUX
diff -Nurb 000__VANILLA/firefox-beta/ipc/chromium/src/third_party/libevent/event.c 001__PORTED/firefox-beta/ipc/chromium/src/third_party/libevent/event.c
--- 000__VANILLA/firefox-beta/ipc/chromium/src/third_party/libevent/event.c	2015-11-09 23:55:51.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/chromium/src/third_party/libevent/event.c	2015-11-11 04:35:48.184109611 +0100
@@ -1,4 +1,8 @@
 /*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
+/*
  * Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
  * Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
  *
@@ -79,7 +83,7 @@
 extern const struct eventop pollops;
 #endif
 #ifdef _EVENT_HAVE_EPOLL
-extern const struct eventop epollops;
+//extern const struct eventop epollops;
 #endif
 #ifdef _EVENT_HAVE_WORKING_KQUEUE
 extern const struct eventop kqops;
@@ -100,7 +104,7 @@
 	&kqops,
 #endif
 #ifdef _EVENT_HAVE_EPOLL
-	&epollops,
+//	&epollops,
 #endif
 #ifdef _EVENT_HAVE_DEVPOLL
 	&devpollops,
@@ -2883,8 +2887,8 @@
 #endif
 	if (evsig_global_setup_locks_(enable_locks) < 0)
 		return -1;
-	if (evutil_secure_rng_global_setup_locks_(enable_locks) < 0)
-		return -1;
+//	if (evutil_secure_rng_global_setup_locks_(enable_locks) < 0)
+//		return -1;
 	return 0;
 }
 #endif
diff -Nurb 000__VANILLA/firefox-beta/ipc/glue/BrowserProcessSubThread.cpp 001__PORTED/firefox-beta/ipc/glue/BrowserProcessSubThread.cpp
--- 000__VANILLA/firefox-beta/ipc/glue/BrowserProcessSubThread.cpp	2015-11-09 23:55:52.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/glue/BrowserProcessSubThread.cpp	2015-11-11 04:35:23.287671466 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: sw=2 ts=8 et :
  */
@@ -25,9 +29,7 @@
 //  "Chrome_FileThread",  // FILE
 //  "Chrome_DBThread",  // DB
 //  "Chrome_HistoryThread",  // HISTORY
-#if defined(OS_LINUX)
   "Gecko_Background_X11Thread",  // BACKGROUND_X11
-#endif
 };
 
 /* static */ StaticMutex BrowserProcessSubThread::sLock;
@@ -36,9 +38,7 @@
 //  nullptr,  // FILE
 //  nullptr,  // DB
 //  nullptr,  // HISTORY
-#if defined(OS_LINUX)
   nullptr,  // BACKGROUND_X11
-#endif
 };
 
 BrowserProcessSubThread::BrowserProcessSubThread(ID aId) :
diff -Nurb 000__VANILLA/firefox-beta/ipc/glue/BrowserProcessSubThread.h 001__PORTED/firefox-beta/ipc/glue/BrowserProcessSubThread.h
--- 000__VANILLA/firefox-beta/ipc/glue/BrowserProcessSubThread.h	2015-11-09 23:55:52.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/glue/BrowserProcessSubThread.h	2015-11-11 04:34:59.567317448 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: sw=2 ts=8 et :
  */
@@ -28,12 +32,10 @@
       //FILE,
       //DB,
       //HISTORY,
-#if defined(OS_LINUX)
       // 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.
       BACKGROUND_X11,
-#endif
 
       // This identifier does not represent a thread.  Instead it counts
       // the number of well-known threads.  Insert new well-known
diff -Nurb 000__VANILLA/firefox-beta/ipc/glue/CrossProcessMutex_unimplemented.cpp 001__PORTED/firefox-beta/ipc/glue/CrossProcessMutex_unimplemented.cpp
--- 000__VANILLA/firefox-beta/ipc/glue/CrossProcessMutex_unimplemented.cpp	2015-11-09 23:55:52.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/glue/CrossProcessMutex_unimplemented.cpp	2015-11-11 04:34:35.444993495 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * 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
@@ -40,7 +44,6 @@
 CrossProcessMutex::ShareToProcess(base::ProcessId aTargetPid)
 {
   NS_RUNTIMEABORT("Cross-process mutices not allowed on this platform - woah! We should've aborted by now!");
-  return 0;
 }
 
 }
diff -Nurb 000__VANILLA/firefox-beta/ipc/glue/GeckoChildProcessHost.cpp 001__PORTED/firefox-beta/ipc/glue/GeckoChildProcessHost.cpp
--- 000__VANILLA/firefox-beta/ipc/glue/GeckoChildProcessHost.cpp	2015-11-09 23:55:52.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/glue/GeckoChildProcessHost.cpp	2015-11-11 04:34:11.629875105 +0100
@@ -1,10 +1,20 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  */
 /* 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/. */
 
-#include "GeckoChildProcessHost.h"
+#if defined(__sun__) || defined(__sun)
+_Pragma("GCC visibility push(default)")
+#endif
+ #include "GeckoChildProcessHost.h"
+#if defined(__sun__) || defined(__sun)
+_Pragma("GCC visibility pop")
+#endif
 
 #include "base/command_line.h"
 #include "base/string_util.h"
@@ -628,13 +638,16 @@
   // 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();
   }
-  // XPCOM may not be initialized in some subprocesses.  We don't want
+#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
   // (meaning that we don't need to set that up in the environment).
@@ -754,7 +767,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))
@@ -770,7 +783,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
@@ -789,6 +802,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);
 
diff -Nurb 000__VANILLA/firefox-beta/ipc/glue/MessageLink.cpp 001__PORTED/firefox-beta/ipc/glue/MessageLink.cpp
--- 000__VANILLA/firefox-beta/ipc/glue/MessageLink.cpp	2015-11-09 23:55:52.000000000 +0100
+++ 001__PORTED/firefox-beta/ipc/glue/MessageLink.cpp	2015-11-11 04:33:46.543611894 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: sw=4 ts=4 et :
  */
@@ -28,6 +32,10 @@
 #include "nsISupportsImpl.h"
 #include "nsXULAppAPI.h"
 
+#if defined(__sun__) || defined(__sun)
+#include <unistd.h>
+#endif
+
 using namespace mozilla;
 using namespace std;
 
@@ -350,7 +358,7 @@
         mExistingListener = mTransport->set_listener(this);
 #ifdef DEBUG
         if (mExistingListener) {
-            queue<Message> pending;
+            std::queue<Message> pending;
             mExistingListener->GetQueuedMessages(pending);
             MOZ_ASSERT(pending.empty());
         }
@@ -367,7 +375,7 @@
 {
     AssertIOThread();
 
-    queue<Message> pending;
+    std::queue<Message> pending;
     {
         MonitorAutoLock lock(*mChan->mMonitor);
 
diff -Nurb 000__VANILLA/firefox-beta/js/src/gc/Memory.cpp 001__PORTED/firefox-beta/js/src/gc/Memory.cpp
--- 000__VANILLA/firefox-beta/js/src/gc/Memory.cpp	2015-11-09 23:55:53.000000000 +0100
+++ 001__PORTED/firefox-beta/js/src/gc/Memory.cpp	2015-11-11 04:33:03.466178086 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
@@ -86,7 +90,7 @@
 void*
 TestMapAlignedPagesLastDitch(size_t size, size_t alignment)
 {
-    return MapAlignedPagesLastDitch(size, alignment);
+    ; //return MapAlignedPagesLastDitch(size, alignment);
 }
 
 
@@ -663,7 +667,7 @@
         return false;
 
     MOZ_ASSERT(OffsetFromAligned(p, pageSize) == 0);
-    int result = madvise(p, size, MADV_DONTNEED);
+    int result = posix_madvise(p, size, MADV_DONTNEED);
     return result != -1;
 }
 
diff -Nurb 000__VANILLA/firefox-beta/js/src/jsmath.cpp 001__PORTED/firefox-beta/js/src/jsmath.cpp
--- 000__VANILLA/firefox-beta/js/src/jsmath.cpp	2015-11-09 23:56:00.000000000 +0100
+++ 001__PORTED/firefox-beta/js/src/jsmath.cpp	2015-11-11 04:32:33.269260636 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
@@ -958,7 +962,7 @@
 {
 #if defined(__GLIBC__)
     sincos(x, sin, cos);
-#elif defined(HAVE_SINCOS)
+#elif defined(_HAVE_SINCOS)
     __sincos(x, sin, cos);
 #else
     *sin = js::math_sin_uncached(x);
diff -Nurb 000__VANILLA/firefox-beta/js/xpconnect/shell/moz.build 001__PORTED/firefox-beta/js/xpconnect/shell/moz.build
--- 000__VANILLA/firefox-beta/js/xpconnect/shell/moz.build	2015-11-09 23:56:10.000000000 +0100
+++ 001__PORTED/firefox-beta/js/xpconnect/shell/moz.build	2015-11-11 04:32:06.117730364 +0100
@@ -1,3 +1,8 @@
+#*
+#* Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
@@ -35,3 +40,14 @@
 CFLAGS += CONFIG['TK_CFLAGS']
 CXXFLAGS += CONFIG['TK_CFLAGS']
 OS_LIBS += CONFIG['TK_LIBS']
+
+OS_LIBS += [
+         '$(DEPTH)/security/nss/lib/util/libnssutil3.so',
+         '$(DEPTH)/security/nss/lib/ssl/libssl3.so',
+         '$(DEPTH)/security/nss/lib/smime/libsmime3.so',
+         '$(DEPTH)/security/nss/lib/nss/libnss3.so',
+         '$(DEPTH)/config/external/sqlite/libmozsqlite3.so',
+	 '$(DEPTH)/config/external/lgpllibs/liblgpllibs.so',
+         '-lsendfile',
+         '-last'
+   ]
diff -Nurb 000__VANILLA/firefox-beta/media/libcubeb/src/cubeb.c 001__PORTED/firefox-beta/media/libcubeb/src/cubeb.c
--- 000__VANILLA/firefox-beta/media/libcubeb/src/cubeb.c	2015-11-09 23:55:56.000000000 +0100
+++ 001__PORTED/firefox-beta/media/libcubeb/src/cubeb.c	2015-11-11 04:31:24.689920807 +0100
@@ -1,4 +1,8 @@
 /*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
+/*
  * Copyright © 2013 Mozilla Foundation
  *
  * This program is made available under an ISC-style license.  See the
@@ -56,6 +60,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)
@@ -122,6 +129,9 @@
 #if defined(USE_AUDIOTRACK)
     audiotrack_init,
 #endif
+#if defined(USE_SUN)
+    sunaudio_init,
+#endif
   };
   int i;
 
diff -Nurb 000__VANILLA/firefox-beta/media/libcubeb/src/cubeb_sun.c 001__PORTED/firefox-beta/media/libcubeb/src/cubeb_sun.c
--- 000__VANILLA/firefox-beta/media/libcubeb/src/cubeb_sun.c	1970-01-01 01:00:00.000000000 +0100
+++ 001__PORTED/firefox-beta/media/libcubeb/src/cubeb_sun.c	2015-11-11 04:30:48.171578872 +0100
@@ -0,0 +1,439 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
+/*
+ * Copyright (c) 2013 Ginn Chen <ginnchen@gmail.com>
+ *
+ * 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 struct cubeb_ops const sunaudio_ops = {
+  .init = sunaudio_init,
+  .get_backend_id = sunaudio_get_backend_id,
+  .destroy = sunaudio_destroy,
+  .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
+};
diff -Nurb 000__VANILLA/firefox-beta/media/libcubeb/src/moz.build 001__PORTED/firefox-beta/media/libcubeb/src/moz.build
--- 000__VANILLA/firefox-beta/media/libcubeb/src/moz.build	2015-11-09 23:55:56.000000000 +0100
+++ 001__PORTED/firefox-beta/media/libcubeb/src/moz.build	2015-11-11 04:30:04.794558372 +0100
@@ -1,3 +1,8 @@
+#*
+#* Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
@@ -41,6 +46,12 @@
         ]
     DEFINES['USE_AUDIOUNIT'] = True
 
+if CONFIG['OS_ARCH'] == 'SunOS':
+    SOURCES += [
+	'cubeb_sun.c',
+    ]
+    DEFINES['USE_SUN'] = True
+
 if CONFIG['OS_TARGET'] == 'WINNT':
     SOURCES += [
         'cubeb_resampler.cpp',
diff -Nurb 000__VANILLA/firefox-beta/media/libvpx/vpx_ports/x86_abi_support.asm 001__PORTED/firefox-beta/media/libvpx/vpx_ports/x86_abi_support.asm
--- 000__VANILLA/firefox-beta/media/libvpx/vpx_ports/x86_abi_support.asm	2015-11-09 23:55:58.000000000 +0100
+++ 001__PORTED/firefox-beta/media/libvpx/vpx_ports/x86_abi_support.asm	2015-11-11 04:29:26.094036788 +0100
@@ -1,3 +1,7 @@
+;/*
+;* Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+;* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+;*/
 ;
 ;  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
 ;
@@ -231,6 +235,11 @@
   %else
     %define HIDDEN_DATA(x) x
   %endif
+  %ifidn SOLARIS,1
+    %define HIDDEN_DATA(x) x:data hidden
+  %else
+  %define HIDDEN_DATA(x) x
+ %endif
 %else
   %macro GET_GOT 1
   %endmacro
diff -Nurb 000__VANILLA/firefox-beta/memory/mozalloc/mozalloc.cpp 001__PORTED/firefox-beta/memory/mozalloc/mozalloc.cpp
--- 000__VANILLA/firefox-beta/memory/mozalloc/mozalloc.cpp	2015-11-09 23:56:05.000000000 +0100
+++ 001__PORTED/firefox-beta/memory/mozalloc/mozalloc.cpp	2015-11-11 04:28:01.758090217 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: sw=4 ts=4 et :
  */
@@ -196,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_impl(const void *ptr);
+extern void jemalloc_stats(jemalloc_stats_t* stats);
+}
+//#endif
+ 
 #ifndef MOZ_STATIC_RUNTIME
 size_t
 moz_malloc_usable_size(void *ptr)
@@ -206,7 +218,22 @@
 #if defined(XP_DARWIN)
     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_impl(ptr);
+    else
+        return 0;
+//#else
+//    return malloc_usable_size_impl(ptr);
+//#endif
 #elif defined(XP_WIN)
     return _msize(ptr);
 #else
diff -Nurb 000__VANILLA/firefox-beta/memory/mozalloc/mozalloc_abort.cpp 001__PORTED/firefox-beta/memory/mozalloc/mozalloc_abort.cpp
--- 000__VANILLA/firefox-beta/memory/mozalloc/mozalloc_abort.cpp	2015-11-09 23:56:05.000000000 +0100
+++ 001__PORTED/firefox-beta/memory/mozalloc/mozalloc_abort.cpp	2015-11-11 04:27:36.734597408 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: sw=4 ts=4 et :
  */
@@ -68,7 +72,7 @@
 //
 // That segmentation fault will be interpreted as another bug by ASan and as a
 // result, ASan will just exit(1) instead of aborting.
-void abort(void)
+void std::abort(void)
 {
 #ifdef MOZ_WIDGET_ANDROID
     char msg[64] = {};
diff -Nurb 000__VANILLA/firefox-beta/mfbt/Poison.cpp 001__PORTED/firefox-beta/mfbt/Poison.cpp
--- 000__VANILLA/firefox-beta/mfbt/Poison.cpp	2015-11-09 23:56:05.000000000 +0100
+++ 001__PORTED/firefox-beta/mfbt/Poison.cpp	2015-11-11 04:27:10.386453594 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
@@ -129,7 +133,11 @@
 static bool
 ProbeRegion(uintptr_t aRegion, uintptr_t aSize)
 {
+#if !defined(__sun__)
   if (madvise(reinterpret_cast<void*>(aRegion), aSize, MADV_NORMAL)) {
+#else
+  if (posix_madvise(reinterpret_cast<void*>(aRegion), aSize, MADV_NORMAL)) {
+#endif
     return true;
   } else {
     return false;
diff -Nurb 000__VANILLA/firefox-beta/mfbt/decimal/Decimal.cpp 001__PORTED/firefox-beta/mfbt/decimal/Decimal.cpp
--- 000__VANILLA/firefox-beta/mfbt/decimal/Decimal.cpp	2015-11-09 23:56:05.000000000 +0100
+++ 001__PORTED/firefox-beta/mfbt/decimal/Decimal.cpp	2015-11-11 04:26:47.694174422 +0100
@@ -1,4 +1,8 @@
 /*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
+/*
  * Copyright (C) 2012 Google Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -33,6 +37,7 @@
 
 #include <algorithm>
 #include <float.h>
+#include <ieeefp.h>
 
 using namespace moz_decimal_utils;
 
@@ -686,13 +691,13 @@
 
 Decimal Decimal::fromDouble(double doubleValue)
 {
-    if (std::isfinite(doubleValue))
-        return fromString(mozToString(doubleValue));
+    if (isnand(doubleValue))
+        return nan();
 
-    if (std::isinf(doubleValue))
-        return infinity(doubleValue < 0 ? Negative : Positive);
+    if (finite(doubleValue))
+return fromString(mozToString(doubleValue));
 
-    return nan();
+        return infinity(doubleValue < 0 ? Negative : Positive);
 }
 
 Decimal Decimal::fromString(const String& str)
diff -Nurb 000__VANILLA/firefox-beta/mfbt/lz4.c 001__PORTED/firefox-beta/mfbt/lz4.c
--- 000__VANILLA/firefox-beta/mfbt/lz4.c	2015-11-09 23:56:05.000000000 +0100
+++ 001__PORTED/firefox-beta/mfbt/lz4.c	2015-11-11 04:26:21.344251245 +0100
@@ -1,4 +1,8 @@
 /*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
+/*
    LZ4 - Fast LZ compression algorithm
    Copyright (C) 2011-2014, Yann Collet.
    BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
@@ -878,7 +882,7 @@
                  )
 {
     /* Local Variables */
-    const BYTE* restrict ip = (const BYTE*) source;
+    const BYTE* ip = (const BYTE*) source;
     const BYTE* ref;
     const BYTE* const iend = ip + inputSize;
 
diff -Nurb 000__VANILLA/firefox-beta/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/TestSkewHandler.java.orig 001__PORTED/firefox-beta/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/TestSkewHandler.java.orig
--- 000__VANILLA/firefox-beta/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/TestSkewHandler.java.orig	2015-11-09 23:56:10.000000000 +0100
+++ 001__PORTED/firefox-beta/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/TestSkewHandler.java.orig	1970-01-01 01:00:00.000000000 +0100
@@ -1,67 +0,0 @@
-/* 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/. */
-
-package org.mozilla.gecko.fxa;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-import org.mozilla.gecko.background.fxa.SkewHandler;
-import org.mozilla.gecko.sync.net.BaseResource;
-
-import ch.boye.httpclientandroidlib.impl.cookie.DateUtils;
-
-public class TestSkewHandler {
-  public TestSkewHandler() {
-  }
-
-  @Test
-  public void testSkewUpdating() throws Throwable {
-    SkewHandler h = new SkewHandler("foo.com");
-    assertEquals(0L, h.getSkewInSeconds());
-    assertEquals(0L, h.getSkewInMillis());
-
-    long server = 1390101197865L;
-    long local = server - 4500L;
-    h.updateSkewFromServerMillis(server, local);
-    assertEquals(4500L, h.getSkewInMillis());
-    assertEquals(4L, h.getSkewInSeconds());
-
-    local = server;
-    h.updateSkewFromServerMillis(server, local);
-    assertEquals(0L, h.getSkewInMillis());
-    assertEquals(0L, h.getSkewInSeconds());
-
-    local = server + 500L;
-    h.updateSkewFromServerMillis(server, local);
-    assertEquals(-500L, h.getSkewInMillis());
-    assertEquals(0L, h.getSkewInSeconds());
-
-    String date = "Sat, 18 Jan 2014 19:16:52 PST";
-    long dateInMillis = 1390101412000L;              // Obviously this can differ somewhat due to precision.
-    long parsed = DateUtils.parseDate(date).getTime();
-    assertEquals(parsed, dateInMillis);
-
-    h.updateSkewFromHTTPDateString(date, dateInMillis);
-    assertEquals(0L, h.getSkewInMillis());
-    assertEquals(0L, h.getSkewInSeconds());
-
-    h.updateSkewFromHTTPDateString(date, dateInMillis + 1100L);
-    assertEquals(-1100L, h.getSkewInMillis());
-    assertEquals(Math.round(-1100L / 1000L), h.getSkewInSeconds());
-  }
-
-  public void testSkewSingleton() throws Exception {
-    SkewHandler h1 = SkewHandler.getSkewHandlerFromEndpointString("http://foo.com/bar");
-    SkewHandler h2 = SkewHandler.getSkewHandlerForHostname("foo.com");
-    SkewHandler h3 = SkewHandler.getSkewHandlerForResource(new BaseResource("http://foo.com/baz"));
-    assertTrue(h1 == h2);
-    assertTrue(h1 == h3);
-
-    SkewHandler.getSkewHandlerForHostname("foo.com").updateSkewFromServerMillis(1390101412000L, 1390001412000L);
-    final long actual = SkewHandler.getSkewHandlerForHostname("foo.com").getSkewInMillis();
-    assertEquals(100000000L, actual);
-  }
-}
diff -Nurb 000__VANILLA/firefox-beta/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/login/TestFxAccountLoginStateMachine.java.orig 001__PORTED/firefox-beta/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/login/TestFxAccountLoginStateMachine.java.orig
--- 000__VANILLA/firefox-beta/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/login/TestFxAccountLoginStateMachine.java.orig	2015-11-09 23:56:10.000000000 +0100
+++ 001__PORTED/firefox-beta/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/login/TestFxAccountLoginStateMachine.java.orig	1970-01-01 01:00:00.000000000 +0100
@@ -1,202 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-package org.mozilla.gecko.fxa.login;
-
-import java.security.NoSuchAlgorithmException;
-import java.util.LinkedList;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-import org.mozilla.gecko.background.fxa.FxAccountClient;
-import org.mozilla.gecko.background.fxa.FxAccountUtils;
-import org.mozilla.gecko.background.testhelpers.WaitHelper;
-import org.mozilla.gecko.browserid.BrowserIDKeyPair;
-import org.mozilla.gecko.browserid.RSACryptoImplementation;
-import org.mozilla.gecko.fxa.login.FxAccountLoginStateMachine.LoginStateMachineDelegate;
-import org.mozilla.gecko.fxa.login.FxAccountLoginTransition.Transition;
-import org.mozilla.gecko.fxa.login.State.StateLabel;
-import org.mozilla.gecko.sync.Utils;
-
-public class TestFxAccountLoginStateMachine {
-  // private static final String TEST_AUDIENCE = "http://testAudience.com";
-  private static final String TEST_EMAIL = "test@test.com";
-  private static byte[] TEST_EMAIL_UTF8;
-  private static final String TEST_PASSWORD = "testtest";
-  private static byte[] TEST_PASSWORD_UTF8;
-  private static byte[] TEST_QUICK_STRETCHED_PW;
-  private static byte[] TEST_UNWRAPKB;
-  private static final byte[] TEST_SESSION_TOKEN = Utils.generateRandomBytes(32);
-  private static final byte[] TEST_KEY_FETCH_TOKEN = Utils.generateRandomBytes(32);
-
-  protected MockFxAccountClient client;
-  protected FxAccountLoginStateMachine sm;
-
-  @Before
-  public void setUp() throws Exception {
-    if (TEST_EMAIL_UTF8 == null) {
-      TEST_EMAIL_UTF8 = TEST_EMAIL.getBytes("UTF-8");
-    }
-    if (TEST_PASSWORD_UTF8 == null) {
-      TEST_PASSWORD_UTF8 = TEST_PASSWORD.getBytes("UTF-8");
-    }
-    if (TEST_QUICK_STRETCHED_PW == null) {
-      TEST_QUICK_STRETCHED_PW = FxAccountUtils.generateQuickStretchedPW(TEST_EMAIL_UTF8, TEST_PASSWORD_UTF8);
-    }
-    if (TEST_UNWRAPKB == null) {
-      TEST_UNWRAPKB = FxAccountUtils.generateUnwrapBKey(TEST_QUICK_STRETCHED_PW);
-    }
-    client = new MockFxAccountClient();
-    sm = new FxAccountLoginStateMachine();
-  }
-
-  protected static class Trace {
-    public final LinkedList<State> states;
-    public final LinkedList<Transition> transitions;
-
-    public Trace(LinkedList<State> states, LinkedList<Transition> transitions) {
-      this.states = states;
-      this.transitions = transitions;
-    }
-
-    public void assertEquals(String string) {
-      Assert.assertArrayEquals(string.split(", "), toString().split(", "));
-    }
-
-    @Override
-    public String toString() {
-      final LinkedList<State> states = new LinkedList<State>(this.states);
-      final LinkedList<Transition> transitions = new LinkedList<Transition>(this.transitions);
-      LinkedList<String> names = new LinkedList<String>();
-      State state;
-      while ((state = states.pollFirst()) != null) {
-        names.add(state.getStateLabel().name());
-        Transition transition = transitions.pollFirst();
-        if (transition != null) {
-          names.add(">" + transition.toString());
-        }
-      }
-      return names.toString();
-    }
-
-    public String stateString() {
-      LinkedList<String> names = new LinkedList<String>();
-      for (State state : states) {
-        names.add(state.getStateLabel().name());
-      }
-      return names.toString();
-    }
-
-    public String transitionString() {
-      LinkedList<String> names = new LinkedList<String>();
-      for (Transition transition : transitions) {
-        names.add(transition.toString());
-      }
-      return names.toString();
-    }
-  }
-
-  protected Trace trace(final State initialState, final StateLabel desiredState) {
-    final LinkedList<Transition> transitions = new LinkedList<Transition>();
-    final LinkedList<State> states = new LinkedList<State>();
-    states.add(initialState);
-
-    WaitHelper.getTestWaiter().performWait(new Runnable() {
-      @Override
-      public void run() {
-        sm.advance(initialState, desiredState, new LoginStateMachineDelegate() {
-          @Override
-          public void handleTransition(Transition transition, State state) {
-            transitions.add(transition);
-            states.add(state);
-          }
-
-          @Override
-          public void handleFinal(State state) {
-            WaitHelper.getTestWaiter().performNotify();
-          }
-
-          @Override
-          public FxAccountClient getClient() {
-            return client;
-          }
-
-          @Override
-          public long getCertificateDurationInMilliseconds() {
-            return 30 * 1000;
-          }
-
-          @Override
-          public long getAssertionDurationInMilliseconds() {
-            return 10 * 1000;
-          }
-
-          @Override
-          public BrowserIDKeyPair generateKeyPair() throws NoSuchAlgorithmException {
-            return RSACryptoImplementation.generateKeyPair(512);
-          }
-        });
-      }
-    });
-
-    return new Trace(states, transitions);
-  }
-
-  @Test
-  public void testEnagedUnverified() throws Exception {
-    client.addUser(TEST_EMAIL, TEST_QUICK_STRETCHED_PW, false, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN);
-    Trace trace = trace(new Engaged(TEST_EMAIL, "uid", true, TEST_UNWRAPKB, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN), StateLabel.Married);
-    trace.assertEquals("[Engaged, >AccountNeedsVerification, Engaged]");
-  }
-
-  @Test
-  public void testEngagedTransitionToAccountVerified() throws Exception {
-    client.addUser(TEST_EMAIL, TEST_QUICK_STRETCHED_PW, true, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN);
-    Trace trace = trace(new Engaged(TEST_EMAIL, "uid", false, TEST_UNWRAPKB, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN), StateLabel.Married);
-    trace.assertEquals("[Engaged, >AccountVerified, Cohabiting, >LogMessage('sign succeeded'), Married]");
-  }
-
-  @Test
-  public void testEngagedVerified() throws Exception {
-    client.addUser(TEST_EMAIL, TEST_QUICK_STRETCHED_PW, true, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN);
-    Trace trace = trace(new Engaged(TEST_EMAIL, "uid", true, TEST_UNWRAPKB, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN), StateLabel.Married);
-    trace.assertEquals("[Engaged, >LogMessage('keys succeeded'), Cohabiting, >LogMessage('sign succeeded'), Married]");
-  }
-
-  @Test
-  public void testPartial() throws Exception {
-    client.addUser(TEST_EMAIL, TEST_QUICK_STRETCHED_PW, true, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN);
-    // What if we stop at Cohabiting?
-    Trace trace = trace(new Engaged(TEST_EMAIL, "uid", true, TEST_UNWRAPKB, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN), StateLabel.Cohabiting);
-    trace.assertEquals("[Engaged, >LogMessage('keys succeeded'), Cohabiting]");
-  }
-
-  @Test
-  public void testBadSessionToken() throws Exception {
-    client.addUser(TEST_EMAIL, TEST_QUICK_STRETCHED_PW, true, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN);
-    client.sessionTokens.clear();
-    Trace trace = trace(new Engaged(TEST_EMAIL, "uid", true, TEST_UNWRAPKB, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN), StateLabel.Married);
-    trace.assertEquals("[Engaged, >LogMessage('keys succeeded'), Cohabiting, >Log(<FxAccountClientRemoteException 401 [110]: invalid sessionToken>), Separated, >PasswordRequired, Separated]");
-  }
-
-  @Test
-  public void testBadKeyFetchToken() throws Exception {
-    client.addUser(TEST_EMAIL, TEST_QUICK_STRETCHED_PW, true, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN);
-    client.keyFetchTokens.clear();
-    Trace trace = trace(new Engaged(TEST_EMAIL, "uid", true, TEST_UNWRAPKB, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN), StateLabel.Married);
-    trace.assertEquals("[Engaged, >Log(<FxAccountClientRemoteException 401 [110]: invalid keyFetchToken>), Separated, >PasswordRequired, Separated]");
-  }
-
-  @Test
-  public void testMarried() throws Exception {
-    client.addUser(TEST_EMAIL, TEST_QUICK_STRETCHED_PW, true, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN);
-    Trace trace = trace(new Engaged(TEST_EMAIL, "uid", true, TEST_UNWRAPKB, TEST_SESSION_TOKEN, TEST_KEY_FETCH_TOKEN), StateLabel.Married);
-    trace.assertEquals("[Engaged, >LogMessage('keys succeeded'), Cohabiting, >LogMessage('sign succeeded'), Married]");
-    // What if we're already in the desired state?
-    State married = trace.states.getLast();
-    Assert.assertEquals(StateLabel.Married, married.getStateLabel());
-    trace = trace(married, StateLabel.Married);
-    trace.assertEquals("[Married]");
-  }
-}
diff -Nurb 000__VANILLA/firefox-beta/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/login/TestStateFactory.java.orig 001__PORTED/firefox-beta/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/login/TestStateFactory.java.orig
--- 000__VANILLA/firefox-beta/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/login/TestStateFactory.java.orig	2015-11-09 23:56:10.000000000 +0100
+++ 001__PORTED/firefox-beta/mobile/android/tests/background/junit4/src/org/mozilla/gecko/fxa/login/TestStateFactory.java.orig	1970-01-01 01:00:00.000000000 +0100
@@ -1,89 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-package org.mozilla.gecko.fxa.login;
-
-import junit.framework.Assert;
-
-import org.junit.Test;
-import org.mozilla.gecko.browserid.BrowserIDKeyPair;
-import org.mozilla.gecko.browserid.DSACryptoImplementation;
-import org.mozilla.gecko.fxa.login.State.StateLabel;
-import org.mozilla.gecko.sync.ExtendedJSONObject;
-import org.mozilla.gecko.sync.Utils;
-
-public class TestStateFactory {
-  @Test
-  public void testGetStateV3() throws Exception {
-    MigratedFromSync11 migrated = new MigratedFromSync11("email", "uid", true, "password");
-
-    // For the current version, we expect to read back what we wrote.
-    ExtendedJSONObject o;
-    State state;
-
-    o = migrated.toJSONObject();
-    Assert.assertEquals(3, o.getLong("version").intValue());
-    state = StateFactory.fromJSONObject(migrated.stateLabel, o);
-    Assert.assertEquals(StateLabel.MigratedFromSync11, state.stateLabel);
-    Assert.assertEquals(o, state.toJSONObject());
-
-    // Null passwords are OK.
-    MigratedFromSync11 migratedNullPassword = new MigratedFromSync11("email", "uid", true, null);
-
-    o = migratedNullPassword.toJSONObject();
-    Assert.assertEquals(3, o.getLong("version").intValue());
-    state = StateFactory.fromJSONObject(migratedNullPassword.stateLabel, o);
-    Assert.assertEquals(StateLabel.MigratedFromSync11, state.stateLabel);
-    Assert.assertEquals(o, state.toJSONObject());
-  }
-
-  @Test
-  public void testGetStateV2() throws Exception {
-    byte[] sessionToken = Utils.generateRandomBytes(32);
-    byte[] kA = Utils.generateRandomBytes(32);
-    byte[] kB = Utils.generateRandomBytes(32);
-    BrowserIDKeyPair keyPair = DSACryptoImplementation.generateKeyPair(512);
-    Cohabiting cohabiting = new Cohabiting("email", "uid", sessionToken, kA, kB, keyPair);
-    String certificate = "certificate";
-    Married married = new Married("email", "uid", sessionToken, kA, kB, keyPair, certificate);
-
-    // For the current version, we expect to read back what we wrote.
-    ExtendedJSONObject o;
-    State state;
-
-    o = married.toJSONObject();
-    Assert.assertEquals(3, o.getLong("version").intValue());
-    state = StateFactory.fromJSONObject(married.stateLabel, o);
-    Assert.assertEquals(StateLabel.Married, state.stateLabel);
-    Assert.assertEquals(o, state.toJSONObject());
-
-    o = cohabiting.toJSONObject();
-    Assert.assertEquals(3, o.getLong("version").intValue());
-    state = StateFactory.fromJSONObject(cohabiting.stateLabel, o);
-    Assert.assertEquals(StateLabel.Cohabiting, state.stateLabel);
-    Assert.assertEquals(o, state.toJSONObject());
-  }
-
-  @Test
-  public void testGetStateV1() throws Exception {
-    // We can't rely on generating correct V1 objects (since the generation code
-    // may change); so we hard code a few test examples here. These examples
-    // have RSA key pairs; when they're parsed, we return DSA key pairs.
-    ExtendedJSONObject o = new ExtendedJSONObject("{\"uid\":\"uid\",\"sessionToken\":\"4e2830da6ce466ddb401fbca25b96a621209eea83851254800f84cc4069ef011\",\"certificate\":\"certificate\",\"keyPair\":{\"publicKey\":{\"e\":\"65537\",\"n\":\"7598360104379019497828904063491254083855849024432238665262988260947462372141971045236693389494635158997975098558915846889960089362159921622822266839560631\",\"algorithm\":\"RS\"},\"privateKey\":{\"d\":\"6807533330618101360064115400338014782301295929300445938471117364691566605775022173055292460962170873583673516346599808612503093914221141089102289381448225\",\"n\":\"7598360104379019497828904063491254083855849024432238665262988260947462372141971045236693389494635158997975098558915846889960089362159921622822266839560631\",\"algorithm\":\"RS\"}},\"email\":\"email\",\"verified\":true,\"kB\":\"0b048f285c19067f200da7bfbe734ed213cefcd8f543f0fdd4a8ccab48cbbc89\",\"kA\":\"59a9edf2d41de8b24e69df9133bc88e96913baa75421882f4c55d842d18fc8a1\",\"version\":1}");
-    // A Married state is regressed to a Cohabited state.
-    Cohabiting state = (Cohabiting) StateFactory.fromJSONObject(StateLabel.Married, o);
-
-    Assert.assertEquals(StateLabel.Cohabiting, state.stateLabel);
-    Assert.assertEquals("uid", state.uid);
-    Assert.assertEquals("4e2830da6ce466ddb401fbca25b96a621209eea83851254800f84cc4069ef011", Utils.byte2Hex(state.sessionToken));
-    Assert.assertEquals("DS128", state.keyPair.getPrivate().getAlgorithm());
-
-    o = new ExtendedJSONObject("{\"uid\":\"uid\",\"sessionToken\":\"4e2830da6ce466ddb401fbca25b96a621209eea83851254800f84cc4069ef011\",\"keyPair\":{\"publicKey\":{\"e\":\"65537\",\"n\":\"7598360104379019497828904063491254083855849024432238665262988260947462372141971045236693389494635158997975098558915846889960089362159921622822266839560631\",\"algorithm\":\"RS\"},\"privateKey\":{\"d\":\"6807533330618101360064115400338014782301295929300445938471117364691566605775022173055292460962170873583673516346599808612503093914221141089102289381448225\",\"n\":\"7598360104379019497828904063491254083855849024432238665262988260947462372141971045236693389494635158997975098558915846889960089362159921622822266839560631\",\"algorithm\":\"RS\"}},\"email\":\"email\",\"verified\":true,\"kB\":\"0b048f285c19067f200da7bfbe734ed213cefcd8f543f0fdd4a8ccab48cbbc89\",\"kA\":\"59a9edf2d41de8b24e69df9133bc88e96913baa75421882f4c55d842d18fc8a1\",\"version\":1}");
-    state = (Cohabiting) StateFactory.fromJSONObject(StateLabel.Cohabiting, o);
-
-    Assert.assertEquals(StateLabel.Cohabiting, state.stateLabel);
-    Assert.assertEquals("uid", state.uid);
-    Assert.assertEquals("4e2830da6ce466ddb401fbca25b96a621209eea83851254800f84cc4069ef011", Utils.byte2Hex(state.sessionToken));
-    Assert.assertEquals("DS128", state.keyPair.getPrivate().getAlgorithm());
-  }
-}
diff -Nurb 000__VANILLA/firefox-beta/modules/libjar/nsZipArchive.cpp 001__PORTED/firefox-beta/modules/libjar/nsZipArchive.cpp
--- 000__VANILLA/firefox-beta/modules/libjar/nsZipArchive.cpp	2015-11-09 23:56:12.000000000 +0100
+++ 001__PORTED/firefox-beta/modules/libjar/nsZipArchive.cpp	2015-11-11 04:25:01.712690588 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* 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
@@ -40,6 +44,7 @@
     #include <sys/stat.h>
     #include <limits.h>
     #include <unistd.h>
+extern "C" int madvise(caddr_t, size_t, int);
 #elif defined(XP_WIN)
     #include <io.h>
 #endif
@@ -624,8 +629,10 @@
     // Success means optimized jar layout from bug 559961 is in effect
     uint32_t readaheadLength = xtolong(startp);
     if (readaheadLength) {
-#if defined(XP_UNIX)
-      madvise(const_cast<uint8_t*>(startp), readaheadLength, MADV_WILLNEED);
+#if defined(OS_SOLARIS)
+      posix_madvise((caddr_t)const_cast<uint8_t*>(startp), readaheadLength, MADV_WILLNEED);
+#elif defined(XP_UNIX)
+      madvise((caddr_t)const_cast<uint8_t*>(startp), readaheadLength, MADV_WILLNEED);
 #elif defined(XP_WIN)
       if (aFd) {
         HANDLE hFile = (HANDLE) PR_FileDesc2NativeHandle(aFd);
diff -Nurb 000__VANILLA/firefox-beta/toolkit/components/protobuf/src/google/protobuf/stubs/atomicops_internals_solaris.h 001__PORTED/firefox-beta/toolkit/components/protobuf/src/google/protobuf/stubs/atomicops_internals_solaris.h
--- 000__VANILLA/firefox-beta/toolkit/components/protobuf/src/google/protobuf/stubs/atomicops_internals_solaris.h	2015-11-09 23:56:13.000000000 +0100
+++ 001__PORTED/firefox-beta/toolkit/components/protobuf/src/google/protobuf/stubs/atomicops_internals_solaris.h	2015-11-11 04:24:27.256060276 +0100
@@ -1,5 +1,8 @@
-// Copyright 2014 Google Inc. All rights reserved.
-// https://developers.google.com/protocol-buffers/
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
+// Copyright 2013 Red Hat Inc.  All rights reserved.
 //
 // Redistribution and use in source and binary forms, with or without
 // modification, are permitted provided that the following conditions are
@@ -11,7 +14,7 @@
 // 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
+//     * Neither the name of Red Hat Inc. nor the names of its
 // contributors may be used to endorse or promote products derived from
 // this software without specific prior written permission.
 //
@@ -29,10 +32,8 @@
 
 // This file is an internal atomic implementation, use atomicops.h instead.
 
-#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_SPARC_GCC_H_
-#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_SPARC_GCC_H_
-
-#include <atomic.h>
+#ifndef GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_
+#define GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_
 
 namespace google {
 namespace protobuf {
@@ -41,148 +42,100 @@
 inline Atomic32 NoBarrier_CompareAndSwap(volatile Atomic32* ptr,
                                          Atomic32 old_value,
                                          Atomic32 new_value) {
-  return (Atomic32)atomic_cas_32((volatile uint32_t*)ptr, (uint32_t)old_value, (uint32_t)new_value);
+  __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
+                              __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+  return old_value;
 }
 
 inline Atomic32 NoBarrier_AtomicExchange(volatile Atomic32* ptr,
                                          Atomic32 new_value) {
-  return (Atomic32)atomic_swap_32((volatile uint32_t*)ptr, (uint32_t)new_value);
+  return __atomic_exchange_n(ptr, new_value, __ATOMIC_RELAXED);
 }
 
 inline Atomic32 NoBarrier_AtomicIncrement(volatile Atomic32* ptr,
                                           Atomic32 increment) {
-  return (Atomic32)atomic_add_32_nv((volatile uint32_t*)ptr, (uint32_t)increment);
-}
-
-inline void MemoryBarrier(void) {
-	membar_producer();
-	membar_consumer();
+  return __atomic_add_fetch(ptr, increment, __ATOMIC_RELAXED);
 }
 
 inline Atomic32 Barrier_AtomicIncrement(volatile Atomic32* ptr,
                                         Atomic32 increment) {
-  MemoryBarrier();
-  Atomic32 ret = NoBarrier_AtomicIncrement(ptr, increment);
-  MemoryBarrier();
-
-  return ret;
+  return __atomic_add_fetch(ptr, increment, __ATOMIC_SEQ_CST);
 }
 
 inline Atomic32 Acquire_CompareAndSwap(volatile Atomic32* ptr,
                                        Atomic32 old_value,
                                        Atomic32 new_value) {
-  Atomic32 ret = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-  MemoryBarrier();
-
-  return ret;
+  __atomic_compare_exchange(ptr, &old_value, &new_value, true,
+                            __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);
+  return old_value;
 }
 
 inline Atomic32 Release_CompareAndSwap(volatile Atomic32* ptr,
                                        Atomic32 old_value,
                                        Atomic32 new_value) {
-  MemoryBarrier();
-  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
+  __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
+                              __ATOMIC_RELEASE, __ATOMIC_ACQUIRE);
+  return old_value;
 }
 
 inline void NoBarrier_Store(volatile Atomic32* ptr, Atomic32 value) {
-  *ptr = value;
+  __atomic_store_n(ptr, value, __ATOMIC_RELAXED);
+}
+
+inline void MemoryBarrier() {
+  __sync_synchronize();
 }
 
 inline void Acquire_Store(volatile Atomic32* ptr, Atomic32 value) {
-  *ptr = value;
-  membar_producer();
+  __atomic_store_n(ptr, value, __ATOMIC_SEQ_CST);
 }
 
 inline void Release_Store(volatile Atomic32* ptr, Atomic32 value) {
-  membar_consumer();
-  *ptr = value;
+  __atomic_store_n(ptr, value, __ATOMIC_RELEASE);
 }
 
 inline Atomic32 NoBarrier_Load(volatile const Atomic32* ptr) {
-  return *ptr;
+  return __atomic_load_n(ptr, __ATOMIC_RELAXED);
 }
 
 inline Atomic32 Acquire_Load(volatile const Atomic32* ptr) {
-  Atomic32 val = *ptr;
-  membar_consumer();
-  return val;
+  return __atomic_load_n(ptr, __ATOMIC_ACQUIRE);
 }
 
 inline Atomic32 Release_Load(volatile const Atomic32* ptr) {
-  membar_producer();
-  return *ptr;
+  return __atomic_load_n(ptr, __ATOMIC_SEQ_CST);
 }
 
-#ifdef GOOGLE_PROTOBUF_ARCH_64_BIT
-inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
-                                         Atomic64 old_value,
-                                         Atomic64 new_value) {
-  return atomic_cas_64((volatile uint64_t*)ptr, (uint64_t)old_value, (uint64_t)new_value);
-}
+#ifdef __LP64__
 
-inline Atomic64 NoBarrier_AtomicExchange(volatile Atomic64* ptr, Atomic64 new_value) {
-  return atomic_swap_64((volatile uint64_t*)ptr, (uint64_t)new_value);
-}
-
-inline Atomic64 NoBarrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment) {
-  return atomic_add_64_nv((volatile uint64_t*)ptr, increment);
+inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
+  __atomic_store_n(ptr, value, __ATOMIC_RELEASE);
 }
 
-inline Atomic64 Barrier_AtomicIncrement(volatile Atomic64* ptr, Atomic64 increment) {
-  MemoryBarrier();
-  Atomic64 ret = atomic_add_64_nv((volatile uint64_t*)ptr, increment);
-  MemoryBarrier();
-  return ret;
+inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
+  return __atomic_load_n(ptr, __ATOMIC_ACQUIRE);
 }
 
 inline Atomic64 Acquire_CompareAndSwap(volatile Atomic64* ptr,
                                        Atomic64 old_value,
                                        Atomic64 new_value) {
-  Atomic64 ret = NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-  MemoryBarrier();
-  return ret;
+  __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
+                              __ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE);
+  return old_value;
 }
 
-inline Atomic64 Release_CompareAndSwap(volatile Atomic64* ptr,
+inline Atomic64 NoBarrier_CompareAndSwap(volatile Atomic64* ptr,
                                        Atomic64 old_value,
                                        Atomic64 new_value) {
-  MemoryBarrier();
-  return NoBarrier_CompareAndSwap(ptr, old_value, new_value);
-}
-
-inline void NoBarrier_Store(volatile Atomic64* ptr, Atomic64 value) {
-  *ptr = value;
-}
-
-inline void Acquire_Store(volatile Atomic64* ptr, Atomic64 value) {
-  *ptr = value;
-  membar_producer();
+  __atomic_compare_exchange_n(ptr, &old_value, new_value, true,
+                              __ATOMIC_RELAXED, __ATOMIC_RELAXED);
+  return old_value;
 }
 
-inline void Release_Store(volatile Atomic64* ptr, Atomic64 value) {
-  membar_consumer();
-  *ptr = value;
-}
-
-inline Atomic64 NoBarrier_Load(volatile const Atomic64* ptr) {
-  return *ptr;
-}
-
-inline Atomic64 Acquire_Load(volatile const Atomic64* ptr) {
-  Atomic64 ret = *ptr;
-  membar_consumer();
-  return ret;
-}
-
-inline Atomic64 Release_Load(volatile const Atomic64* ptr) {
-  membar_producer();
-  return *ptr;
-}
-#endif
+#endif // defined(__LP64__)
 
 }  // namespace internal
 }  // namespace protobuf
 }  // namespace google
 
-#endif  // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_SPARC_GCC_H_
-
+#endif  // GOOGLE_PROTOBUF_ATOMICOPS_INTERNALS_GENERIC_GCC_H_
diff -Nurb 000__VANILLA/firefox-beta/toolkit/library/Makefile.in 001__PORTED/firefox-beta/toolkit/library/Makefile.in
--- 000__VANILLA/firefox-beta/toolkit/library/Makefile.in	2015-11-09 23:56:20.000000000 +0100
+++ 001__PORTED/firefox-beta/toolkit/library/Makefile.in	2015-11-11 04:23:35.762542329 +0100
@@ -1,8 +1,14 @@
+#*
+#* Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
 # 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/.
 
 include $(topsrcdir)/toolkit/library/libxul.mk
+include $(topsrcdir)/toolkit/library/autoconflibxul.mk
 
 include $(topsrcdir)/config/config.mk
 
diff -Nurb 000__VANILLA/firefox-beta/toolkit/library/autoconflibxul.mk 001__PORTED/firefox-beta/toolkit/library/autoconflibxul.mk
--- 000__VANILLA/firefox-beta/toolkit/library/autoconflibxul.mk	1970-01-01 01:00:00.000000000 +0100
+++ 001__PORTED/firefox-beta/toolkit/library/autoconflibxul.mk	2015-11-11 04:12:33.031527320 +0100
@@ -0,0 +1,29 @@
+#*
+#* CDDL HEADER START
+#*
+#* The contents of this file are subject to the terms of the
+#* Common Development and Distribution License, Version 1.0 only
+#* (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 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
+//MKSHLIB = /usr/bin/gld $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -h $(DSO_SONAME) -o $@
+//OS_LDFLAGS = -lpthread	 -z text -z ignore -R,'$$ORIGIN:$$ORIGIN/..' -z lazyload -z combreloc -z muldefs
+MKSHLIB = /usr/bin/env LD_ALTEXEC=/usr/bin/gld PATH=/usr/gcc/4.5/bin:/usr/gcc/4.7/bin:/usr/gcc/4.8/bin:$PATH $(CXX) $(CXXFLAGS) $(DSO_PIC_CFLAGS) $(DSO_LDOPTS) -Wl,-h,$(DSO_SONAME) -o $@
diff -Nurb 000__VANILLA/firefox-beta/toolkit/library/libxul.mk 001__PORTED/firefox-beta/toolkit/library/libxul.mk
--- 000__VANILLA/firefox-beta/toolkit/library/libxul.mk	2015-11-09 23:56:20.000000000 +0100
+++ 001__PORTED/firefox-beta/toolkit/library/libxul.mk	2015-11-11 04:22:41.043525007 +0100
@@ -1,3 +1,8 @@
+#*
+#* Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
 # 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/.
@@ -51,15 +56,3 @@
 endif
 endif
 endif
-
-ifdef _MSC_VER
-get_first_and_last = dumpbin -exports $1 | grep _NSModule@@ | sort -k 3 | sed -n 's/^.*?\([^@]*\)@@.*$$/\1/;1p;$$p'
-else
-get_first_and_last = $(TOOLCHAIN_PREFIX)nm -g $1 | grep _NSModule$$ | grep -vw refptr | sort | sed -n 's/^.* _*\([^ ]*\)$$/\1/;1p;$$p'
-endif
-
-LOCAL_CHECKS = test "$$($(get_first_and_last) | xargs echo)" != "start_kPStaticModules_NSModule end_kPStaticModules_NSModule" && echo "NSModules are not ordered appropriately" && exit 1 || exit 0
-
-ifeq (Linux,$(OS_ARCH))
-LOCAL_CHECKS += ; test "$$($(TOOLCHAIN_PREFIX)readelf -l $1 | awk '$1 == "LOAD" { t += 1 } END { print t }')" -le 1 && echo "Only one PT_LOAD segment" && exit 1 || exit 0
-endif
diff -Nurb 000__VANILLA/firefox-beta/toolkit/mozapps/update/updater/updater.cpp 001__PORTED/firefox-beta/toolkit/mozapps/update/updater/updater.cpp
--- 000__VANILLA/firefox-beta/toolkit/mozapps/update/updater/updater.cpp	2015-11-09 23:56:22.000000000 +0100
+++ 001__PORTED/firefox-beta/toolkit/mozapps/update/updater/updater.cpp	2015-11-11 04:21:45.699591445 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* 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/. */
@@ -33,6 +37,9 @@
  *  -----------
  *  method   = "remove" | "rmdir"
  */
+
+#define SOLARIS 1
+
 #include "bspatch.h"
 #include "progressui.h"
 #include "archivereader.h"
diff -Nurb 000__VANILLA/firefox-beta/widget/GfxInfoX11.cpp 001__PORTED/firefox-beta/widget/GfxInfoX11.cpp
--- 000__VANILLA/firefox-beta/widget/GfxInfoX11.cpp	2015-11-09 23:56:24.000000000 +0100
+++ 001__PORTED/firefox-beta/widget/GfxInfoX11.cpp	2015-11-11 04:20:40.181769382 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: sw=2 ts=8 et :
  */
@@ -210,13 +214,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;
diff -Nurb 000__VANILLA/firefox-beta/x05CONFIGURE__NONDEBUG.sh 001__PORTED/firefox-beta/x05CONFIGURE__NONDEBUG.sh
--- 000__VANILLA/firefox-beta/x05CONFIGURE__NONDEBUG.sh	1970-01-01 01:00:00.000000000 +0100
+++ 001__PORTED/firefox-beta/x05CONFIGURE__NONDEBUG.sh	2015-11-11 04:08:18.925661801 +0100
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+#*
+#* CDDL HEADER START
+#*
+#* The contents of this file are subject to the terms of the
+#* Common Development and Distribution License, Version 1.0 only
+#* (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 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
+export PATH=/opt/csw/gcc4/bin:/opt/csw/bin:/usr/gnu/bin:/usr/sfw/bin:/usr/bin:/usr/openwin/bin:/usr/ucb
+export FFvers=`/bin/cat /tmp/FFvers`
+bash ../configure --enable-application=browser --prefix=/usr/lib/firefox`/bin/cat /tmp/FFvers`  --enable-official-branding --disable-updater --enable-debug-symbols=no --enable-update-channel=esr --disable-tests --enable-jemalloc --disable-dtrace --disable-xinerama --disable-crashreporter --disable-pulseaudio --disable-gstreamer --with-intl-api --disable-debug --enable-ipc --enable-default-toolkit=cairo-gtk2
+
diff -Nurb 000__VANILLA/firefox-beta/xpcom/base/nsStatusReporterManager.cpp 001__PORTED/firefox-beta/xpcom/base/nsStatusReporterManager.cpp
--- 000__VANILLA/firefox-beta/xpcom/base/nsStatusReporterManager.cpp	2015-11-09 23:56:25.000000000 +0100
+++ 001__PORTED/firefox-beta/xpcom/base/nsStatusReporterManager.cpp	2015-11-11 04:20:51.670640457 +0100
@@ -1,3 +1,7 @@
+/*
+ * Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+ * FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+ */
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
@@ -146,9 +150,11 @@
 {
   static unsigned number = 1;
   nsresult rv;
+  int thispid = 181818;
 
+  thispid = getpid();
   nsCString filename("status-reports-");
-  filename.AppendInt(getpid());
+  filename.AppendInt(thispid);
   filename.Append('-');
   filename.AppendInt(number++);
   filename.AppendLiteral(".json");
diff -Nurb 000__VANILLA/firefox-beta/xpcom/reflect/xptcall/md/unix/Makefile.in 001__PORTED/firefox-beta/xpcom/reflect/xptcall/md/unix/Makefile.in
--- 000__VANILLA/firefox-beta/xpcom/reflect/xptcall/md/unix/Makefile.in	2015-11-09 23:56:26.000000000 +0100
+++ 001__PORTED/firefox-beta/xpcom/reflect/xptcall/md/unix/Makefile.in	2015-11-11 04:16:49.272319483 +0100
@@ -1,3 +1,8 @@
+#*
+#* Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
 #
 # 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
@@ -64,16 +69,3 @@
 	m4 -DAIX_OBJMODEL=$(AIX_OBJMODEL) $(INCLUDES) -I. $< > $@
 endif
 endif
-
-ifeq ($(OS_ARCH),SunOS)
-ifeq (86,$(findstring 86,$(OS_TEST)))
-ifndef GNU_CC
-xptcstubsdef_asm.solx86: $(DIST)/include/xptcstubsdef.inc
-	sed \
-	  -e 's/^\(STUB_ENTRY\)(\([0-9]\))/\11\(\2\)/' \
-	  -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 > $@
-endif
-endif
-endif
diff -Nurb 000__VANILLA/firefox-beta/xpcom/reflect/xptcall/md/unix/moz.build 001__PORTED/firefox-beta/xpcom/reflect/xptcall/md/unix/moz.build
--- 000__VANILLA/firefox-beta/xpcom/reflect/xptcall/md/unix/moz.build	2015-11-09 23:56:26.000000000 +0100
+++ 001__PORTED/firefox-beta/xpcom/reflect/xptcall/md/unix/moz.build	2015-11-11 04:15:49.658504202 +0100
@@ -1,3 +1,8 @@
+#*
+#* Copyright 2015 OpenSXCE.org Martin Bochnig <opensxce@mail.ru>
+#* FireFox 20/30/40++ gcc4.x port with Flash support for OpenSolaris++ x86/x64
+#*
+
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
@@ -47,9 +52,6 @@
         ]
 
 if CONFIG['OS_ARCH'] == 'SunOS' and '86' in CONFIG['OS_TEST']:
-    GENERATED_FILES = [
-        'xptcstubsdef_asm.solx86',
-    ]
     if CONFIG['OS_TEST'] == 'x86_64':
         if CONFIG['GNU_CC']:
             SOURCES += [
diff -Nurb 000__VANILLA/firefox-beta/toolkit/mozapps/extensions/internal/XPIProviderUtils.js 001__PORTED/firefox-beta/toolkit/mozapps/extensions/internal/XPIProviderUtils.js
--- 000__VANILLA/firefox-beta/toolkit/mozapps/extensions/internal/XPIProviderUtils.js	2015-11-12 23:49:00.000000000 +0100
+++ 001__PORTED/firefox-beta/toolkit/mozapps/extensions/internal/XPIProviderUtils.js	2015-11-16 01:54:30.570857314 +0100
@@ -1675,12 +1675,12 @@
 
     if (isDetectedInstall && aNewAddon.foreignInstall) {
       // If the add-on is a foreign install and is in a scope where add-ons
-      // that were dropped in should default to disabled then disable it
+      // that were dropped in should default to disabled then enable it anyway on OpenSolaris (preinstalled langpacks)
       let disablingScopes = Preferences.get(PREF_EM_AUTO_DISABLED_SCOPES, 0);
       if (aInstallLocation.scope & disablingScopes) {
-        logger.warn("Disabling foreign installed add-on " + aNewAddon.id + " in "
+        logger.warn("Enabling foreign installed add-on " + aNewAddon.id + " in "
             + aInstallLocation.name);
-        aNewAddon.userDisabled = true;
+        aNewAddon.userDisabled = false;
       }
     }
 
diff -Nurb 000__VANILLA/firefox-beta/modules/libpref/init/all.js 001__PORTED/firefox-beta/modules/libpref/init/all.js
--- 000__VANILLA/firefox-beta/modules/libpref/init/all.js	2015-11-12 23:48:53.000000000 +0100
+++ 001__PORTED/firefox-beta/modules/libpref/init/all.js	2015-11-16 01:15:18.702792127 +0100
@@ -1836,7 +1836,7 @@
 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