[SVN-Commit] r1110 - in trunk: mail/thunderbird mail/thunderbird/files www/firefox www/firefox-nightly www/firefox-nightly/files www/firefox/files www/seamonkey www/seamonkey/files

svn-freebsd-gecko at chruetertee.ch svn-freebsd-gecko at chruetertee.ch
Mon Dec 3 18:03:12 UTC 2012


Author: jbeich
Date: Mon Dec  3 18:03:03 2012
New Revision: 1110

Log:
update

Added:
   trunk/mail/thunderbird/files/patch-bug783505
   trunk/mail/thunderbird/files/patch-bug798354
   trunk/mail/thunderbird/files/patch-bug815025
   trunk/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc
   trunk/mail/thunderbird/files/patch-mozilla-xpcom-base-AvailableMemoryTracker.cpp
   trunk/www/firefox-nightly/files/patch-gfx-ots-include-opentype-sanitiser.h
   trunk/www/firefox-nightly/files/patch-media-libsydneyaudio-src-Makefile.in
   trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc
   trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
   trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc
   trunk/www/seamonkey/files/patch-bug783505
   trunk/www/seamonkey/files/patch-bug798354
   trunk/www/seamonkey/files/patch-bug815025
   trunk/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc
   trunk/www/seamonkey/files/patch-mozilla-xpcom-base-AvailableMemoryTracker.cpp
Deleted:
   trunk/mail/thunderbird/files/patch-bug753046
   trunk/mail/thunderbird/files/patch-bug786995
   trunk/mail/thunderbird/files/patch-bug787904
   trunk/mail/thunderbird/files/patch-bug788039
   trunk/mail/thunderbird/files/patch-bug788108
   trunk/mail/thunderbird/files/patch-bug789436
   trunk/mail/thunderbird/files/patch-bug789656
   trunk/mail/thunderbird/files/patch-bug789693
   trunk/mail/thunderbird/files/patch-bug791366
   trunk/mail/thunderbird/files/patch-bug799441
   trunk/www/firefox-nightly/files/patch-alsapulse
   trunk/www/seamonkey/files/patch-bug713802
   trunk/www/seamonkey/files/patch-bug753046
   trunk/www/seamonkey/files/patch-bug786995
   trunk/www/seamonkey/files/patch-bug787904
   trunk/www/seamonkey/files/patch-bug788039
   trunk/www/seamonkey/files/patch-bug788108
   trunk/www/seamonkey/files/patch-bug789436
   trunk/www/seamonkey/files/patch-bug789656
   trunk/www/seamonkey/files/patch-bug789693
   trunk/www/seamonkey/files/patch-bug791366
   trunk/www/seamonkey/files/patch-bug799441
Modified:
   trunk/mail/thunderbird/Makefile
   trunk/mail/thunderbird/distinfo
   trunk/mail/thunderbird/files/extra-bug780531
   trunk/mail/thunderbird/files/patch-alsapulse
   trunk/mail/thunderbird/files/patch-bug722975
   trunk/mail/thunderbird/files/patch-bug791305
   trunk/mail/thunderbird/files/patch-bug806139
   trunk/mail/thunderbird/files/patch-mozilla-content-media-nsAudioStream.cpp
   trunk/mail/thunderbird/files/patch-mozilla-gfx-qcms-qcmstypes.h
   trunk/www/firefox-nightly/Makefile.hgrev
   trunk/www/firefox-nightly/distinfo
   trunk/www/firefox/Makefile
   trunk/www/firefox/distinfo
   trunk/www/firefox/files/patch-alsapulse
   trunk/www/seamonkey/Makefile
   trunk/www/seamonkey/distinfo
   trunk/www/seamonkey/files/extra-bug780531
   trunk/www/seamonkey/files/patch-alsapulse
   trunk/www/seamonkey/files/patch-bug722975
   trunk/www/seamonkey/files/patch-bug791305
   trunk/www/seamonkey/files/patch-bug806139
   trunk/www/seamonkey/files/patch-mozilla-content-media-nsAudioStream.cpp
   trunk/www/seamonkey/files/patch-mozilla-gfx-qcms-qcmstypes.h

Modified: trunk/mail/thunderbird/Makefile
==============================================================================
--- trunk/mail/thunderbird/Makefile	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/mail/thunderbird/Makefile	Mon Dec  3 18:03:03 2012	(r1110)
@@ -2,7 +2,7 @@
 # $FreeBSD: ports/mail/thunderbird/Makefile,v 1.153 2012/06/19 18:27:11 beat Exp $
 
 PORTNAME=	thunderbird
-DISTVERSION=	17.0
+DISTVERSION=	18.0b1
 CATEGORIES=	mail ipv6
 MASTER_SITES=	${MASTER_SITE_MOZILLA}
 MASTER_SITE_SUBDIR=	${PORTNAME}/releases/${DISTVERSION}/source
@@ -23,6 +23,7 @@
 
 USE_AUTOTOOLS=	autoconf213:env
 USE_PYTHON_BUILD=-2.7
+OBJDIR_BUILD=	# in-tree build broken after bug 789837
 USE_GECKO=	gecko
 CONFLICTS=	thunderbird-10.*
 USE_MOZILLA=	# empty
@@ -57,7 +58,7 @@
 .include "${.CURDIR}/../../www/firefox/Makefile.options"
 .include <bsd.port.pre.mk>
 
-WRKSRC=		${WRKDIR}/comm-release
+WRKSRC=		${WRKDIR}/comm-beta
 MOZSRC:=	${WRKSRC}/mozilla
 
 XPI_LIBDIR=	${PREFIX}/lib/xpi
@@ -107,6 +108,8 @@
 .endif
 
 post-patch:
+	@${REINPLACE_CMD} -e '/MOZPNG/s/=[0-9]*/=10511/' \
+		${MOZSRC}/configure.in ${WRKSRC}/configure.in
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
 		${WRKSRC}/mail/app/nsMailApp.cpp
 .if ${PORT_OPTIONS:MENIGMAIL}

Modified: trunk/mail/thunderbird/distinfo
==============================================================================
--- trunk/mail/thunderbird/distinfo	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/mail/thunderbird/distinfo	Mon Dec  3 18:03:03 2012	(r1110)
@@ -1,4 +1,4 @@
-SHA256 (thunderbird-17.0.source.tar.bz2) = 08a102f21511afb696980b7c35b75f385f4260fba5f1c0b1b488ab81a49dbede
-SIZE (thunderbird-17.0.source.tar.bz2) = 113270266
+SHA256 (thunderbird-18.0b1.source.tar.bz2) = 60a31745fc0ee4fc5597de6663a757f55c0bd61494f67607e3b914c73e236c72
+SIZE (thunderbird-18.0b1.source.tar.bz2) = 119356332
 SHA256 (enigmail-1.4.6.tar.gz) = f3771d1faa26676818bab5e2c50dce85013b9de30b82de526159eaa7ca34f036
 SIZE (enigmail-1.4.6.tar.gz) = 1262280

Modified: trunk/mail/thunderbird/files/extra-bug780531
==============================================================================
--- trunk/mail/thunderbird/files/extra-bug780531	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/mail/thunderbird/files/extra-bug780531	Mon Dec  3 18:03:03 2012	(r1110)
@@ -8,6 +8,6 @@
 -arm*)
 +case "$target" in
 +arm-*-linux*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
-     MOZ_SAMPLE_TYPE_S16LE=1
-     AC_DEFINE(MOZ_SAMPLE_TYPE_S16LE)
-     AC_SUBST(MOZ_SAMPLE_TYPE_S16LE)
+     MOZ_SAMPLE_TYPE_S16=1
+     AC_DEFINE(MOZ_SAMPLE_TYPE_S16)
+     AC_SUBST(MOZ_SAMPLE_TYPE_S16)

Modified: trunk/mail/thunderbird/files/patch-alsapulse
==============================================================================
--- trunk/mail/thunderbird/files/patch-alsapulse	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/mail/thunderbird/files/patch-alsapulse	Mon Dec  3 18:03:03 2012	(r1110)
@@ -2,21 +2,18 @@
 index 5980b76..11f5f77 100644
 --- mozilla/configure.in
 +++ mozilla/configure.in
-@@ -5600,13 +5600,25 @@ dnl ========================================================
- dnl = Check alsa availability on Linux if using sydneyaudio
- dnl ========================================================
+@@ -5618,11 +5618,25 @@ dnl ========================================================
  
-+MOZ_ARG_ENABLE_BOOL(alsa,
-+[  --enable-alsa          Enable Alsa support (default on Linux)],
-+MOZ_ALSA=1,
-+MOZ_ALSA= MOZ_ALSA_FORCE=$enableval)
-+
  dnl If using sydneyaudio with Linux, ensure that the alsa library is available
--if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then
-+if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux" -a "$MOZ_ALSA_FORCE" != "no"; then
+ if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then
 +    MOZ_ALSA=1
 +fi
 +
++MOZ_ARG_ENABLE_BOOL(alsa,
++[  --enable-alsa          Enable Alsa support (default on Linux)],
++MOZ_ALSA=1,
++MOZ_ALSA=)
++
 +if test -n "$MOZ_ALSA"; then
 +    AC_DEFINE(MOZ_CUBEB)
      PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
@@ -25,10 +22,21 @@
  fi
  
 +AC_SUBST(MOZ_ALSA)
++AC_SUBST(MOZ_ALSA_CFLAGS)
++AC_SUBST(MOZ_ALSA_LIBS)
 +
  dnl ========================================================
  dnl = Enable PulseAudio
  dnl ========================================================
+@@ -8633,8 +8647,6 @@ AC_SUBST(MOZ_VP8_ERROR_CONCEALMENT)
+ AC_SUBST(MOZ_VP8_ENCODER)
+ AC_SUBST(MOZ_VP8)
+ AC_SUBST(MOZ_OGG)
+-AC_SUBST(MOZ_ALSA_LIBS)
+-AC_SUBST(MOZ_ALSA_CFLAGS)
+ AC_SUBST(VPX_AS)
+ AC_SUBST(VPX_ASFLAGS)
+ AC_SUBST(VPX_DASH_C_FLAG)
 diff --git mozilla/media/libcubeb/src/Makefile.in mozilla/media/libcubeb/src/Makefile.in
 index 5ab4dd8..c8df26f 100644
 --- mozilla/media/libcubeb/src/Makefile.in

Modified: trunk/mail/thunderbird/files/patch-bug722975
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug722975	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/mail/thunderbird/files/patch-bug722975	Mon Dec  3 18:03:03 2012	(r1110)
@@ -7,13 +7,13 @@
 diff --git a/mozilla/gfx/thebes/gfxPlatform.cpp b/mozilla/gfx/thebes/gfxPlatform.cpp
 --- mozilla/gfx/thebes/gfxPlatform.cpp
 +++ mozilla/gfx/thebes/gfxPlatform.cpp
-@@ -484,21 +484,19 @@ gfxPlatform::CreateDrawTargetForSurface(
+@@ -502,21 +502,19 @@ struct SourceSurfaceUserData
+   BackendType mBackendType;
+ };
  
- cairo_user_data_key_t kSourceSurface;
- 
- void SourceBufferDestroy(void *srcBuffer)
+ void SourceBufferDestroy(void *srcSurfUD)
  {
-   static_cast<SourceSurface*>(srcBuffer)->Release();
+   delete static_cast<SourceSurfaceUserData*>(srcSurfUD);
  }
  
 -void SourceSnapshotDetached(cairo_surface_t *nullSurf)
@@ -31,7 +31,7 @@
  {
    void *userData = aSurface->GetData(&kSourceSurface);
  
-@@ -588,24 +586,19 @@ gfxPlatform::GetSourceSurfaceForSurface(
+@@ -621,24 +619,19 @@ gfxPlatform::GetSourceSurfaceForSurface(
        }
  
        srcBuffer = Factory::CreateWrappingDataSourceSurface(imgSurface->Data(),
@@ -53,9 +53,9 @@
 +                                SourceSnapshotDetached, imgSurface.get());
    }
  
-   srcBuffer->AddRef();
-   aSurface->SetData(&kSourceSurface, srcBuffer, SourceBufferDestroy);
+   SourceSurfaceUserData *srcSurfUD = new SourceSurfaceUserData;
+   srcSurfUD->mBackendType = aTarget->GetType();
+   srcSurfUD->mSrcSurface = srcBuffer;
+   aSurface->SetData(&kSourceSurface, srcSurfUD, SourceBufferDestroy);
  
    return srcBuffer;
- }
- 

Deleted: trunk/mail/thunderbird/files/patch-bug753046
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug753046	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,1213 +0,0 @@
-# Bug 753046 - Add support for DragonFly/NetBSD
-
-$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig	2011-12-20 23:28:14.000000000 +0000
-+++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp
-@@ -5,6 +5,7 @@
-  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- 
- #ifdef MOZ_WIDGET_QT
-+#include <unistd.h> // for _exit()
- #include <QtCore/QTimer>
- #include "nsQAppInstance.h"
- #include "NestedLoopTimer.h"
-@@ -228,7 +228,7 @@ PluginModuleChild::Init(const std::strin
- 
-     // TODO: use PluginPRLibrary here
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     mShutdownFunc =
-         (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown");
- 
-@@ -1790,7 +1790,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin
-     PLUGIN_LOG_DEBUG_METHOD;
-     AssertPluginThread();
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     return true;
- #elif defined(OS_WIN) || defined(OS_MACOSX)
-     *_retval = mGetEntryPointsFunc(&mFunctions);
-@@ -1823,7 +1823,7 @@ PluginModuleChild::AnswerNP_Initialize(N
-     SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/));
- #endif
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions);
-     return true;
- #elif defined(OS_WIN) || defined(OS_MACOSX)
-$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/dom/plugins/ipc/PluginModuleChild.h.orig	2011-12-20 23:28:14.000000000 +0000
-+++ mozilla/dom/plugins/ipc/PluginModuleChild.h
-@@ -340,7 +340,7 @@ private:
- 
-     // we get this from the plugin
-     NP_PLUGINSHUTDOWN mShutdownFunc;
--#ifdef OS_LINUX
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     NP_PLUGINUNIXINIT mInitializeFunc;
- #elif defined(OS_WIN) || defined(OS_MACOSX)
-     NP_PLUGININIT mInitializeFunc;
-$NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/Makefile.in.orig	2012-02-16 06:40:33.000000000 +0000
-+++ mozilla/ipc/chromium/Makefile.in
-@@ -278,6 +278,33 @@ endif
- 
- endif # } OS_LINUX
- 
-+ifdef OS_BSD # {
-+
-+CPPSRCS += \
-+  atomicops_internals_x86_gcc.cc \
-+  process_util_bsd.cc \
-+  time_posix.cc \
-+  $(NULL)
-+
-+ifdef MOZ_ENABLE_GTK2
-+CPPSRCS += \
-+  message_pump_glib.cc \
-+  $(NULL)
-+endif
-+
-+ifdef MOZ_ENABLE_QT
-+MOCSRCS = \
-+  moc_message_pump_qt.cc \
-+  $(NULL)
-+
-+CPPSRCS += \
-+  $(MOCSRCS) \
-+  message_pump_qt.cc \
-+  $(NULL)
-+endif
-+
-+endif # } OS_BSD
-+
- # libevent
- 
- ifndef MOZ_NATIVE_LIBEVENT # {
-$NetBSD: patch-ipc_chromium_chromium-config.mk,v 1.2 2012/03/15 08:30:06 ryoon Exp $
-
---- mozilla/ipc/chromium/chromium-config.mk.orig	2012-02-16 07:40:33.000000000 +0100
-+++ mozilla/ipc/chromium/chromium-config.mk	2012-03-11 11:05:40.397182000 +0100
-@@ -56,17 +56,6 @@
-   -I$(DEPTH)/ipc/ipdl/_ipdlheaders \
-   $(NULL)
- 
--ifeq ($(OS_ARCH),Darwin) # {
--
--OS_MACOSX = 1
--OS_POSIX = 1
--
--DEFINES += \
--  -DOS_MACOSX=1 \
--  -DOS_POSIX=1 \
--  $(NULL)
--
--else # } {
- ifeq ($(OS_ARCH),WINNT) # {
- OS_LIBS += $(call EXPAND_LIBNAME,psapi shell32 dbghelp)
- 
-@@ -93,13 +82,65 @@
- endif
- 
- else # } {
--
--OS_LINUX = 1
- OS_POSIX = 1
-+DEFINES += -DOS_POSIX=1
-+
-+ifeq ($(OS_ARCH),Darwin) # {
-+
-+OS_MACOSX = 1
-+DEFINES += \
-+  -DOS_MACOSX=1 \
-+  $(NULL)
-+
-+else # } {
-+ifeq ($(OS_ARCH),DragonFly) # {
-+
-+OS_DRAGONFLY = 1
-+OS_BSD = 1
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+DEFINES += \
-+  -DOS_DRAGONFLY=1 \
-+  -DOS_BSD=1 \
-+  $(NULL)
-+
-+else # } {
-+ifeq ($(OS_ARCH),FreeBSD) # {
-+
-+OS_FREEBSD = 1
-+OS_BSD = 1
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+DEFINES += \
-+  -DOS_FREEBSD=1 \
-+  -DOS_BSD=1 \
-+  $(NULL)
- 
-+else # } {
-+ifeq ($(OS_ARCH),NetBSD) # {
-+
-+OS_NETBSD = 1
-+OS_BSD = 1
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+DEFINES += \
-+  -DOS_NETBSD=1 \
-+  -DOS_BSD=1 \
-+  $(NULL)
-+
-+else # } {
-+ifeq ($(OS_ARCH),OpenBSD) # {
-+
-+OS_OPENBSD = 1
-+OS_BSD = 1
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+DEFINES += \
-+  -DOS_OPENBSD=1 \
-+  -DOS_BSD=1 \
-+  $(NULL)
-+
-+else # } {
-+
-+OS_LINUX = 1
- DEFINES += \
-   -DOS_LINUX=1 \
--  -DOS_POSIX=1 \
-   $(NULL)
- 
- # NB: to stop gcc warnings about exporting template instantiation
-@@ -107,4 +147,8 @@
- 
- endif # }
- endif # }
-+endif # }
-+endif # }
-+endif # }
-+endif # }
- 
-$NetBSD: patch-ipc_chromium_src_base_base__paths.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/base_paths.h.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/base_paths.h
-@@ -13,7 +13,7 @@
- #include "base/base_paths_win.h"
- #elif defined(OS_MACOSX)
- #include "base/base_paths_mac.h"
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
- #include "base/base_paths_linux.h"
- #endif
- #include "base/path_service.h"
-$NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:18:45 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig	2012-03-13 01:36:53.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/debug_util_posix.cc
-@@ -5,7 +5,7 @@
- #include "build/build_config.h"
- #include "base/debug_util.h"
- 
--#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__))
-+#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID))
- 
- #include <errno.h>
- #include <fcntl.h>
-@@ -17,9 +17,16 @@
- #include <unistd.h>
- #if MOZ_HAVE_EXECINFO_H
- #include <execinfo.h>
-+#endif
-+
-+#if defined(OS_MACOSX) || defined(OS_BSD)
- #include <sys/sysctl.h>
- #endif
- 
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
-+#include <sys/user.h>
-+#endif
-+
- #include "base/basictypes.h"
- #include "base/eintr_wrapper.h"
- #include "base/logging.h"
-@@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u
-   return false;
- }
- 
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_BSD)
- 
- // Based on Apple's recommended method as described in
- // http://developer.apple.com/qa/qa2004/qa1361.html
-@@ -71,7 +76,15 @@ bool DebugUtil::BeingDebugged() {
- 
-   // This process is being debugged if the P_TRACED flag is set.
-   is_set = true;
-+#if defined(OS_DRAGONFLY)
-+  being_debugged = (info.kp_flags & P_TRACED) != 0;
-+#elif defined(OS_FREEBSD)
-+  being_debugged = (info.ki_flag & P_TRACED) != 0;
-+#elif defined(OS_OPENBSD)
-+  being_debugged = (info.p_flag & P_TRACED) != 0;
-+#else
-   being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0;
-+#endif
-   return being_debugged;
- }
- 
-diff --git ipc/chromium/src/base/dir_reader_bsd.h ipc/chromium/src/base/dir_reader_bsd.h
-new file mode 100644
-index 0000000..3fc1a87
---- /dev/null
-+++ mozilla/ipc/chromium/src/base/dir_reader_bsd.h
-@@ -0,0 +1,112 @@
-+// Copyright (c) 2010 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.
-+
-+// derived from dir_reader_linux.h
-+
-+#ifndef BASE_DIR_READER_BSD_H_
-+#define BASE_DIR_READER_BSD_H_
-+#pragma once
-+
-+#include <dirent.h>
-+#include <errno.h>
-+#include <fcntl.h>
-+#include <stdint.h>
-+#include <unistd.h>
-+
-+#include "base/logging.h"
-+#include "base/eintr_wrapper.h"
-+
-+// See the comments in dir_reader_posix.h about this.
-+
-+namespace base {
-+
-+class DirReaderBSD {
-+ public:
-+  explicit DirReaderBSD(const char* directory_path)
-+#ifdef O_DIRECTORY
-+      : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)),
-+#else
-+      : fd_(open(directory_path, O_RDONLY)),
-+#endif
-+        offset_(0),
-+        size_(0) {
-+    memset(buf_, 0, sizeof(buf_));
-+  }
-+
-+  ~DirReaderBSD() {
-+    if (fd_ >= 0) {
-+      if (HANDLE_EINTR(close(fd_)))
-+        DLOG(ERROR) << "Failed to close directory handle";
-+    }
-+  }
-+
-+  bool IsValid() const {
-+    return fd_ >= 0;
-+  }
-+
-+  // Move to the next entry returning false if the iteration is complete.
-+  bool Next() {
-+    if (size_) {
-+      struct dirent* dirent = reinterpret_cast<struct dirent*>(&buf_[offset_]);
-+#ifdef OS_DRAGONFLY
-+      offset_ += _DIRENT_DIRSIZ(dirent);
-+#else
-+      offset_ += dirent->d_reclen;
-+#endif
-+    }
-+
-+    if (offset_ != size_)
-+      return true;
-+
-+#ifdef OS_OPENBSD
-+    const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_);
-+#else
-+    const int r = getdents(fd_, buf_, sizeof(buf_));
-+#endif
-+    if (r == 0)
-+      return false;
-+    if (r == -1) {
-+#ifdef OS_OPENBSD
-+      DLOG(ERROR) << "getdirentries returned an error: " << errno;
-+#else
-+      DLOG(ERROR) << "getdents returned an error: " << errno;
-+#endif
-+      return false;
-+    }
-+    size_ = r;
-+    offset_ = 0;
-+    return true;
-+  }
-+
-+  const char* name() const {
-+    if (!size_)
-+      return NULL;
-+
-+    const struct dirent* dirent =
-+        reinterpret_cast<const struct dirent*>(&buf_[offset_]);
-+    return dirent->d_name;
-+  }
-+
-+  int fd() const {
-+    return fd_;
-+  }
-+
-+  static bool IsFallback() {
-+    return false;
-+  }
-+
-+ private:
-+  const int fd_;
-+  char buf_[512];
-+#ifdef OS_OPENBSD
-+  off_t *basep_;
-+#endif
-+  size_t offset_, size_;
-+
-+  DISALLOW_COPY_AND_ASSIGN(DirReaderBSD);
-+};
-+
-+}  // namespace base
-+
-+#endif // BASE_DIR_READER_BSD_H_
-diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_reader_posix.h
-index 9a34492..62b280c 100644
---- mozilla/ipc/chromium/src/base/dir_reader_posix.h
-+++ mozilla/ipc/chromium/src/base/dir_reader_posix.h
-@@ -18,16 +18,20 @@
- // seems worse than falling back to enumerating all file descriptors so we will
- // probably never implement this on the Mac.
- 
--#if defined(OS_LINUX) && !defined(OS_OPENBSD)
-+#if defined(OS_LINUX)
- #include "base/dir_reader_linux.h"
-+#elif defined(OS_BSD)
-+#include "base/dir_reader_bsd.h"
- #else
- #include "base/dir_reader_fallback.h"
- #endif
- 
- namespace base {
- 
--#if defined(OS_LINUX) && !defined(OS_OPENBSD)
-+#if defined(OS_LINUX)
- typedef DirReaderLinux DirReaderPosix;
-+#elif defined(OS_BSD)
-+typedef DirReaderBSD DirReaderPosix;
- #else
- typedef DirReaderFallback DirReaderPosix;
- #endif
-$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/file_util_posix.cc
-@@ -31,7 +31,7 @@
- #include "base/time.h"
- 
- // FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine
--#if defined(OS_FREEBSD) || defined(OS_OPENBSD)
-+#ifndef HAVE_STAT64
- #define stat64 stat
- #endif
- 
-$NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/message_loop.cc.orig	2012-02-16 07:40:33.000000000 +0100
-+++ mozilla/ipc/chromium/src/base/message_loop.cc	2012-02-21 21:24:41.000000000 +0100
-@@ -19,7 +19,7 @@
- #if defined(OS_POSIX)
- #include "base/message_pump_libevent.h"
- #endif
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- #ifdef MOZ_WIDGET_GTK2
- #include "base/message_pump_glib.h"
- #endif
-@@ -119,7 +119,7 @@
-   if (type_ == TYPE_UI) {
- #if defined(OS_MACOSX)
-     pump_ = base::MessagePumpMac::Create();
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-     pump_ = new base::MessagePumpForUI();
- #endif  // OS_LINUX
-   } else if (type_ == TYPE_IO) {
-$NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/platform_thread.h.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/platform_thread.h
-@@ -22,9 +22,12 @@ typedef void* PlatformThreadHandle;  // HANDLE
- #elif defined(OS_POSIX)
- #include <pthread.h>
- typedef pthread_t PlatformThreadHandle;
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_OPENBSD)
- #include <unistd.h>
- typedef pid_t PlatformThreadId;
-+#elif defined(OS_BSD)
-+#include <sys/types.h>
-+typedef lwpid_t PlatformThreadId;
- #elif defined(OS_MACOSX)
- #include <mach/mach.h>
- typedef mach_port_t PlatformThreadId;
-$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig	2012-03-13 01:36:53.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc
-@@ -9,16 +9,30 @@
- 
- #if defined(OS_MACOSX)
- #include <mach/mach.h>
-+#elif defined(OS_NETBSD)
-+#include <lwp.h>
- #elif defined(OS_LINUX)
- #include <sys/syscall.h>
--#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
- #include <sys/prctl.h>
--#elif !defined(__NetBSD__)
--#include <pthread_np.h>
-+#elif defined(OS_FREEBSD)
-+#include <sys/param.h>
-+#if __FreeBSD_version > 802500
-+#include <sys/thr.h>
-+#else
-+_Pragma("GCC visibility push(default)")
-+extern "C" int thr_self(long *);
-+_Pragma("GCC visibility pop")
-+#endif
- #endif
-+
-+#if !defined(OS_MACOSX)
- #include <unistd.h>
- #endif
- 
-+#if defined(OS_BSD) && !defined(OS_NETBSD)
-+#include <pthread_np.h>
-+#endif
-+
- #if defined(OS_MACOSX)
- namespace base {
- void InitThreading();
-@@ -38,9 +45,20 @@ PlatformThreadId PlatformThread::CurrentId() {
-   // into the kernel.
- #if defined(OS_MACOSX)
-   return mach_thread_self();
--#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
-+#elif defined(OS_NETBSD)
-+  return _lwp_self();
-+#elif defined(OS_DRAGONFLY)
-+  return lwp_gettid();
-+#elif defined(OS_FREEBSD)
-+#  if __FreeBSD_version > 900030
-+    return pthread_getthreadid_np();
-+#  else
-+    long lwpid;
-+    thr_self(&lwpid);
-+    return lwpid;
-+#  endif
-+#elif defined(OS_OPENBSD)
--  // TODO(BSD): find a better thread ID
--  return (intptr_t)(pthread_self());
-+  return (intptr_t) (pthread_self());
- #elif defined(OS_LINUX)
-   return syscall(__NR_gettid);
- #endif
-@@ -102,9 +102,9 @@ void PlatformThread::SetName(const char* name) {
-   // Note that glibc also has a 'pthread_setname_np' api, but it may not be
-   // available everywhere and it's only benefit over using prctl directly is
-   // that it can set the name of threads other than the current thread.
--#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
-+#if defined(OS_BSD) && !defined(OS_NETBSD)
-   pthread_set_name_np(pthread_self(), name);
--#elif defined(__NetBSD__)
-+#elif defined(OS_NETBSD)
-   pthread_setname_np(pthread_self(), "%s", (void *)name);
- #else
-   prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0); 
-$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/process_util.h.orig	2011-12-21 00:28:19.000000000 +0100
-+++ mozilla/ipc/chromium/src/base/process_util.h	2012-01-31 13:14:54.000000000 +0100
-@@ -280,6 +280,7 @@ class NamedProcessIterator {
-   const ProcessEntry* NextProcessEntry();
- 
-  private:
-+#if !defined(OS_BSD)
-   // Determines whether there's another process (regardless of executable)
-   // left in the list of all processes.  Returns true and sets entry_ to
-   // that process's info if there is one, false otherwise.
-@@ -292,18 +292,24 @@
-   void InitProcessEntry(ProcessEntry* entry);
- 
-   std::wstring executable_name_;
-+#endif
- 
- #if defined(OS_WIN)
-   HANDLE snapshot_;
-   bool started_iteration_;
- #elif defined(OS_LINUX)
-   DIR *procfs_dir_;
-+#elif defined(OS_BSD)
-+  std::vector<ProcessEntry> content;
-+  size_t nextEntry;
- #elif defined(OS_MACOSX)
-   std::vector<kinfo_proc> kinfo_procs_;
-   size_t index_of_kinfo_proc_;
- #endif
-+#if !defined(OS_BSD)
-   ProcessEntry entry_;
-   const ProcessFilter* filter_;
-+#endif
- 
-   DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator);
- };
-$NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig	2012-04-01 00:04:28.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/process_util_bsd.cc
-@@ -0,0 +1,367 @@
-+// 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.
-+
-+// derived from process_util_linux.cc and process_util_mac.cc
-+
-+#include "base/process_util.h"
-+
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#include <sys/wait.h>
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
-+#include <sys/user.h>
-+#endif
-+
-+#include <ctype.h>
-+#include <fcntl.h>
-+#include <kvm.h>
-+#include <unistd.h>
-+
-+#include <string>
-+
-+#include "base/debug_util.h"
-+#include "base/eintr_wrapper.h"
-+#include "base/file_util.h"
-+#include "base/logging.h"
-+#include "base/string_tokenizer.h"
-+#include "base/string_util.h"
-+
-+#if (defined(_POSIX_SPAWN) && _POSIX_SPAWN > 0) \
-+  || (defined(OS_NETBSD) && __NetBSD_Version__ >= 599006500)
-+#define HAVE_POSIX_SPAWN	1
-+#endif
-+
-+/*
-+ * On platforms that are not gonk based, we fall back to an arbitrary
-+ * UID. This is generally the UID for user `nobody', albeit it is not
-+ * always the case.
-+ */
-+
-+#if defined(OS_NETBSD) || defined(OS_OPENBSD)
-+# define CHILD_UNPRIVILEGED_UID 32767
-+# define CHILD_UNPRIVILEGED_GID 32767
-+#else
-+# define CHILD_UNPRIVILEGED_UID 65534
-+# define CHILD_UNPRIVILEGED_GID 65534
-+#endif
-+
-+#ifndef __dso_public
-+# ifdef __exported
-+#  define __dso_public	__exported
-+# else
-+#  define __dso_public	__attribute__((__visibility__("default")))
-+# endif
-+#endif
-+
-+#ifdef HAVE_POSIX_SPAWN
-+#include <spawn.h>
-+extern "C" char **environ __dso_public;
-+#endif
-+
-+namespace {
-+
-+enum ParsingState {
-+  KEY_NAME,
-+  KEY_VALUE
-+};
-+
-+static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG");
-+
-+}  // namespace
-+
-+namespace base {
-+
-+#ifdef HAVE_POSIX_SPAWN
-+
-+void FreeEnvVarsArray(char* array[], int length)
-+{
-+  for (int i = 0; i < length; i++) {
-+    free(array[i]);
-+  }
-+  delete[] array;
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+               const file_handle_mapping_vector& fds_to_remap,
-+               bool wait, ProcessHandle* process_handle) {
-+  return LaunchApp(argv, fds_to_remap, environment_map(),
-+                   wait, process_handle);
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+               const file_handle_mapping_vector& fds_to_remap,
-+               const environment_map& env_vars_to_set,
-+               bool wait, ProcessHandle* process_handle,
-+               ProcessArchitecture arch) {
-+  return LaunchApp(argv, fds_to_remap, env_vars_to_set,
-+                   SAME_PRIVILEGES_AS_PARENT,
-+                   wait, process_handle);
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+               const file_handle_mapping_vector& fds_to_remap,
-+               const environment_map& env_vars_to_set,
-+               ChildPrivileges privs,
-+               bool wait, ProcessHandle* process_handle,
-+               ProcessArchitecture arch) {
-+  bool retval = true;
-+
-+  char* argv_copy[argv.size() + 1];
-+  for (size_t i = 0; i < argv.size(); i++) {
-+    argv_copy[i] = const_cast<char*>(argv[i].c_str());
-+  }
-+  argv_copy[argv.size()] = NULL;
-+
-+  // Make sure we don't leak any FDs to the child process by marking all FDs
-+  // as close-on-exec.
-+  SetAllFDsToCloseOnExec();
-+
-+  // Copy environment to a new char array and add the variables
-+  // in env_vars_to_set.
-+  // Existing variables are overwritten by env_vars_to_set.
-+  int pos = 0;
-+  environment_map combined_env_vars = env_vars_to_set;
-+  while(environ[pos] != NULL) {
-+    std::string varString = environ[pos];
-+    std::string varName = varString.substr(0, varString.find_first_of('='));
-+    std::string varValue = varString.substr(varString.find_first_of('=') + 1);
-+    if (combined_env_vars.find(varName) == combined_env_vars.end()) {
-+      combined_env_vars[varName] = varValue;
-+    }
-+    pos++;
-+  }
-+  int varsLen = combined_env_vars.size() + 1;
-+
-+  char** vars = new char*[varsLen];
-+  int i = 0;
-+  for (environment_map::const_iterator it = combined_env_vars.begin();
-+       it != combined_env_vars.end(); ++it) {
-+    std::string entry(it->first);
-+    entry += "=";
-+    entry += it->second;
-+    vars[i] = strdup(entry.c_str());
-+    i++;
-+  }
-+  vars[i] = NULL;
-+
-+  posix_spawn_file_actions_t file_actions;
-+  if (posix_spawn_file_actions_init(&file_actions) != 0) {
-+    FreeEnvVarsArray(vars, varsLen);
-+    return false;
-+  }
-+
-+  // Turn fds_to_remap array into a set of dup2 calls.
-+  for (file_handle_mapping_vector::const_iterator it = fds_to_remap.begin();
-+       it != fds_to_remap.end();
-+       ++it) {
-+    int src_fd = it->first;
-+    int dest_fd = it->second;
-+
-+    if (src_fd == dest_fd) {
-+      int flags = fcntl(src_fd, F_GETFD);
-+      if (flags != -1) {
-+        fcntl(src_fd, F_SETFD, flags & ~FD_CLOEXEC);
-+      }
-+    } else {
-+      if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) {
-+        posix_spawn_file_actions_destroy(&file_actions);
-+        FreeEnvVarsArray(vars, varsLen);
-+        return false;
-+      }
-+    }
-+  }
-+
-+  pid_t pid = 0;
-+  int spawn_succeeded = (posix_spawnp(&pid,
-+                                      argv_copy[0],
-+                                      &file_actions,
-+                                      NULL,
-+                                      argv_copy,
-+                                      vars) == 0);
-+
-+  FreeEnvVarsArray(vars, varsLen);
-+
-+  posix_spawn_file_actions_destroy(&file_actions);
-+
-+  bool process_handle_valid = pid > 0;
-+  if (!spawn_succeeded || !process_handle_valid) {
-+    retval = false;
-+  } else {
-+    if (wait)
-+      HANDLE_EINTR(waitpid(pid, 0, 0));
-+
-+    if (process_handle)
-+      *process_handle = pid;
-+  }
-+
-+  return retval;
-+}
-+
-+bool LaunchApp(const CommandLine& cl,
-+               bool wait, bool start_hidden, ProcessHandle* process_handle) {
-+  // TODO(playmobil): Do we need to respect the start_hidden flag?
-+  file_handle_mapping_vector no_files;
-+  return LaunchApp(cl.argv(), no_files, wait, process_handle);
-+}
-+
-+#else // no posix_spawn, use fork/exec
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+               const file_handle_mapping_vector& fds_to_remap,
-+               bool wait, ProcessHandle* process_handle) {
-+  return LaunchApp(argv, fds_to_remap, environment_map(),
-+                   wait, process_handle);
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+               const file_handle_mapping_vector& fds_to_remap,
-+               const environment_map& env_vars_to_set,
-+               bool wait, ProcessHandle* process_handle,
-+               ProcessArchitecture arch) {
-+  return LaunchApp(argv, fds_to_remap, env_vars_to_set,
-+                   SAME_PRIVILEGES_AS_PARENT,
-+                   wait, process_handle);
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+               const file_handle_mapping_vector& fds_to_remap,
-+               const environment_map& env_vars_to_set,
-+               ChildPrivileges privs,
-+               bool wait, ProcessHandle* process_handle,
-+               ProcessArchitecture arch) {
-+  scoped_array<char*> argv_cstr(new char*[argv.size() + 1]);
-+  // Illegal to allocate memory after fork and before execvp
-+  InjectiveMultimap fd_shuffle1, fd_shuffle2;
-+  fd_shuffle1.reserve(fds_to_remap.size());
-+  fd_shuffle2.reserve(fds_to_remap.size());
-+
-+  pid_t pid = fork();
-+  if (pid < 0)
-+    return false;
-+
-+  if (pid == 0) {
-+    for (file_handle_mapping_vector::const_iterator
-+        it = fds_to_remap.begin(); it != fds_to_remap.end(); ++it) {
-+      fd_shuffle1.push_back(InjectionArc(it->first, it->second, false));
-+      fd_shuffle2.push_back(InjectionArc(it->first, it->second, false));
-+    }
-+
-+    if (!ShuffleFileDescriptors(&fd_shuffle1))
-+      _exit(127);
-+
-+    CloseSuperfluousFds(fd_shuffle2);
-+
-+    for (size_t i = 0; i < argv.size(); i++)
-+      argv_cstr[i] = const_cast<char*>(argv[i].c_str());
-+    argv_cstr[argv.size()] = NULL;
-+
-+    if (privs == UNPRIVILEGED) {
-+      if (setgid(CHILD_UNPRIVILEGED_GID) != 0) {
-+        DLOG(ERROR) << "FAILED TO setgid() CHILD PROCESS, path: " << argv_cstr[0];
-+        _exit(127);
-+      }
-+      if (setuid(CHILD_UNPRIVILEGED_UID) != 0) {
-+        DLOG(ERROR) << "FAILED TO setuid() CHILD PROCESS, path: " << argv_cstr[0];
-+        _exit(127);
-+      }
-+      if (chdir("/") != 0)
-+        gProcessLog.print("==> could not chdir()\n");
-+    }
-+
-+    for (environment_map::const_iterator it = env_vars_to_set.begin();
-+         it != env_vars_to_set.end(); ++it) {
-+      if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/))
-+        _exit(127);
-+    }
-+    execv(argv_cstr[0], argv_cstr.get());
-+    // if we get here, we're in serious trouble and should complain loudly
-+    DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0];
-+    _exit(127);
-+  } else {
-+    gProcessLog.print("==> process %d launched child process %d\n",
-+                      GetCurrentProcId(), pid);
-+    if (wait)
-+      HANDLE_EINTR(waitpid(pid, 0, 0));
-+
-+    if (process_handle)
-+      *process_handle = pid;
-+  }
-+
-+  return true;
-+}
-+
-+bool LaunchApp(const CommandLine& cl,
-+               bool wait, bool start_hidden,
-+               ProcessHandle* process_handle) {
-+  file_handle_mapping_vector no_files;
-+  return LaunchApp(cl.argv(), no_files, wait, process_handle);
-+}
-+
-+#endif
-+
-+NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name,
-+                                           const ProcessFilter* filter)
-+{
-+  int numEntries;
-+  kvm_t *kvm;
-+  std::string exe(WideToASCII(executable_name));
-+
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
-+  kvm  = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL);
-+  struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries);
-+  if (procs != NULL && numEntries > 0) {
-+    for (int i = 0; i < numEntries; i++) {
-+#  if defined(OS_DRAGONFLY)
-+    if (exe != procs[i].kp_comm) continue;
-+      if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue;
-+      ProcessEntry e;
-+      e.pid = procs[i].kp_pid;
-+      e.ppid = procs[i].kp_ppid;
-+      strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile);
-+      content.push_back(e);
-+#  elif defined(OS_FREEBSD)
-+    if (exe != procs[i].ki_comm) continue;
-+      if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue;
-+      ProcessEntry e;
-+      e.pid = procs[i].ki_pid;
-+      e.ppid = procs[i].ki_ppid;
-+      strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile);
-+      content.push_back(e);
-+#  endif
-+#else
-+  kvm  = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL);
-+#if defined(OS_OPENBSD)
-+  struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc), &numEntries);
-+#else
-+  struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries);
-+#endif
-+  if (procs != NULL && numEntries > 0) {
-+    for (int i = 0; i < numEntries; i++) {
-+    if (exe != procs[i].p_comm) continue;
-+      if (filter && !filter->Includes(procs[i].p_pid, procs[i].p_ppid)) continue;
-+      ProcessEntry e;
-+      e.pid = procs[i].p_pid;
-+      e.ppid = procs[i].p_ppid;
-+      strlcpy(e.szExeFile, procs[i].p_comm, sizeof e.szExeFile);
-+      content.push_back(e);
-+#endif
-+    }
-+  }
-+  nextEntry = 0;
-+  kvm_close(kvm);
-+}
-+
-+NamedProcessIterator::~NamedProcessIterator() {
-+}
-+
-+const ProcessEntry* NamedProcessIterator::NextProcessEntry() {
-+  if (nextEntry >= content.size()) return NULL;
-+  return &content[nextEntry++];
-+}
-+
-+bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
-+  return false;
-+}
-+
-+}  // namespace base
-$NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/process_util_posix.cc.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/process_util_posix.cc
-@@ -116,6 +116,11 @@ void CloseSuperfluousFds(const base::Inj
- #elif defined(OS_MACOSX)
-   static const rlim_t kSystemDefaultMaxFds = 256;
-   static const char kFDDir[] = "/dev/fd";
-+#elif defined(OS_BSD)
-+  // the getrlimit below should never fail, so whatever ..
-+  static const rlim_t kSystemDefaultMaxFds = 1024;
-+  // at least /dev/fd will exist
-+  static const char kFDDir[] = "/dev/fd";
- #endif
- 
-   // Get the maximum number of FDs possible.
-@@ -199,7 +204,7 @@ void CloseSuperfluousFds(const base::Inj
- void SetAllFDsToCloseOnExec() {
- #if defined(OS_LINUX)
-   const char fd_dir[] = "/proc/self/fd";
--#elif defined(OS_MACOSX)
-+#elif defined(OS_MACOSX) || defined(OS_BSD)
-   const char fd_dir[] = "/dev/fd";
- #endif
-   ScopedDIR dir_closer(opendir(fd_dir));
-$NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:00 tnn Exp $
-
---- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig	2011-11-04 21:34:00.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/sys_info_posix.cc
-@@ -18,6 +18,11 @@
- #include <mach/mach_init.h>
- #endif
- 
-+#if defined(OS_NETBSD)
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#endif
-+
- #include "base/logging.h"
- #include "base/string_util.h"
- 
-@@ -26,7 +31,11 @@ namespace base {
- int SysInfo::NumberOfProcessors() {
-   // It seems that sysconf returns the number of "logical" processors on both
-   // mac and linux.  So we get the number of "online logical" processors.
-+#ifdef _SC_NPROCESSORS_ONLN
-   static long res = sysconf(_SC_NPROCESSORS_ONLN);
-+#else
-+  static long res = 1;
-+#endif
-   if (res == -1) {
-     NOTREACHED();
-     return 1;
-@@ -52,6 +61,20 @@ int64 SysInfo::AmountOfPhysicalMemory() 
-   }
- 
-   return static_cast<int64>(hostinfo.max_mem);
-+#elif defined(OS_NETBSD)
-+  int mib[2];
-+  int rc;
-+  int64_t memSize;
-+  size_t len = sizeof(memSize);
-+
-+  mib[0] = CTL_HW;
-+  mib[1] = HW_PHYSMEM64;
-+  rc = sysctl( mib, 2, &memSize, &len, NULL, 0 );
-+  if (-1 != rc)  {
-+    return memSize;
-+  }
-+  return 0;
-+
- #else
-   long pages = sysconf(_SC_PHYS_PAGES);
-   long page_size = sysconf(_SC_PAGE_SIZE);
-diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc
-index abf2a56..48791f6 100644
---- mozilla/ipc/chromium/src/base/time_posix.cc
-+++ mozilla/ipc/chromium/src/base/time_posix.cc
-@@ -167,7 +167,7 @@ TimeTicks TimeTicks::Now() {
-   // 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(__OpenBSD__) || defined(OS_POSIX) && \
-+#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \
-       defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0
- 
-   struct timespec ts;
-$NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.4 2012/04/01 15:18:45 ryoon Exp $
-
---- mozilla/ipc/chromium/src/build/build_config.h.orig	2012-03-13 01:36:53.000000000 +0000
-+++ mozilla/ipc/chromium/src/build/build_config.h
-@@ -19,6 +19,12 @@
- #define OS_MACOSX 1
- #elif defined(__linux__) || defined(ANDROID)
- #define OS_LINUX 1
-+#elif defined(__DragonFly__)
-+#define OS_DRAGONFLY 1
-+#elif defined(__FreeBSD__)
-+#define OS_FREEBSD 1
-+#elif defined(__NetBSD__)
-+#define OS_NETBSD 1
- #elif defined(__OpenBSD__)
- #define OS_OPENBSD 1
- #elif defined(_WIN32)
-@@ -27,9 +33,16 @@
- #error Please add support for your platform in build/build_config.h
- #endif
- 
-+// For access to standard BSD features, use OS_BSD instead of a
-+// more specific macro.
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)	\
-+  || defined(OS_NETBSD) || defined(OS_OPENBSD)
-+#define OS_BSD 1
-+#endif
-+
- // For access to standard POSIX features, use OS_POSIX instead of a more
- // specific macro.
--#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
- #define OS_POSIX 1
- #endif
- 
-diff --git ipc/chromium/src/chrome/common/ipc_channel_posix.cc ipc/chromium/src/chrome/common/ipc_channel_posix.cc
-index bd866ee..2ea5b19 100644
---- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
-+++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
-@@ -7,6 +7,7 @@
- #include <errno.h>
- #include <fcntl.h>
- #include <stddef.h>
-+#include <unistd.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/stat.h>
-$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h,v 1.1 2011/07/11 12:46:14 tnn Exp $
-
---- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig	2011-06-15 21:57:27.000000000 +0000
-+++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h
-@@ -92,7 +92,7 @@ class Channel::ChannelImpl : public Mess
-   };
- 
-   // This is a control message buffer large enough to hold kMaxReadFDs
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_NETBSD)
-   // TODO(agl): OSX appears to have non-constant CMSG macros!
-   char input_cmsg_buf_[1024];
- #else
-$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h
-@@ -195,7 +195,7 @@
- };
- #endif
- 
--#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390))
-+#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390))
- // There size_t is a synonym for |unsigned long| ...
- template <>
- struct ParamTraits<size_t> {
-@@ -248,7 +248,7 @@
- };
- #endif  // defined(OS_MACOSX)
- 
--#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))
-+#if !((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS))
- // int64 is |long int| on 64-bit systems, uint64 is |unsigned long|
- template <>
- struct ParamTraits<int64> {
-$NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/chrome/common/transport_dib.h
-@@ -7,7 +7,7 @@
- 
- #include "base/basictypes.h"
- 
--#if defined(OS_WIN) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD)
- #include "base/shared_memory.h"
- #endif
- 
-@@ -66,7 +66,7 @@ class TransportDIB {
-     uint32 sequence_num;
-   };
-   typedef HandleAndSequenceNum Id;
--#elif defined(OS_MACOSX)
-+#elif defined(OS_MACOSX) || defined(OS_BSD)
-   typedef base::SharedMemoryHandle Handle;
-   // On Mac, the inode number of the backing file is used as an id.
-   typedef base::SharedMemoryId Id;
-@@ -108,7 +108,7 @@ class TransportDIB {
- 
-  private:
-   TransportDIB();
--#if defined(OS_WIN) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD)
-   explicit TransportDIB(base::SharedMemoryHandle dib);
-   base::SharedMemory shared_memory_;
-   uint32 sequence_num_;
-$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoon Exp $
-
---- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/glue/GeckoChildProcessHost.cpp
-@@ -430,7 +430,7 @@
-   // and passing wstrings from one config to the other is unsafe.  So
-   // we split the logic here.
- 
--#if defined(OS_LINUX) || defined(OS_MACOSX)
-+#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
-@@ -445,8 +445,8 @@
-       if (NS_SUCCEEDED(rv)) {
-         nsCString path;
-         greDir->GetNativePath(path);
--# ifdef OS_LINUX
--#  ifdef MOZ_WIDGET_ANDROID
-+# if defined(OS_LINUX) || defined(OS_BSD)
-+#  if defined(MOZ_WIDGET_ANDROID) || defined(OS_BSD)
-         path += "/lib";
- #  endif  // MOZ_WIDGET_ANDROID
-         const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH");
-@@ -557,7 +557,7 @@
-   childArgv.push_back(pidstring);
- 
- #if defined(MOZ_CRASHREPORTER)
--#  if defined(OS_LINUX)
-+#  if defined(OS_LINUX) || defined(OS_BSD)
-   int childCrashFd, childCrashRemapFd;
-   if (!CrashReporter::CreateNotificationPipeForChild(
-         &childCrashFd, &childCrashRemapFd))
-@@ -594,7 +594,7 @@
- #endif
- 
-   base::LaunchApp(childArgv, mFileMap,
--#if defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-                   newEnvVars, privs,
- #endif
-                   false, &process, arch);
-diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h
-index f37998d..b05dc7b 100644
---- mozilla/ipc/glue/SharedMemorySysV.h
-+++ mozilla/ipc/glue/SharedMemorySysV.h
-@@ -8,7 +8,7 @@
- #ifndef mozilla_ipc_SharedMemorySysV_h
- #define mozilla_ipc_SharedMemorySysV_h
- 
--#if defined(OS_LINUX) && !defined(ANDROID)
-+#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD)
- 
- // SysV shared memory isn't available on Windows, but we define the
- // following macro so that #ifdefs are clearer (compared to #ifdef
-$NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $
-
---- mozilla/toolkit/library/Makefile.in.orig	2012-05-23 18:57:09.000000000 +0000
-+++ mozilla/toolkit/library/Makefile.in
-@@ -534,6 +538,12 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle
- endif
- endif
- 
-+ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH)))
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+# keep `environ' unresolved, see bug 14426 for binutils
-+EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols
-+endif
-+
- ifeq ($(OS_ARCH),WINNT)
- OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet)
- ifdef ACCESSIBILITY

Added: trunk/mail/thunderbird/files/patch-bug783505
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/mail/thunderbird/files/patch-bug783505	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,52 @@
+commit b5f97ee
+Author: Rafael Ávila de Espíndola <respindola at mozilla.com>
+Date:   Mon Aug 20 10:28:08 2012 -0400
+
+    Bug 783505 - OS X gcc builds failing. r=jorendorff.
+    This patch adds a workaround for
+    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39608
+---
+ js/src/jstypedarray.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git mozilla/js/src/jstypedarray.cpp mozilla/js/src/jstypedarray.cpp
+index 1eaeea0..1957086 100644
+--- mozilla/js/src/jstypedarray.cpp
++++ mozilla/js/src/jstypedarray.cpp
+@@ -1423,8 +1423,14 @@ class TypedArrayTemplate
+     Getter(JSContext *cx, unsigned argc, Value *vp)
+     {
+         CallArgs args = CallArgsFromVp(argc, vp);
++        // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
++        // drop support for gcc 4.2. See bug 783505 for the details.
++#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 2
++        return CallNonGenericMethod(cx, IsThisClass, GetterImpl<ValueGetter>, args);
++#else
+         return CallNonGenericMethod<ThisTypeArray::IsThisClass,
+                                     ThisTypeArray::GetterImpl<ValueGetter> >(cx, args);
++#endif
+     }
+ 
+     // Define an accessor for a read-only property that invokes a native getter
+--- mozilla/build/autoconf/gcc-pr39608.m4~
++++ mozilla/build/autoconf/gcc-pr39608.m4
+@@ -31,7 +31,6 @@ AC_LANG_RESTORE
+ 
+ AC_MSG_RESULT($ac_have_gcc_pr39608)
+ if test "$ac_have_gcc_pr39608" = "yes"; then
+-   echo This compiler would fail to build firefox, plase upgrade.
+-   exit 1
++   echo This compiler may fail to build firefox, plase upgrade.
+ fi
+ ])
+--- mozilla/js/src/build/autoconf/gcc-pr39608.m4~
++++ mozilla/js/src/build/autoconf/gcc-pr39608.m4
+@@ -31,7 +31,6 @@ AC_LANG_RESTORE
+ 
+ AC_MSG_RESULT($ac_have_gcc_pr39608)
+ if test "$ac_have_gcc_pr39608" = "yes"; then
+-   echo This compiler would fail to build firefox, plase upgrade.
+-   exit 1
++   echo This compiler may fail to build firefox, plase upgrade.
+ fi
+ ])

Deleted: trunk/mail/thunderbird/files/patch-bug786995
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug786995	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,36 +0,0 @@
-# Bug 786995 - configure should check for SSSE3 support in the whole toolchain
-
---- mozilla/configure.in.orig	2012-09-02 00:37:29.000000000 +0200
-+++ mozilla/configure.in	2012-09-02 00:38:50.000000000 +0200
-@@ -1710,15 +1710,15 @@
-     _MOZ_RTTI_FLAGS_OFF=-fno-rtti
- 
-     # Check for -mssse3 on $CC
--    AC_MSG_CHECKING([for -mssse3 option to $CC])
--    HAVE_COMPILER_FLAG_MSSSE3=
-+    AC_MSG_CHECKING([if toolchain supports -mssse3 option])
-+    HAVE_TOOLCHAIN_SUPPORT_MSSSE3=
-     _SAVE_CFLAGS=$CFLAGS
-     CFLAGS="$CFLAGS -mssse3"
--    AC_TRY_COMPILE(,,AC_MSG_RESULT([yes])
--                     [HAVE_COMPILER_FLAG_MSSSE3=1],
-+    AC_TRY_COMPILE([asm ("pmaddubsw %xmm2,%xmm3");],,AC_MSG_RESULT([yes])
-+                     [HAVE_TOOLCHAIN_SUPPORT_MSSSE3=1],
-                      AC_MSG_RESULT([no]))
-     CFLAGS=$_SAVE_CFLAGS
--    AC_SUBST(HAVE_COMPILER_FLAG_MSSSE3)
-+    AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSSE3)
- 
-     # Turn on GNU-specific warnings:
-     # -Wall - turn on a lot of warnings
---- mozilla/gfx/skia/Makefile.in.orig	2012-09-02 00:39:00.000000000 +0200
-+++ mozilla/gfx/skia/Makefile.in	2012-09-02 00:39:21.000000000 +0200
-@@ -365,7 +365,7 @@
- 	SkUtils_opts_SSE2.cpp \
- 	opts_check_SSE2.cpp \
- 	$(NULL)
--ifdef HAVE_COMPILER_FLAG_MSSSE3
-+ifdef HAVE_TOOLCHAIN_SUPPORT_MSSSE3
- DEFINES += -DSK_BUILD_SSSE3
- CPPSRCS += SkBitmapProcState_opts_SSSE3.cpp
- endif

Deleted: trunk/mail/thunderbird/files/patch-bug787904
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug787904	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,12 +0,0 @@
---- mozilla/js/src/gc/Heap.h
-+++ mozilla/js/src/gc/Heap.h
-@@ -108,7 +108,8 @@ struct Cell
-  * Bug 692267: Move page size definition to gc/Memory.h and include it
-  *             directly once jsgc.h is no longer an installed header.
-  */
--#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9))
-+#if (defined(SOLARIS) || defined(__FreeBSD__)) && \
-+    (defined(__sparc) || defined(__sparcv9) || defined(__ia64))
- const size_t PageShift = 13;
- #else
- const size_t PageShift = 12;

Deleted: trunk/mail/thunderbird/files/patch-bug788039
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug788039	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,48 +0,0 @@
-# Bug 788039 - With no prefix search libevent via pkg-config.
-
---- mozilla/configure.in~
-+++ mozilla/configure.in
-@@ -3854,7 +3854,7 @@ fi
- dnl system libevent Support
- dnl ========================================================
- MOZ_ARG_WITH_STRING(system-libevent,
--[  --with-system-libevent=[PFX]
-+[  --with-system-libevent[=PFX]
-                           Use system libevent [installed at prefix PFX]],
-     LIBEVENT_DIR=$withval)
- 
-@@ -3863,10 +3863,11 @@ _SAVE_LDFLAGS=$LDFLAGS
- _SAVE_LIBS=$LIBS
- if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then
-     MOZ_NATIVE_LIBEVENT=
-+elif test "$LIBEVENT_DIR" = yes; then
-+    PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent,
-+        MOZ_NATIVE_LIBEVENT=1,
-+        AC_MSG_ERROR([--with-system-libevent requested but libevent package not found]))
- else
--    if test "${LIBEVENT_DIR}" = "yes"; then
--        LIBEVENT_DIR=/usr
--    fi
-     CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS"
-     LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS"
-     MOZ_CHECK_HEADER(event.h,
-@@ -3876,16 +3877,16 @@ else
-         AC_MSG_ERROR([--with-system-libevent requested but event.h not found]))
-     AC_CHECK_LIB(event, event_init,
-                  [MOZ_NATIVE_LIBEVENT=1
--                  MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include"
-+                  MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include"
-                   MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"],
--                 [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=])
-+                 [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=])
- fi
- CFLAGS=$_SAVE_CFLAGS
- LDFLAGS=$_SAVE_LDFLAGS
- LIBS=$_SAVE_LIBS
- 
- AC_SUBST(MOZ_NATIVE_LIBEVENT)
--AC_SUBST(MOZ_LIBEVENT_INCLUDES)
-+AC_SUBST(MOZ_LIBEVENT_CFLAGS)
- AC_SUBST(MOZ_LIBEVENT_LIBS)
- 
- dnl ========================================================

Deleted: trunk/mail/thunderbird/files/patch-bug788108
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug788108	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,20 +0,0 @@
---- mozilla/content/base/public/nsContentUtils.h~
-+++ mozilla/content/base/public/nsContentUtils.h
-@@ -18,17 +18,6 @@
- #include <ieeefp.h>
- #endif
- 
--//A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
--#ifdef __FreeBSD__
--#include <ieeefp.h>
--#if !defined(__i386__) && !defined(__x86_64__)
--static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP;
--#else
--static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML;
--#endif
--static fp_except_t oldmask = fpsetmask(~allmask);
--#endif
--
- #include "nsAString.h"
- #include "nsIStatefulFrame.h"
- #include "nsNodeInfoManager.h"

Deleted: trunk/mail/thunderbird/files/patch-bug789436
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug789436	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,27 +0,0 @@
---- mozilla/toolkit/xre/nsAppRunner.cpp~
-+++ mozilla/toolkit/xre/nsAppRunner.cpp
-@@ -1388,11 +1388,6 @@ static int MSCRTReportHook( int aReportType, char *aMessage, int *oReturnValue)
- 
- #endif
- 
--#if defined(FREEBSD)
--// pick up fpsetmask prototype.
--#include <ieeefp.h>
--#endif
--
- static inline void
- DumpVersion()
- {
-@@ -4136,12 +4131,5 @@ SetupErrorHandling(const char* progname)
- 
-   // Unbuffer stdout, needed for tinderbox tests.
-   setbuf(stdout, 0);
--
--#if defined(FREEBSD)
--  // Disable all SIGFPE's on FreeBSD, as it has non-IEEE-conformant fp
--  // trap behavior that trips up on floating-point tests performed by
--  // the JS engine.  See bugzilla bug 9967 details.
--  fpsetmask(0);
--#endif
- }
- 

Deleted: trunk/mail/thunderbird/files/patch-bug789656
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug789656	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,11 +0,0 @@
---- mozilla/media/libopus/Makefile.in~
-+++ mozilla/media/libopus/Makefile.in
-@@ -20,7 +20,7 @@ DEFINES += \
-   -Drestrict= \
-   $(NULL)
- 
--ifneq ($(filter $(OS_ARCH),Linux Darwin),)
-+ifneq ($(filter $(OS_ARCH),Linux Darwin DragonFly FreeBSD NetBSD OpenBSD),)
-   DEFINES += -DHAVE_LRINTF
- endif
- ifeq ($(OS_ARCH), WINNT)

Deleted: trunk/mail/thunderbird/files/patch-bug789693
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug789693	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,109 +0,0 @@
---- mozilla/toolkit/components/startup/nsAppStartup.cpp
-+++ mozilla/toolkit/components/startup/nsAppStartup.cpp
-@@ -50,18 +50,41 @@
- #include <sys/syscall.h>
- #endif
- 
--#ifdef XP_MACOSX
-+#if defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \
-+  || defined(__NetBSD__) || defined(__OpenBSD__)
-+#include <sys/param.h>
- #include <sys/sysctl.h>
- #endif
- 
--#ifdef __OpenBSD__
--#include <sys/param.h>
--#include <sys/sysctl.h>
-+#if defined(__DragonFly__) || defined(__FreeBSD__)
-+#include <sys/user.h>
- #endif
- 
- #include "mozilla/Telemetry.h"
- #include "mozilla/StartupTimeline.h"
- 
-+#if defined(__NetBSD__)
-+#undef KERN_PROC
-+#define KERN_PROC KERN_PROC2
-+#define KINFO_PROC struct kinfo_proc2
-+#else
-+#define KINFO_PROC struct kinfo_proc
-+#endif
-+
-+#if defined(XP_MACOSX)
-+#define KP_START_SEC kp_proc.p_un.__p_starttime.tv_sec
-+#define KP_START_USEC kp_proc.p_un.__p_starttime.tv_usec
-+#elif defined(__DragonFly__)
-+#define KP_START_SEC kp_start.tv_sec
-+#define KP_START_USEC kp_start.tv_usec
-+#elif defined(__FreeBSD__)
-+#define KP_START_SEC ki_start.tv_sec
-+#define KP_START_USEC ki_start.tv_usec
-+#else
-+#define KP_START_SEC p_ustart_sec
-+#define KP_START_USEC p_ustart_usec
-+#endif
-+
- static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
- 
- #define kPrefLastSuccess "toolkit.startup.last_success"
-@@ -836,42 +859,30 @@ CalculateProcessCreationTimestamp()
- #endif
-   return timestamp;
- }
--#elif defined(XP_MACOSX)
-+#elif defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \
-+  || defined(__NetBSD__) || defined(__OpenBSD__)
- static PRTime
- CalculateProcessCreationTimestamp()
- {
--  int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
--  size_t buffer_size;
--  if (sysctl(mib, 4, NULL, &buffer_size, NULL, 0))
--    return 0;
-+  int mib[] = {
-+    CTL_KERN,
-+    KERN_PROC,
-+    KERN_PROC_PID,
-+    getpid(),
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
-+    sizeof(KINFO_PROC),
-+    1,
-+#endif
-+  };
-+  u_int miblen = sizeof(mib) / sizeof(mib[0]);
- 
--  struct kinfo_proc *proc = (kinfo_proc*) malloc(buffer_size);  
--  if (sysctl(mib, 4, proc, &buffer_size, NULL, 0)) {
--    free(proc);
--    return 0;
--  }
--  PRTime starttime = static_cast<PRTime>(proc->kp_proc.p_un.__p_starttime.tv_sec) * PR_USEC_PER_SEC;
--  starttime += proc->kp_proc.p_un.__p_starttime.tv_usec;
--  free(proc);
--  return starttime;
--}
--#elif defined(__OpenBSD__)
--static PRTime
--CalculateProcessCreationTimestamp()
--{
--  int mib[6] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(), sizeof(struct kinfo_proc), 1 };
--  size_t buffer_size;
--  if (sysctl(mib, 6, NULL, &buffer_size, NULL, 0))
-+  KINFO_PROC proc;
-+  size_t buffer_size = sizeof(proc);
-+  if (sysctl(mib, miblen, &proc, &buffer_size, NULL, 0))
-     return 0;
- 
--  struct kinfo_proc *proc = (struct kinfo_proc*) malloc(buffer_size);
--  if (sysctl(mib, 6, proc, &buffer_size, NULL, 0)) {
--    free(proc);
--    return 0;
--  }
--  PRTime starttime = static_cast<PRTime>(proc->p_ustart_sec) * PR_USEC_PER_SEC;
--  starttime += proc->p_ustart_usec;
--  free(proc);
-+  PRTime starttime = static_cast<PRTime>(proc.KP_START_SEC) * PR_USEC_PER_SEC;
-+  starttime += proc.KP_START_USEC;
-   return starttime;
- }
- #else

Modified: trunk/mail/thunderbird/files/patch-bug791305
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug791305	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/mail/thunderbird/files/patch-bug791305	Mon Dec  3 18:03:03 2012	(r1110)
@@ -15,93 +15,383 @@
  image/decoders/nsJPEGDecoder.cpp | 311 ++-------------------------------------
  2 files changed, 20 insertions(+), 297 deletions(-)
 
+diff --git configure.in configure.in
+index f0aeb5d..1c01010 100644
+--- mozilla/configure.in
++++ mozilla/configure.in
+@@ -4027,11 +4027,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then
+                      #include <jpeglib.h> ],
+                    [ #if JPEG_LIB_VERSION < $MOZJPEG
+                      #error "Insufficient JPEG library version ($MOZJPEG required)."
+-                     #endif
+-                     #ifndef JCS_EXTENSIONS
+-                     #error "libjpeg-turbo JCS_EXTENSIONS required"
+-                     #endif
+-                     ],
++                     #endif ],
+                    MOZ_NATIVE_JPEG=1,
+                    AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
+ fi
 diff --git mozilla/image/decoders/nsJPEGDecoder.cpp mozilla/image/decoders/nsJPEGDecoder.cpp
-index c1fb515..1d2a259 100644
+index 8fa8200..1d2a259 100644
 --- mozilla/image/decoders/nsJPEGDecoder.cpp
 +++ mozilla/image/decoders/nsJPEGDecoder.cpp
-@@ -22,6 +22,13 @@
+@@ -21,13 +21,28 @@
+ 
  extern "C" {
  #include "iccjpeg.h"
+-}
  
 +#ifdef JCS_EXTENSIONS
-+#if defined(IS_BIG_ENDIAN)
-+#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_XRGB
-+#else
-+#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_BGRX
-+#endif
+ #if defined(IS_BIG_ENDIAN)
+ #define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_XRGB
+ #else
+ #define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_BGRX
+ #endif
 +#else
- /* Colorspace conversion (copied from jpegint.h) */
- struct jpeg_color_deconverter {
-   JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
-@@ -34,6 +41,7 @@ METHODDEF(void)
- ycc_rgb_convert_argb (j_decompress_ptr cinfo,
-                  JSAMPIMAGE input_buf, JDIMENSION input_row,
-                  JSAMPARRAY output_buf, int num_rows);
++/* Colorspace conversion (copied from jpegint.h) */
++struct jpeg_color_deconverter {
++  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
++  JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
++				JSAMPIMAGE input_buf, JDIMENSION input_row,
++				JSAMPARRAY output_buf, int num_rows));
++};
++
++METHODDEF(void)
++ycc_rgb_convert_argb (j_decompress_ptr cinfo,
++                 JSAMPIMAGE input_buf, JDIMENSION input_row,
++                 JSAMPARRAY output_buf, int num_rows);
 +#endif
- }
++}
  
  static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width);
-@@ -329,7 +340,18 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, PRUint32 aCount)
+ 
+@@ -324,6 +340,7 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
        case JCS_GRAYSCALE:
        case JCS_RGB:
        case JCS_YCbCr:
 +#ifdef JCS_EXTENSIONS
-+        // if we're not color managing we can decode directly to
-+        // MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB
-+        if (mCMSMode != eCMSMode_All) {
-+            mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB;
-+            mInfo.out_color_components = 4;
-+        } else {
-+            mInfo.out_color_space = JCS_RGB;
-+        }
+         // if we're not color managing we can decode directly to
+         // MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB
+         if (mCMSMode != eCMSMode_All) {
+@@ -332,6 +349,9 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
+         } else {
+             mInfo.out_color_space = JCS_RGB;
+         }
 +#else
-         mInfo.out_color_space = JCS_RGB;
++        mInfo.out_color_space = JCS_RGB;
 +#endif
          break;
        case JCS_CMYK:
        case JCS_YCCK:
-@@ -397,6 +419,7 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, PRUint32 aCount)
+@@ -399,6 +419,15 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
        return; /* I/O suspension */
      }
  
 +#ifndef JCS_EXTENSIONS
-     /* Force to use our YCbCr to Packed RGB converter when possible */
-     if (!mTransform && (mCMSMode != eCMSMode_All) &&
-         mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
-@@ -404,6 +427,7 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, PRUint32 aCount)
-       mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
-       mInfo.cconvert->color_convert = ycc_rgb_convert_argb;
-     }
++    /* Force to use our YCbCr to Packed RGB converter when possible */
++    if (!mTransform && (mCMSMode != eCMSMode_All) &&
++        mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
++      /* Special case for the most common case: transform from YCbCr direct into packed ARGB */
++      mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
++      mInfo.cconvert->color_convert = ycc_rgb_convert_argb;
++    }
 +#endif
  
      /* If this is a progressive JPEG ... */
      mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL;
-@@ -542,7 +566,11 @@ nsJPEGDecoder::OutputScanlines(bool* suspend)
-       PRUint32 *imageRow = ((PRUint32*)mImageData) +
+@@ -544,7 +573,11 @@ nsJPEGDecoder::OutputScanlines(bool* suspend)
+       uint32_t *imageRow = ((uint32_t*)mImageData) +
                             (mInfo.output_scanline * mInfo.output_width);
  
 +#ifdef JCS_EXTENSIONS
-+      if (mInfo.out_color_space == MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB) {
+       if (mInfo.out_color_space == MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB) {
 +#else
-       if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
++      if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
 +#endif
          /* Special case: scanline will be directly converted into packed ARGB */
          if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) {
            *suspend = true; /* suspend */
-@@ -858,6 +887,7 @@ term_source (j_decompress_ptr jd)
+@@ -854,6 +887,282 @@ term_source (j_decompress_ptr jd)
  } // namespace mozilla
  
  
 +#ifndef JCS_EXTENSIONS
- /**************** YCbCr -> Cairo's RGB24/ARGB32 conversion: most common case **************/
- 
- /*
-@@ -1130,7 +1160,8 @@ ycc_rgb_convert_argb (j_decompress_ptr cinfo,
-     }
-   }
- }
++/**************** YCbCr -> Cairo's RGB24/ARGB32 conversion: most common case **************/
++
++/*
++ * YCbCr is defined per CCIR 601-1, except that Cb and Cr are
++ * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
++ * The conversion equations to be implemented are therefore
++ *      R = Y                + 1.40200 * Cr
++ *      G = Y - 0.34414 * Cb - 0.71414 * Cr
++ *      B = Y + 1.77200 * Cb
++ * where Cb and Cr represent the incoming values less CENTERJSAMPLE.
++ * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)
++ *
++ * To avoid floating-point arithmetic, we represent the fractional constants
++ * as integers scaled up by 2^16 (about 4 digits precision); we have to divide
++ * the products by 2^16, with appropriate rounding, to get the correct answer.
++ * Notice that Y, being an integral input, does not contribute any fraction
++ * so it need not participate in the rounding.
++ *
++ * For even more speed, we avoid doing any multiplications in the inner loop
++ * by precalculating the constants times Cb and Cr for all possible values.
++ * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);
++ * for 12-bit samples it is still acceptable.  It's not very reasonable for
++ * 16-bit samples, but if you want lossless storage you shouldn't be changing
++ * colorspace anyway.
++ * The Cr=>R and Cb=>B values can be rounded to integers in advance; the
++ * values for the G calculation are left scaled up, since we must add them
++ * together before rounding.
++ */
++
++#define SCALEBITS       16      /* speediest right-shift on some machines */
++
++/* Use static tables for color processing. */
++/* Four tables, each 256 entries of 4 bytes totals 4K which is not bad... */
++
++const int Cr_r_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++       -0xb3,       -0xb2,       -0xb1,       -0xaf,       -0xae,       -0xac,
++       -0xab,       -0xaa,       -0xa8,       -0xa7,       -0xa5,       -0xa4,
++       -0xa3,       -0xa1,       -0xa0,       -0x9e,       -0x9d,       -0x9c,
++       -0x9a,       -0x99,       -0x97,       -0x96,       -0x95,       -0x93,
++       -0x92,       -0x90,       -0x8f,       -0x8e,       -0x8c,       -0x8b,
++       -0x89,       -0x88,       -0x87,       -0x85,       -0x84,       -0x82,
++       -0x81,       -0x80,       -0x7e,       -0x7d,       -0x7b,       -0x7a,
++       -0x79,       -0x77,       -0x76,       -0x74,       -0x73,       -0x72,
++       -0x70,       -0x6f,       -0x6d,       -0x6c,       -0x6b,       -0x69,
++       -0x68,       -0x66,       -0x65,       -0x64,       -0x62,       -0x61,
++       -0x5f,       -0x5e,       -0x5d,       -0x5b,       -0x5a,       -0x58,
++       -0x57,       -0x56,       -0x54,       -0x53,       -0x51,       -0x50,
++       -0x4f,       -0x4d,       -0x4c,       -0x4a,       -0x49,       -0x48,
++       -0x46,       -0x45,       -0x43,       -0x42,       -0x40,       -0x3f,
++       -0x3e,       -0x3c,       -0x3b,       -0x39,       -0x38,       -0x37,
++       -0x35,       -0x34,       -0x32,       -0x31,       -0x30,       -0x2e,
++       -0x2d,       -0x2b,       -0x2a,       -0x29,       -0x27,       -0x26,
++       -0x24,       -0x23,       -0x22,       -0x20,       -0x1f,       -0x1d,
++       -0x1c,       -0x1b,       -0x19,       -0x18,       -0x16,       -0x15,
++       -0x14,       -0x12,       -0x11,       -0x0f,       -0x0e,       -0x0d,
++       -0x0b,       -0x0a,       -0x08,       -0x07,       -0x06,       -0x04,
++       -0x03,       -0x01,        0x00,        0x01,        0x03,        0x04,
++        0x06,        0x07,        0x08,        0x0a,        0x0b,        0x0d,
++        0x0e,        0x0f,        0x11,        0x12,        0x14,        0x15,
++        0x16,        0x18,        0x19,        0x1b,        0x1c,        0x1d,
++        0x1f,        0x20,        0x22,        0x23,        0x24,        0x26,
++        0x27,        0x29,        0x2a,        0x2b,        0x2d,        0x2e,
++        0x30,        0x31,        0x32,        0x34,        0x35,        0x37,
++        0x38,        0x39,        0x3b,        0x3c,        0x3e,        0x3f,
++        0x40,        0x42,        0x43,        0x45,        0x46,        0x48,
++        0x49,        0x4a,        0x4c,        0x4d,        0x4f,        0x50,
++        0x51,        0x53,        0x54,        0x56,        0x57,        0x58,
++        0x5a,        0x5b,        0x5d,        0x5e,        0x5f,        0x61,
++        0x62,        0x64,        0x65,        0x66,        0x68,        0x69,
++        0x6b,        0x6c,        0x6d,        0x6f,        0x70,        0x72,
++        0x73,        0x74,        0x76,        0x77,        0x79,        0x7a,
++        0x7b,        0x7d,        0x7e,        0x80,        0x81,        0x82,
++        0x84,        0x85,        0x87,        0x88,        0x89,        0x8b,
++        0x8c,        0x8e,        0x8f,        0x90,        0x92,        0x93,
++        0x95,        0x96,        0x97,        0x99,        0x9a,        0x9c,
++        0x9d,        0x9e,        0xa0,        0xa1,        0xa3,        0xa4,
++        0xa5,        0xa7,        0xa8,        0xaa,        0xab,        0xac,
++        0xae,        0xaf,        0xb1,        0xb2,
++  };
++
++const int Cb_b_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++       -0xe3,       -0xe1,       -0xdf,       -0xde,       -0xdc,       -0xda,
++       -0xd8,       -0xd6,       -0xd5,       -0xd3,       -0xd1,       -0xcf,
++       -0xce,       -0xcc,       -0xca,       -0xc8,       -0xc6,       -0xc5,
++       -0xc3,       -0xc1,       -0xbf,       -0xbe,       -0xbc,       -0xba,
++       -0xb8,       -0xb7,       -0xb5,       -0xb3,       -0xb1,       -0xaf,
++       -0xae,       -0xac,       -0xaa,       -0xa8,       -0xa7,       -0xa5,
++       -0xa3,       -0xa1,       -0x9f,       -0x9e,       -0x9c,       -0x9a,
++       -0x98,       -0x97,       -0x95,       -0x93,       -0x91,       -0x90,
++       -0x8e,       -0x8c,       -0x8a,       -0x88,       -0x87,       -0x85,
++       -0x83,       -0x81,       -0x80,       -0x7e,       -0x7c,       -0x7a,
++       -0x78,       -0x77,       -0x75,       -0x73,       -0x71,       -0x70,
++       -0x6e,       -0x6c,       -0x6a,       -0x69,       -0x67,       -0x65,
++       -0x63,       -0x61,       -0x60,       -0x5e,       -0x5c,       -0x5a,
++       -0x59,       -0x57,       -0x55,       -0x53,       -0x52,       -0x50,
++       -0x4e,       -0x4c,       -0x4a,       -0x49,       -0x47,       -0x45,
++       -0x43,       -0x42,       -0x40,       -0x3e,       -0x3c,       -0x3a,
++       -0x39,       -0x37,       -0x35,       -0x33,       -0x32,       -0x30,
++       -0x2e,       -0x2c,       -0x2b,       -0x29,       -0x27,       -0x25,
++       -0x23,       -0x22,       -0x20,       -0x1e,       -0x1c,       -0x1b,
++       -0x19,       -0x17,       -0x15,       -0x13,       -0x12,       -0x10,
++       -0x0e,       -0x0c,       -0x0b,       -0x09,       -0x07,       -0x05,
++       -0x04,       -0x02,        0x00,        0x02,        0x04,        0x05,
++        0x07,        0x09,        0x0b,        0x0c,        0x0e,        0x10,
++        0x12,        0x13,        0x15,        0x17,        0x19,        0x1b,
++        0x1c,        0x1e,        0x20,        0x22,        0x23,        0x25,
++        0x27,        0x29,        0x2b,        0x2c,        0x2e,        0x30,
++        0x32,        0x33,        0x35,        0x37,        0x39,        0x3a,
++        0x3c,        0x3e,        0x40,        0x42,        0x43,        0x45,
++        0x47,        0x49,        0x4a,        0x4c,        0x4e,        0x50,
++        0x52,        0x53,        0x55,        0x57,        0x59,        0x5a,
++        0x5c,        0x5e,        0x60,        0x61,        0x63,        0x65,
++        0x67,        0x69,        0x6a,        0x6c,        0x6e,        0x70,
++        0x71,        0x73,        0x75,        0x77,        0x78,        0x7a,
++        0x7c,        0x7e,        0x80,        0x81,        0x83,        0x85,
++        0x87,        0x88,        0x8a,        0x8c,        0x8e,        0x90,
++        0x91,        0x93,        0x95,        0x97,        0x98,        0x9a,
++        0x9c,        0x9e,        0x9f,        0xa1,        0xa3,        0xa5,
++        0xa7,        0xa8,        0xaa,        0xac,        0xae,        0xaf,
++        0xb1,        0xb3,        0xb5,        0xb7,        0xb8,        0xba,
++        0xbc,        0xbe,        0xbf,        0xc1,        0xc3,        0xc5,
++        0xc6,        0xc8,        0xca,        0xcc,        0xce,        0xcf,
++        0xd1,        0xd3,        0xd5,        0xd6,        0xd8,        0xda,
++        0xdc,        0xde,        0xdf,        0xe1,
++  };
++
++const int Cr_g_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++    0x5b6900,    0x5ab22e,    0x59fb5c,    0x59448a,    0x588db8,    0x57d6e6,
++    0x572014,    0x566942,    0x55b270,    0x54fb9e,    0x5444cc,    0x538dfa,
++    0x52d728,    0x522056,    0x516984,    0x50b2b2,    0x4ffbe0,    0x4f450e,
++    0x4e8e3c,    0x4dd76a,    0x4d2098,    0x4c69c6,    0x4bb2f4,    0x4afc22,
++    0x4a4550,    0x498e7e,    0x48d7ac,    0x4820da,    0x476a08,    0x46b336,
++    0x45fc64,    0x454592,    0x448ec0,    0x43d7ee,    0x43211c,    0x426a4a,
++    0x41b378,    0x40fca6,    0x4045d4,    0x3f8f02,    0x3ed830,    0x3e215e,
++    0x3d6a8c,    0x3cb3ba,    0x3bfce8,    0x3b4616,    0x3a8f44,    0x39d872,
++    0x3921a0,    0x386ace,    0x37b3fc,    0x36fd2a,    0x364658,    0x358f86,
++    0x34d8b4,    0x3421e2,    0x336b10,    0x32b43e,    0x31fd6c,    0x31469a,
++    0x308fc8,    0x2fd8f6,    0x2f2224,    0x2e6b52,    0x2db480,    0x2cfdae,
++    0x2c46dc,    0x2b900a,    0x2ad938,    0x2a2266,    0x296b94,    0x28b4c2,
++    0x27fdf0,    0x27471e,    0x26904c,    0x25d97a,    0x2522a8,    0x246bd6,
++    0x23b504,    0x22fe32,    0x224760,    0x21908e,    0x20d9bc,    0x2022ea,
++    0x1f6c18,    0x1eb546,    0x1dfe74,    0x1d47a2,    0x1c90d0,    0x1bd9fe,
++    0x1b232c,    0x1a6c5a,    0x19b588,    0x18feb6,    0x1847e4,    0x179112,
++    0x16da40,    0x16236e,    0x156c9c,    0x14b5ca,    0x13fef8,    0x134826,
++    0x129154,    0x11da82,    0x1123b0,    0x106cde,    0x0fb60c,    0x0eff3a,
++    0x0e4868,    0x0d9196,    0x0cdac4,    0x0c23f2,    0x0b6d20,    0x0ab64e,
++    0x09ff7c,    0x0948aa,    0x0891d8,    0x07db06,    0x072434,    0x066d62,
++    0x05b690,    0x04ffbe,    0x0448ec,    0x03921a,    0x02db48,    0x022476,
++    0x016da4,    0x00b6d2,    0x000000,   -0x00b6d2,   -0x016da4,   -0x022476,
++   -0x02db48,   -0x03921a,   -0x0448ec,   -0x04ffbe,   -0x05b690,   -0x066d62,
++   -0x072434,   -0x07db06,   -0x0891d8,   -0x0948aa,   -0x09ff7c,   -0x0ab64e,
++   -0x0b6d20,   -0x0c23f2,   -0x0cdac4,   -0x0d9196,   -0x0e4868,   -0x0eff3a,
++   -0x0fb60c,   -0x106cde,   -0x1123b0,   -0x11da82,   -0x129154,   -0x134826,
++   -0x13fef8,   -0x14b5ca,   -0x156c9c,   -0x16236e,   -0x16da40,   -0x179112,
++   -0x1847e4,   -0x18feb6,   -0x19b588,   -0x1a6c5a,   -0x1b232c,   -0x1bd9fe,
++   -0x1c90d0,   -0x1d47a2,   -0x1dfe74,   -0x1eb546,   -0x1f6c18,   -0x2022ea,
++   -0x20d9bc,   -0x21908e,   -0x224760,   -0x22fe32,   -0x23b504,   -0x246bd6,
++   -0x2522a8,   -0x25d97a,   -0x26904c,   -0x27471e,   -0x27fdf0,   -0x28b4c2,
++   -0x296b94,   -0x2a2266,   -0x2ad938,   -0x2b900a,   -0x2c46dc,   -0x2cfdae,
++   -0x2db480,   -0x2e6b52,   -0x2f2224,   -0x2fd8f6,   -0x308fc8,   -0x31469a,
++   -0x31fd6c,   -0x32b43e,   -0x336b10,   -0x3421e2,   -0x34d8b4,   -0x358f86,
++   -0x364658,   -0x36fd2a,   -0x37b3fc,   -0x386ace,   -0x3921a0,   -0x39d872,
++   -0x3a8f44,   -0x3b4616,   -0x3bfce8,   -0x3cb3ba,   -0x3d6a8c,   -0x3e215e,
++   -0x3ed830,   -0x3f8f02,   -0x4045d4,   -0x40fca6,   -0x41b378,   -0x426a4a,
++   -0x43211c,   -0x43d7ee,   -0x448ec0,   -0x454592,   -0x45fc64,   -0x46b336,
++   -0x476a08,   -0x4820da,   -0x48d7ac,   -0x498e7e,   -0x4a4550,   -0x4afc22,
++   -0x4bb2f4,   -0x4c69c6,   -0x4d2098,   -0x4dd76a,   -0x4e8e3c,   -0x4f450e,
++   -0x4ffbe0,   -0x50b2b2,   -0x516984,   -0x522056,   -0x52d728,   -0x538dfa,
++   -0x5444cc,   -0x54fb9e,   -0x55b270,   -0x566942,   -0x572014,   -0x57d6e6,
++   -0x588db8,   -0x59448a,   -0x59fb5c,   -0x5ab22e,
++ };
++
++const int Cb_g_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++    0x2c8d00,    0x2c34e6,    0x2bdccc,    0x2b84b2,    0x2b2c98,    0x2ad47e,
++    0x2a7c64,    0x2a244a,    0x29cc30,    0x297416,    0x291bfc,    0x28c3e2,
++    0x286bc8,    0x2813ae,    0x27bb94,    0x27637a,    0x270b60,    0x26b346,
++    0x265b2c,    0x260312,    0x25aaf8,    0x2552de,    0x24fac4,    0x24a2aa,
++    0x244a90,    0x23f276,    0x239a5c,    0x234242,    0x22ea28,    0x22920e,
++    0x2239f4,    0x21e1da,    0x2189c0,    0x2131a6,    0x20d98c,    0x208172,
++    0x202958,    0x1fd13e,    0x1f7924,    0x1f210a,    0x1ec8f0,    0x1e70d6,
++    0x1e18bc,    0x1dc0a2,    0x1d6888,    0x1d106e,    0x1cb854,    0x1c603a,
++    0x1c0820,    0x1bb006,    0x1b57ec,    0x1affd2,    0x1aa7b8,    0x1a4f9e,
++    0x19f784,    0x199f6a,    0x194750,    0x18ef36,    0x18971c,    0x183f02,
++    0x17e6e8,    0x178ece,    0x1736b4,    0x16de9a,    0x168680,    0x162e66,
++    0x15d64c,    0x157e32,    0x152618,    0x14cdfe,    0x1475e4,    0x141dca,
++    0x13c5b0,    0x136d96,    0x13157c,    0x12bd62,    0x126548,    0x120d2e,
++    0x11b514,    0x115cfa,    0x1104e0,    0x10acc6,    0x1054ac,    0x0ffc92,
++    0x0fa478,    0x0f4c5e,    0x0ef444,    0x0e9c2a,    0x0e4410,    0x0debf6,
++    0x0d93dc,    0x0d3bc2,    0x0ce3a8,    0x0c8b8e,    0x0c3374,    0x0bdb5a,
++    0x0b8340,    0x0b2b26,    0x0ad30c,    0x0a7af2,    0x0a22d8,    0x09cabe,
++    0x0972a4,    0x091a8a,    0x08c270,    0x086a56,    0x08123c,    0x07ba22,
++    0x076208,    0x0709ee,    0x06b1d4,    0x0659ba,    0x0601a0,    0x05a986,
++    0x05516c,    0x04f952,    0x04a138,    0x04491e,    0x03f104,    0x0398ea,
++    0x0340d0,    0x02e8b6,    0x02909c,    0x023882,    0x01e068,    0x01884e,
++    0x013034,    0x00d81a,    0x008000,    0x0027e6,   -0x003034,   -0x00884e,
++   -0x00e068,   -0x013882,   -0x01909c,   -0x01e8b6,   -0x0240d0,   -0x0298ea,
++   -0x02f104,   -0x03491e,   -0x03a138,   -0x03f952,   -0x04516c,   -0x04a986,
++   -0x0501a0,   -0x0559ba,   -0x05b1d4,   -0x0609ee,   -0x066208,   -0x06ba22,
++   -0x07123c,   -0x076a56,   -0x07c270,   -0x081a8a,   -0x0872a4,   -0x08cabe,
++   -0x0922d8,   -0x097af2,   -0x09d30c,   -0x0a2b26,   -0x0a8340,   -0x0adb5a,
++   -0x0b3374,   -0x0b8b8e,   -0x0be3a8,   -0x0c3bc2,   -0x0c93dc,   -0x0cebf6,
++   -0x0d4410,   -0x0d9c2a,   -0x0df444,   -0x0e4c5e,   -0x0ea478,   -0x0efc92,
++   -0x0f54ac,   -0x0facc6,   -0x1004e0,   -0x105cfa,   -0x10b514,   -0x110d2e,
++   -0x116548,   -0x11bd62,   -0x12157c,   -0x126d96,   -0x12c5b0,   -0x131dca,
++   -0x1375e4,   -0x13cdfe,   -0x142618,   -0x147e32,   -0x14d64c,   -0x152e66,
++   -0x158680,   -0x15de9a,   -0x1636b4,   -0x168ece,   -0x16e6e8,   -0x173f02,
++   -0x17971c,   -0x17ef36,   -0x184750,   -0x189f6a,   -0x18f784,   -0x194f9e,
++   -0x19a7b8,   -0x19ffd2,   -0x1a57ec,   -0x1ab006,   -0x1b0820,   -0x1b603a,
++   -0x1bb854,   -0x1c106e,   -0x1c6888,   -0x1cc0a2,   -0x1d18bc,   -0x1d70d6,
++   -0x1dc8f0,   -0x1e210a,   -0x1e7924,   -0x1ed13e,   -0x1f2958,   -0x1f8172,
++   -0x1fd98c,   -0x2031a6,   -0x2089c0,   -0x20e1da,   -0x2139f4,   -0x21920e,
++   -0x21ea28,   -0x224242,   -0x229a5c,   -0x22f276,   -0x234a90,   -0x23a2aa,
++   -0x23fac4,   -0x2452de,   -0x24aaf8,   -0x250312,   -0x255b2c,   -0x25b346,
++   -0x260b60,   -0x26637a,   -0x26bb94,   -0x2713ae,   -0x276bc8,   -0x27c3e2,
++   -0x281bfc,   -0x287416,   -0x28cc30,   -0x29244a,   -0x297c64,   -0x29d47e,
++   -0x2a2c98,   -0x2a84b2,   -0x2adccc,   -0x2b34e6,
++ };
++
++
++/* We assume that right shift corresponds to signed division by 2 with
++ * rounding towards minus infinity.  This is correct for typical "arithmetic
++ * shift" instructions that shift in copies of the sign bit.  But some
++ * C compilers implement >> with an unsigned shift.  For these machines you
++ * must define RIGHT_SHIFT_IS_UNSIGNED.
++ * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
++ * It is only applied with constant shift counts.  SHIFT_TEMPS must be
++ * included in the variables of any routine using RIGHT_SHIFT.
++ */
++
++#ifdef RIGHT_SHIFT_IS_UNSIGNED
++#define SHIFT_TEMPS	INT32 shift_temp;
++#define RIGHT_SHIFT(x,shft)  \
++	((shift_temp = (x)) < 0 ? \
++	 (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
++	 (shift_temp >> (shft)))
++#else
++#define SHIFT_TEMPS
++#define RIGHT_SHIFT(x,shft)	((x) >> (shft))
 +#endif
- 
- 
++
++
++METHODDEF(void)
++ycc_rgb_convert_argb (j_decompress_ptr cinfo,
++                 JSAMPIMAGE input_buf, JDIMENSION input_row,
++                 JSAMPARRAY output_buf, int num_rows)
++{
++  JDIMENSION num_cols = cinfo->output_width;
++  JSAMPLE * range_limit = cinfo->sample_range_limit;
++
++  SHIFT_TEMPS
++
++  /* This is used if we don't have SSE2 */
++
++  while (--num_rows >= 0) {
++    JSAMPROW inptr0 = input_buf[0][input_row];
++    JSAMPROW inptr1 = input_buf[1][input_row];
++    JSAMPROW inptr2 = input_buf[2][input_row];
++    input_row++;
++    uint32_t *outptr = (uint32_t *) *output_buf++;
++    for (JDIMENSION col = 0; col < num_cols; col++) {
++      int y  = GETJSAMPLE(inptr0[col]);
++      int cb = GETJSAMPLE(inptr1[col]);
++      int cr = GETJSAMPLE(inptr2[col]);
++      JSAMPLE * range_limit_y = range_limit + y;
++      /* Range-limiting is essential due to noise introduced by DCT losses. */
++      outptr[col] = 0xFF000000 |
++                    ( range_limit_y[Cr_r_tab[cr]] << 16 ) |
++                    ( range_limit_y[((int) RIGHT_SHIFT(Cb_g_tab[cb] + Cr_g_tab[cr], SCALEBITS))] << 8 ) |
++                    ( range_limit_y[Cb_b_tab[cb]] );
++    }
++  }
++}
++#endif
++
++
  /**************** Inverted CMYK -> RGB conversion **************/
  /*
+  * Input is (Inverted) CMYK stored as 4 bytes per pixel.

Deleted: trunk/mail/thunderbird/files/patch-bug791366
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug791366	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,95 +0,0 @@
-diff --git mozilla/xpcom/base/nsMemoryReporterManager.cpp mozilla/xpcom/base/nsMemoryReporterManager.cpp
-index a9aff58..674e757 100644
---- mozilla/xpcom/base/nsMemoryReporterManager.cpp
-+++ mozilla/xpcom/base/nsMemoryReporterManager.cpp
-@@ -32,7 +32,7 @@ using namespace mozilla;
- #  include "jemalloc.h"
- #endif  // MOZ_MEMORY
- 
--#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(SOLARIS)
-+#ifdef XP_UNIX
- 
- #include <sys/time.h>
- #include <sys/resource.h>
-@@ -95,6 +95,81 @@ static nsresult GetResident(PRInt64 *n)
-     return GetProcSelfStatmField(1, n);
- }
- 
-+#elif defined(__DragonFly__) || defined(__FreeBSD__) \
-+    || defined(__NetBSD__) || defined(__OpenBSD__)
-+
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#if defined(__DragonFly__) || defined(__FreeBSD__)
-+#include <sys/user.h>
-+#endif
-+
-+#include <unistd.h>
-+
-+#if defined(__NetBSD__)
-+#undef KERN_PROC
-+#define KERN_PROC KERN_PROC2
-+#define KINFO_PROC struct kinfo_proc2
-+#else
-+#define KINFO_PROC struct kinfo_proc
-+#endif
-+
-+#if defined(__DragonFly__)
-+#define KP_SIZE(kp) (kp.kp_vm_map_size)
-+#define KP_RSS(kp) (kp.kp_vm_rssize * getpagesize())
-+#elif defined(__FreeBSD__)
-+#define KP_SIZE(kp) (kp.ki_size)
-+#define KP_RSS(kp) (kp.ki_rssize * getpagesize())
-+#elif defined(__NetBSD__)
-+#define KP_SIZE(kp) (kp.p_vm_msize * getpagesize())
-+#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize())
-+#elif defined(__OpenBSD__)
-+#define KP_SIZE(kp) ((kp.p_vm_dsize + kp.p_vm_ssize                     \
-+                      + kp.p_vm_tsize) * getpagesize())
-+#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize())
-+#endif
-+
-+static nsresult GetKinfoProcSelf(KINFO_PROC *proc)
-+{
-+    int mib[] = {
-+        CTL_KERN,
-+        KERN_PROC,
-+        KERN_PROC_PID,
-+        getpid(),
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
-+        sizeof(KINFO_PROC),
-+        1,
-+#endif
-+    };
-+    u_int miblen = sizeof(mib) / sizeof(mib[0]);
-+    size_t size = sizeof(KINFO_PROC);
-+    if (sysctl(mib, miblen, proc, &size, NULL, 0))
-+        return NS_ERROR_FAILURE;
-+
-+    return NS_OK;
-+}
-+
-+#define HAVE_VSIZE_AND_RESIDENT_REPORTERS 1
-+static nsresult GetVsize(PRInt64 *n)
-+{
-+    KINFO_PROC proc;
-+    nsresult rv = GetKinfoProcSelf(&proc);
-+    if (NS_SUCCEEDED(rv))
-+        *n = KP_SIZE(proc);
-+
-+    return rv;
-+}
-+
-+static nsresult GetResident(PRInt64 *n)
-+{
-+    KINFO_PROC proc;
-+    nsresult rv = GetKinfoProcSelf(&proc);
-+    if (NS_SUCCEEDED(rv))
-+        *n = KP_RSS(proc);
-+
-+    return rv;
-+}
-+
- #elif defined(SOLARIS)
- 
- #include <procfs.h>

Added: trunk/mail/thunderbird/files/patch-bug798354
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/mail/thunderbird/files/patch-bug798354	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,15 @@
+--- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc~
++++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
+@@ -133,7 +133,12 @@ int ChannelNameToClientFD(const std::string& channel_id) {
+ }
+ 
+ //------------------------------------------------------------------------------
++#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 2
++sockaddr_un sizecheck;
++const size_t kMaxPipeNameLength = sizeof(sizecheck.sun_path);
++#else
+ const size_t kMaxPipeNameLength = sizeof(sockaddr_un::sun_path);
++#endif
+ 
+ // Creates a Fifo with the specified name ready to listen on.
+ bool CreateServerFifo(const std::string& pipe_name, int* server_listen_fd) {

Deleted: trunk/mail/thunderbird/files/patch-bug799441
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug799441	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,116 +0,0 @@
-commit b9accdd
-Author: Mike Hommey <mh+mozilla at glandium.org>
-Date:   Thu Oct 18 14:47:10 2012 +0200
-
-    Bug 799441 - Build GIO module in libxul. r=ted
----
- configure.in                              |  6 ++++++
- extensions/gio/Makefile.in                | 14 +++-----------
- toolkit/library/Makefile.in               |  5 +++++
- toolkit/library/nsStaticXULComponents.cpp |  7 +++++++
- toolkit/toolkit-tiers.mk                  |  4 ++++
- 5 files changed, 25 insertions(+), 11 deletions(-)
-
-diff --git configure.in configure.in
-index a9fb5f1..37e6db8 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -6086,6 +6086,12 @@ if test -n "$LIBXUL_SDK_DIR" -a `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; th
-     MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gio||'`
- fi
- 
-+if test `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; then
-+    MOZ_GIO_COMPONENT=1
-+    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gio||'`
-+fi
-+AC_SUBST(MOZ_GIO_COMPONENT)
-+
- if test -z "$MOZ_JSDEBUGGER" -a `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then
-     AC_MSG_WARN([Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS.])
-     MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'`
-diff --git extensions/gio/Makefile.in extensions/gio/Makefile.in
-index ccf2846..79112a8 100644
---- mozilla/extensions/gio/Makefile.in
-+++ mozilla/extensions/gio/Makefile.in
-@@ -14,6 +14,9 @@ MODULE		= nkgio
- LIBRARY_NAME	= nkgio
- SHORT_LIBNAME	= nkgio
- IS_COMPONENT	= 1
-+EXPORT_LIBRARY	= 1
-+MODULE_NAME	= nsGIOModule
-+LIBXUL_LIBRARY	= 1
- 
- CPPSRCS		= \
- 		nsGIOProtocolHandler.cpp \
-@@ -21,15 +24,4 @@ CPPSRCS		= \
- 
- LOCAL_INCLUDES	= $(MOZ_GIO_CFLAGS)
- 
--EXTRA_DSO_LDOPTS = \
--		   $(XPCOM_GLUE_LDOPTS) \
--		   $(NSPR_LIBS) \
--		   $(MOZ_GIO_LIBS) \
--		   $(NULL)
--
--# make sure this component is never statically linked into the main
--# application.  this is necessary since we don't want to force users
--# to install gio in order to use the rest of mozilla ;-)
--FORCE_SHARED_LIB= 1
--
- include $(topsrcdir)/config/rules.mk
-diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
-index 7f9046e..6499758 100644
---- mozilla/toolkit/library/Makefile.in
-+++ mozilla/toolkit/library/Makefile.in
-@@ -333,6 +333,11 @@ COMPONENT_LIBS += gkdebug
- endif
- endif
- 
-+ifdef MOZ_GIO_COMPONENT
-+DEFINES += -DMOZ_GIO_COMPONENT
-+COMPONENT_LIBS += nkgio
-+endif
-+
- ifdef MOZ_APP_COMPONENT_LIBS
- COMPONENT_LIBS += $(MOZ_APP_COMPONENT_LIBS)
- endif
-diff --git toolkit/library/nsStaticXULComponents.cpp toolkit/library/nsStaticXULComponents.cpp
-index e1d90f2..85b21a2 100644
---- mozilla/toolkit/library/nsStaticXULComponents.cpp
-+++ mozilla/toolkit/library/nsStaticXULComponents.cpp
-@@ -164,6 +164,12 @@
- #define PROFILER_MODULE
- #endif
- 
-+#if defined(MOZ_GIO_COMPONENT)
-+#define GIO_MODULE MODULE(nsGIOModule)
-+#else
-+#define GIO_MODULE
-+#endif
-+
- #define XUL_MODULES                          \
-     MODULE(nsUConvModule)                    \
-     MODULE(nsI18nModule)                     \
-@@ -220,6 +226,7 @@
-     MODULE(nsTelemetryModule)                \
-     MODULE(jsinspector)                      \
-     MODULE(jsdebugger)                       \
-+    GIO_MODULE                               \
-     /* end of list */
- 
- #define MODULE(_name) \
-diff --git toolkit/toolkit-tiers.mk toolkit/toolkit-tiers.mk
-index e87d7af..4b16d23 100644
---- mozilla/toolkit/toolkit-tiers.mk
-+++ mozilla/toolkit/toolkit-tiers.mk
-@@ -252,6 +252,10 @@ tier_platform_dirs += js/ductwork/debugger
- 
- tier_platform_dirs += other-licenses/snappy
- 
-+ifdef MOZ_GIO_COMPONENT
-+tier_platform_dirs += extensions/gio
-+endif
-+
- ifdef APP_LIBXUL_STATICDIRS
- # Applications can cheat and ask for code to be
- # built before libxul so libxul can be linked against it.

Modified: trunk/mail/thunderbird/files/patch-bug806139
==============================================================================
--- trunk/mail/thunderbird/files/patch-bug806139	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/mail/thunderbird/files/patch-bug806139	Mon Dec  3 18:03:03 2012	(r1110)
@@ -11,10 +11,10 @@
  #ifdef MOZ_MEDIA_PLUGINS
 --- mozilla/content/html/content/src/nsHTMLMediaElement.cpp~
 +++ mozilla/content/html/content/src/nsHTMLMediaElement.cpp
-@@ -2114,12 +2114,14 @@ const char nsHTMLMediaElement::gH264Type
-   "video/quicktime",
- };
+@@ -2135,12 +2135,14 @@ nsHTMLMediaElement::IsWebMType(const nsA
+ #endif
  
+ #if defined(MOZ_GSTREAMER) || defined(MOZ_WIDGET_GONK)
 -char const *const nsHTMLMediaElement::gH264Codecs[7] = {
 +char const *const nsHTMLMediaElement::gH264Codecs[9] = {
    "avc1.42E01E",

Added: trunk/mail/thunderbird/files/patch-bug815025
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/mail/thunderbird/files/patch-bug815025	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,27 @@
+--- mozilla/mfbt/SHA1.h~
++++ mozilla/mfbt/SHA1.h
+@@ -27,6 +27,11 @@
+ #include "mozilla/StandardInteger.h"
+ #include "mozilla/Types.h"
+ 
++#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 3
++/* c++/36107: mark SHA1Sum constructor as weak manually */
++__asm__(".weak _ZN7mozilla7SHA1SumC1Ev");
++#endif
++
+ namespace mozilla {
+ class SHA1Sum {
+   union {
+@@ -39,7 +43,12 @@ class SHA1Sum {
+ 
+ public:
+   static const unsigned int HashSize = 20;
++#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 3
++  /* c++/36107: gcc42 fails to remove *INTERNAL* from produced asm */
++  MOZ_IMPORT_API() SHA1Sum();
++#else
+   MFBT_API() SHA1Sum();
++#endif
+   MFBT_API(void) update(const void* dataIn, uint32_t len);
+   MFBT_API(void) finish(uint8_t hashout[20]);
+ };

Modified: trunk/mail/thunderbird/files/patch-mozilla-content-media-nsAudioStream.cpp
==============================================================================
--- trunk/mail/thunderbird/files/patch-mozilla-content-media-nsAudioStream.cpp	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/mail/thunderbird/files/patch-mozilla-content-media-nsAudioStream.cpp	Mon Dec  3 18:03:03 2012	(r1110)
@@ -1,14 +1,11 @@
 --- mozilla/content/media/nsAudioStream.cpp~
 +++ mozilla/content/media/nsAudioStream.cpp
-@@ -298,7 +298,11 @@ static int PrefChanged(const char* aPref
-       gVolumeScale = NS_MAX<double>(0, PR_strtod(utf8.get(), nsnull));
+@@ -298,7 +298,7 @@ static int PrefChanged(const char* aPref, void* aClosure)
+       gVolumeScale = NS_MAX<double>(0, PR_strtod(utf8.get(), nullptr));
      }
    } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) {
-+#if defined(__FreeBSD__) && __FreeBSD_version < 800097
-+    bool value = Preferences::GetBool(aPref, false);
-+#else
+-#ifdef MOZ_WIDGET_GONK
++#if defined(MOZ_WIDGET_GONK) || defined(__FreeBSD__) && __FreeBSD_version < 800097
+     bool value = Preferences::GetBool(aPref, false);
+ #else
      bool value = Preferences::GetBool(aPref, true);
-+#endif
-     mozilla::MutexAutoLock lock(*gAudioPrefsLock);
-     gUseCubeb = value;
-   } else if (strcmp(aPref, PREF_CUBEB_LATENCY) == 0) {

Modified: trunk/mail/thunderbird/files/patch-mozilla-gfx-qcms-qcmstypes.h
==============================================================================
--- trunk/mail/thunderbird/files/patch-mozilla-gfx-qcms-qcmstypes.h	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/mail/thunderbird/files/patch-mozilla-gfx-qcms-qcmstypes.h	Mon Dec  3 18:03:03 2012	(r1110)
@@ -6,6 +6,6 @@
  #include <stdlib.h>
 -#elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED)
 +#elif !defined(__intptr_t_defined) && !defined(_INTPTR_T_DECLARED) 
- typedef PRUptrdiff uintptr_t;
+ typedef unsigned long uintptr_t;
  #endif
  #endif

Added: trunk/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/mail/thunderbird/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,16 @@
+--- mozilla/ipc/chromium/src/base/platform_thread_posix.cc~
++++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc
+@@ -16,7 +16,13 @@
+ #include <sys/prctl.h>
+ #elif defined(OS_FREEBSD)
+ #include <sys/param.h>
++#if __FreeBSD_version > 802500
+ #include <sys/thr.h>
++#else
++_Pragma("GCC visibility push(default)")
++extern "C" int thr_self(long *);
++_Pragma("GCC visibility pop")
++#endif
+ #endif
+ 
+ #if !defined(OS_MACOSX)

Added: trunk/mail/thunderbird/files/patch-mozilla-xpcom-base-AvailableMemoryTracker.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/mail/thunderbird/files/patch-mozilla-xpcom-base-AvailableMemoryTracker.cpp	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,10 @@
+--- mozilla/xpcom/base/AvailableMemoryTracker.cpp~
++++ mozilla/xpcom/base/AvailableMemoryTracker.cpp
+@@ -499,6 +499,6 @@ nsJemallocFreeDirtyPagesRunnable::Run()
+   MOZ_ASSERT(NS_IsMainThread());
+ 
+ #if defined(MOZ_JEMALLOC)
+-  mallctl("arenas.purge", nullptr, 0, nullptr, 0);
++//  mallctl("arenas.purge", nullptr, 0, nullptr, 0);
+ #elif defined(MOZ_MEMORY)
+   jemalloc_free_dirty_pages();

Modified: trunk/www/firefox-nightly/Makefile.hgrev
==============================================================================
--- trunk/www/firefox-nightly/Makefile.hgrev	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/firefox-nightly/Makefile.hgrev	Mon Dec  3 18:03:03 2012	(r1110)
@@ -1 +1 @@
-HGREV=		114083:0d373cf880fd
+HGREV=		114744:d9020fa719c5

Modified: trunk/www/firefox-nightly/distinfo
==============================================================================
--- trunk/www/firefox-nightly/distinfo	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/firefox-nightly/distinfo	Mon Dec  3 18:03:03 2012	(r1110)
@@ -1,2 +1,2 @@
-SHA256 (firefox-nightly/0d373cf880fd.tar.bz2) = 981e37d29ee53ca20b8e7a388dd516cdc6f820d5745e873607f835a2a85ebad9
-SIZE (firefox-nightly/0d373cf880fd.tar.bz2) = 96714812
+SHA256 (firefox-nightly/d9020fa719c5.tar.bz2) = db96af57c138017acc10af48105bb4e05a9576aac55dbc505c3fd91be43d1afb
+SIZE (firefox-nightly/d9020fa719c5.tar.bz2) = 97741462

Deleted: trunk/www/firefox-nightly/files/patch-alsapulse
==============================================================================
--- trunk/www/firefox-nightly/files/patch-alsapulse	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,114 +0,0 @@
-diff --git configure.in configure.in
-index 5980b76..11f5f77 100644
---- configure.in
-+++ configure.in
-@@ -5600,13 +5600,25 @@ dnl ========================================================
- dnl = Check alsa availability on Linux if using sydneyaudio
- dnl ========================================================
- 
-+MOZ_ARG_ENABLE_BOOL(alsa,
-+[  --enable-alsa          Enable Alsa support (default on Linux)],
-+MOZ_ALSA=1,
-+MOZ_ALSA= MOZ_ALSA_FORCE=$enableval)
-+
- dnl If using sydneyaudio with Linux, ensure that the alsa library is available
--if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then
-+if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux" -a "$MOZ_ALSA_FORCE" != "no"; then
-+    MOZ_ALSA=1
-+fi
-+
-+if test -n "$MOZ_ALSA"; then
-+    AC_DEFINE(MOZ_CUBEB)
-     PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
-          [echo "$MOZ_ALSA_PKG_ERRORS"
-           AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux.  Disable with --disable-ogg --disable-wave --disable-webm.  (On Ubuntu, you might try installing the package libasound2-dev.)])])
- fi
- 
-+AC_SUBST(MOZ_ALSA)
-+
- dnl ========================================================
- dnl = Enable PulseAudio
- dnl ========================================================
-diff --git media/libcubeb/src/Makefile.in media/libcubeb/src/Makefile.in
-index 5ab4dd8..c8df26f 100644
---- media/libcubeb/src/Makefile.in
-+++ media/libcubeb/src/Makefile.in
-@@ -24,10 +24,6 @@ endif
- 
- ifeq ($(OS_TARGET),Android)
- # No Android implementation of libcubeb yet.
--else ifeq ($(OS_TARGET),Linux)
--CSRCS         = \
--              cubeb_alsa.c \
--              $(NULL)
- endif
- 
- ifeq ($(OS_TARGET),Darwin)
-@@ -42,6 +38,12 @@ CSRCS           = \
-                 $(NULL)
- endif
- 
-+ifdef MOZ_ALSA
-+CSRCS         = \
-+              cubeb_alsa.c \
-+              $(NULL)
-+endif
-+
- ifdef MOZ_PULSEAUDIO
- CSRCS		= \
- 		cubeb_pulse.c \
-diff --git media/libsydneyaudio/src/Makefile.in media/libsydneyaudio/src/Makefile.in
-index 8dda8ce..b19641d 100644
---- media/libsydneyaudio/src/Makefile.in
-+++ media/libsydneyaudio/src/Makefile.in
-@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android)
- CSRCS		= \
- 		sydney_audio_android.c \
- 		$(NULL)
--else ifeq ($(OS_ARCH),Linux)
--CSRCS		= \
--		sydney_audio_alsa.c \
--		$(NULL)
- endif
- 
- ifeq ($(OS_ARCH),WINNT)
-@@ -68,6 +64,18 @@ CSRCS		= \
- 		$(NULL)
- endif
- 
-+ifdef MOZ_ALSA
-+CSRCS		= \
-+		sydney_audio_alsa.c \
-+		$(NULL)
-+endif
-+
-+ifdef MOZ_PULSEAUDIO
-+CSRCS		= \
-+		sydney_audio_pulseaudio.c \
-+		$(NULL)
-+endif
-+
- ifeq ($(OS_ARCH),WINNT)
- OS_LIBS += winmm.lib
- endif
-diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
-index 43384e9..e46a6e3 100644
---- toolkit/library/Makefile.in
-+++ toolkit/library/Makefile.in
-@@ -370,14 +370,11 @@ endif
- 
- EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib) 
- 
--ifdef MOZ_SYDNEYAUDIO
--ifeq ($(OS_ARCH),Linux)
-+ifneq (,$(MOZ_CUBEB)$(MOZ_SYDNEYAUDIO))
-+ifdef MOZ_ALSA
- EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
- endif
--endif
--
- ifdef MOZ_PULSEAUDIO
--ifdef MOZ_CUBEB
- EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
- endif
- endif

Added: trunk/www/firefox-nightly/files/patch-gfx-ots-include-opentype-sanitiser.h
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/www/firefox-nightly/files/patch-gfx-ots-include-opentype-sanitiser.h	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,18 @@
+diff --git gfx/ots/include/opentype-sanitiser.h gfx/ots/include/opentype-sanitiser.h
+index f42822e..1a5a699 100644
+--- gfx/ots/include/opentype-sanitiser.h
++++ gfx/ots/include/opentype-sanitiser.h
+@@ -44,6 +44,13 @@ typedef unsigned __int64 uint64_t;
+ #include <stdint.h>
+ #endif
+ 
++#ifdef __FreeBSD__
++# include <osreldate.h>
++# if __FreeBSD_version < 800067
++#  include <sys/types.h> // for off_t
++# endif
++#endif
++
+ #include <algorithm>  // for std::min
+ #include <cassert>
+ #include <cstddef>

Added: trunk/www/firefox-nightly/files/patch-media-libsydneyaudio-src-Makefile.in
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/www/firefox-nightly/files/patch-media-libsydneyaudio-src-Makefile.in	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,17 @@
+diff --git media/libsydneyaudio/src/Makefile.in media/libsydneyaudio/src/Makefile.in
+index 8dda8ce..b19641d 100644
+--- media/libsydneyaudio/src/Makefile.in
++++ media/libsydneyaudio/src/Makefile.in
+@@ -68,6 +68,12 @@ ifdef MOZ_ALSA
+ 		$(NULL)
+ endif
+ 
++ifdef MOZ_PULSEAUDIO
++CSRCS		= \
++		sydney_audio_pulseaudio.c \
++		$(NULL)
++endif
++
+ ifeq ($(OS_ARCH),WINNT)
+ OS_LIBS += winmm.lib
+ endif

Added: trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-modules-audio_device-main-source-linux-latebindingsymboltable_linux.cc	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,37 @@
+--- media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc~
++++ media/webrtc/trunk/src/modules/audio_device/main/source/linux/latebindingsymboltable_linux.cc
+@@ -31,6 +31,10 @@
+ #include <dlfcn.h>
+ #endif
+ 
++#ifdef __FreeBSD__
++#include <osreldate.h>
++#endif
++
+ // TODO(grunell): Either put inside webrtc namespace or use webrtc:: instead.
+ using namespace webrtc;
+ 
+@@ -38,7 +42,11 @@ namespace webrtc_adm_linux {
+ 
+ inline static const char *GetDllError() {
+ #ifdef WEBRTC_LINUX
++#if __FreeBSD_version < 800505
++  const char *err = dlerror();
++#else
+   char *err = dlerror();
++#endif
+   if (err) {
+     return err;
+   } else {
+@@ -78,7 +86,11 @@ static bool LoadSymbol(DllHandle handle,
+                        void **symbol) {
+ #ifdef WEBRTC_LINUX
+   *symbol = dlsym(handle, symbol_name);
++#if __FreeBSD_version < 800505
++  const char *err = dlerror();
++#else
+   char *err = dlerror();
++#endif
+   if (err) {
+     WEBRTC_TRACE(kTraceError, kTraceAudioDevice, -1,
+                "Error loading symbol %s : %d", symbol_name, err);

Added: trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,16 @@
+--- media/webrtc/trunk/src/system_wrappers/source/spreadsortlib/spreadsort.hpp~
++++ media/webrtc/trunk/src/system_wrappers/source/spreadsortlib/spreadsort.hpp
+@@ -21,6 +21,13 @@ Scott McMurray
+ #include "constants.hpp"
+ #include <cstring>
+ 
++#ifdef __FreeBSD__
++# include <osreldate.h>
++# if __FreeBSD_version < 900506
++#  define getchar boost_getchar
++# endif
++#endif
++
+ namespace boost {
+   namespace detail {
+   	//This only works on unsigned data types

Added: trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/www/firefox-nightly/files/patch-media-webrtc-trunk-src-system_wrappers-source-thread_posix.cc	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,16 @@
+--- media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc~
++++ media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc
+@@ -62,7 +62,13 @@
+ #include <lwp.h>
+ #elif defined(__FreeBSD__)
+ #include <sys/param.h>
++#if __FreeBSD_version > 802500
+ #include <sys/thr.h>
++#else
++_Pragma("GCC visibility push(default)")
++extern "C" int thr_self(long *);
++_Pragma("GCC visibility pop")
++#endif
+ #endif
+ 
+ #if defined(WEBRTC_BSD) && !defined(__NetBSD__)

Modified: trunk/www/firefox/Makefile
==============================================================================
--- trunk/www/firefox/Makefile	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/firefox/Makefile	Mon Dec  3 18:03:03 2012	(r1110)
@@ -6,7 +6,7 @@
 #
 
 PORTNAME=	firefox
-DISTVERSION=	18.0b1
+DISTVERSION=	18.0b2
 PORTEPOCH=	1
 CATEGORIES=	www ipv6
 MASTER_SITES=	${MASTER_SITE_MOZILLA}

Modified: trunk/www/firefox/distinfo
==============================================================================
--- trunk/www/firefox/distinfo	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/firefox/distinfo	Mon Dec  3 18:03:03 2012	(r1110)
@@ -1,2 +1,2 @@
-SHA256 (firefox-18.0b1.source.tar.bz2) = 52338270fe8cdea947750d55bc4acb68d3750490989db8ba37a59870824a926b
-SIZE (firefox-18.0b1.source.tar.bz2) = 96629018
+SHA256 (firefox-18.0b2.source.tar.bz2) = d6fcb337889810436936a5dc0dac8936029bb4011afe8a0956ee4e1f09773bdb
+SIZE (firefox-18.0b2.source.tar.bz2) = 96713768

Modified: trunk/www/firefox/files/patch-alsapulse
==============================================================================
--- trunk/www/firefox/files/patch-alsapulse	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/firefox/files/patch-alsapulse	Mon Dec  3 18:03:03 2012	(r1110)
@@ -2,21 +2,18 @@
 index 5980b76..11f5f77 100644
 --- configure.in
 +++ configure.in
-@@ -5600,13 +5600,25 @@ dnl ========================================================
- dnl = Check alsa availability on Linux if using sydneyaudio
- dnl ========================================================
+@@ -5618,11 +5618,25 @@ dnl ========================================================
  
-+MOZ_ARG_ENABLE_BOOL(alsa,
-+[  --enable-alsa          Enable Alsa support (default on Linux)],
-+MOZ_ALSA=1,
-+MOZ_ALSA= MOZ_ALSA_FORCE=$enableval)
-+
  dnl If using sydneyaudio with Linux, ensure that the alsa library is available
--if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then
-+if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux" -a "$MOZ_ALSA_FORCE" != "no"; then
+ if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then
 +    MOZ_ALSA=1
 +fi
 +
++MOZ_ARG_ENABLE_BOOL(alsa,
++[  --enable-alsa          Enable Alsa support (default on Linux)],
++MOZ_ALSA=1,
++MOZ_ALSA=)
++
 +if test -n "$MOZ_ALSA"; then
 +    AC_DEFINE(MOZ_CUBEB)
      PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
@@ -25,10 +22,21 @@
  fi
  
 +AC_SUBST(MOZ_ALSA)
++AC_SUBST(MOZ_ALSA_CFLAGS)
++AC_SUBST(MOZ_ALSA_LIBS)
 +
  dnl ========================================================
  dnl = Enable PulseAudio
  dnl ========================================================
+@@ -8633,8 +8647,6 @@ AC_SUBST(MOZ_VP8_ERROR_CONCEALMENT)
+ AC_SUBST(MOZ_VP8_ENCODER)
+ AC_SUBST(MOZ_VP8)
+ AC_SUBST(MOZ_OGG)
+-AC_SUBST(MOZ_ALSA_LIBS)
+-AC_SUBST(MOZ_ALSA_CFLAGS)
+ AC_SUBST(VPX_AS)
+ AC_SUBST(VPX_ASFLAGS)
+ AC_SUBST(VPX_DASH_C_FLAG)
 diff --git media/libcubeb/src/Makefile.in media/libcubeb/src/Makefile.in
 index 5ab4dd8..c8df26f 100644
 --- media/libcubeb/src/Makefile.in

Modified: trunk/www/seamonkey/Makefile
==============================================================================
--- trunk/www/seamonkey/Makefile	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/seamonkey/Makefile	Mon Dec  3 18:03:03 2012	(r1110)
@@ -2,7 +2,7 @@
 # $FreeBSD: ports/www/seamonkey/Makefile,v 1.326 2012/06/01 05:25:02 dinoex Exp $
 
 PORTNAME=	seamonkey
-DISTVERSION=	2.14
+DISTVERSION=	2.15b2
 CATEGORIES?=	www ipv6
 MASTER_SITES=	${MASTER_SITE_MOZILLA_EXTENDED}
 MASTER_SITE_SUBDIR=	seamonkey/releases/${DISTVERSION}/source
@@ -22,6 +22,7 @@
 
 USE_AUTOTOOLS=	autoconf213:env
 USE_PYTHON_BUILD=-2.7
+OBJDIR_BUILD=	# in-tree build broken after bug 789837
 USE_BZIP2=	yes
 USE_GMAKE=	yes
 USE_GECKO=	gecko
@@ -64,7 +65,7 @@
 
 .include <bsd.port.pre.mk>
 
-WRKSRC=		${WRKDIR}/comm-release
+WRKSRC=		${WRKDIR}/comm-beta
 MOZSRC:=	${WRKSRC}/mozilla
 
 XPI_LIBDIR=	${PREFIX}/lib/xpi
@@ -128,6 +129,8 @@
 .endif
 
 post-patch:
+	@${REINPLACE_CMD} -e '/MOZPNG/s/=[0-9]*/=10511/' \
+		${MOZSRC}/configure.in ${WRKSRC}/configure.in
 	@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
 		${WRKSRC}/suite/app/nsSuiteApp.cpp
 	@${REINPLACE_CMD} -e '/accessibility.typeaheadfind.enablesound/s/true/false/' \

Modified: trunk/www/seamonkey/distinfo
==============================================================================
--- trunk/www/seamonkey/distinfo	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/seamonkey/distinfo	Mon Dec  3 18:03:03 2012	(r1110)
@@ -1,4 +1,2 @@
-SHA256 (seamonkey-2.14.source.tar.bz2) = 1a42a9fb31929c5607169be6a27b3ce8496887c505c6236efcbc5c5ff52e5914
-SIZE (seamonkey-2.14.source.tar.bz2) = 114330817
-SHA256 (enigmail-1.4.6.tar.gz) = f3771d1faa26676818bab5e2c50dce85013b9de30b82de526159eaa7ca34f036
-SIZE (enigmail-1.4.6.tar.gz) = 1262280
+SHA256 (seamonkey-2.15b2.source.tar.bz2) = e89a28463bb52d73550ff11766a87abdba3f86aeefacd98e161562e7c6e4703c
+SIZE (seamonkey-2.15b2.source.tar.bz2) = 120021742

Modified: trunk/www/seamonkey/files/extra-bug780531
==============================================================================
--- trunk/www/seamonkey/files/extra-bug780531	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/seamonkey/files/extra-bug780531	Mon Dec  3 18:03:03 2012	(r1110)
@@ -8,6 +8,6 @@
 -arm*)
 +case "$target" in
 +arm-*-linux*|*-dragonfly*|*-freebsd*|*-netbsd*|*-openbsd*)
-     MOZ_SAMPLE_TYPE_S16LE=1
-     AC_DEFINE(MOZ_SAMPLE_TYPE_S16LE)
-     AC_SUBST(MOZ_SAMPLE_TYPE_S16LE)
+     MOZ_SAMPLE_TYPE_S16=1
+     AC_DEFINE(MOZ_SAMPLE_TYPE_S16)
+     AC_SUBST(MOZ_SAMPLE_TYPE_S16)

Modified: trunk/www/seamonkey/files/patch-alsapulse
==============================================================================
--- trunk/www/seamonkey/files/patch-alsapulse	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/seamonkey/files/patch-alsapulse	Mon Dec  3 18:03:03 2012	(r1110)
@@ -2,21 +2,18 @@
 index 5980b76..11f5f77 100644
 --- mozilla/configure.in
 +++ mozilla/configure.in
-@@ -5600,13 +5600,25 @@ dnl ========================================================
- dnl = Check alsa availability on Linux if using sydneyaudio
- dnl ========================================================
+@@ -5618,11 +5618,25 @@ dnl ========================================================
  
-+MOZ_ARG_ENABLE_BOOL(alsa,
-+[  --enable-alsa          Enable Alsa support (default on Linux)],
-+MOZ_ALSA=1,
-+MOZ_ALSA= MOZ_ALSA_FORCE=$enableval)
-+
  dnl If using sydneyaudio with Linux, ensure that the alsa library is available
--if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then
-+if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux" -a "$MOZ_ALSA_FORCE" != "no"; then
+ if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then
 +    MOZ_ALSA=1
 +fi
 +
++MOZ_ARG_ENABLE_BOOL(alsa,
++[  --enable-alsa          Enable Alsa support (default on Linux)],
++MOZ_ALSA=1,
++MOZ_ALSA=)
++
 +if test -n "$MOZ_ALSA"; then
 +    AC_DEFINE(MOZ_CUBEB)
      PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
@@ -25,10 +22,21 @@
  fi
  
 +AC_SUBST(MOZ_ALSA)
++AC_SUBST(MOZ_ALSA_CFLAGS)
++AC_SUBST(MOZ_ALSA_LIBS)
 +
  dnl ========================================================
  dnl = Enable PulseAudio
  dnl ========================================================
+@@ -8633,8 +8647,6 @@ AC_SUBST(MOZ_VP8_ERROR_CONCEALMENT)
+ AC_SUBST(MOZ_VP8_ENCODER)
+ AC_SUBST(MOZ_VP8)
+ AC_SUBST(MOZ_OGG)
+-AC_SUBST(MOZ_ALSA_LIBS)
+-AC_SUBST(MOZ_ALSA_CFLAGS)
+ AC_SUBST(VPX_AS)
+ AC_SUBST(VPX_ASFLAGS)
+ AC_SUBST(VPX_DASH_C_FLAG)
 diff --git mozilla/media/libcubeb/src/Makefile.in mozilla/media/libcubeb/src/Makefile.in
 index 5ab4dd8..c8df26f 100644
 --- mozilla/media/libcubeb/src/Makefile.in

Deleted: trunk/www/seamonkey/files/patch-bug713802
==============================================================================
--- trunk/www/seamonkey/files/patch-bug713802	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,176 +0,0 @@
-commit 20586fa
-Author: Karl Tomlinson <karlt+ at karlt.net>
-Date:   Thu Sep 27 18:35:06 2012 +1200
-
-    b=713802 default enable GIO support and disable GnomeVFS r=glandium
-    
-    --HG--
-    extra : transplant_source : wk%ADr%CA%8EN%AE%C93p/p%0A%26%0E%1D0%F20
----
- browser/confvars.sh   |  2 +-
- configure.in          | 20 ++++++++++----------
- xulrunner/confvars.sh |  2 +-
- 3 files changed, 12 insertions(+), 12 deletions(-)
-
-diff --git mozilla/browser/confvars.sh mozilla/browser/confvars.sh
-index 40ab494..eae5645 100755
---- mozilla/browser/confvars.sh
-+++ mozilla/browser/confvars.sh
-@@ -21,7 +21,7 @@ MOZ_SERVICES_AITC=1
- MOZ_SERVICES_NOTIFICATIONS=1
- MOZ_SERVICES_SYNC=1
- MOZ_APP_VERSION=$FIREFOX_VERSION
--MOZ_EXTENSIONS_DEFAULT=" gnomevfs"
-+MOZ_EXTENSIONS_DEFAULT=" gio"
- # MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
- # Changing MOZ_*BRANDING_DIRECTORY requires a clobber to ensure correct results,
- # because branding dependencies are broken.
-diff --git mozilla/configure.in mozilla/configure.in
-index 87a9391..2118651 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -4846,21 +4846,21 @@ dnl ========================================================
- 
- if test "$MOZ_X11"
- then
--    dnl build the gnomevfs extension by default only when the
-+    dnl build the GIO extension by default only when the
-     dnl GTK2 toolkit is in use.
-     if test "$MOZ_ENABLE_GTK2"
-     then
--        MOZ_ENABLE_GNOMEVFS=1
-+        MOZ_ENABLE_GIO=1
-         MOZ_ENABLE_GCONF=1
-     fi
- 
-     dnl ========================================================
-     dnl = GnomeVFS support module
-     dnl ========================================================
--    MOZ_ARG_DISABLE_BOOL(gnomevfs,
--    [  --disable-gnomevfs      Disable GnomeVFS support ],
--        MOZ_ENABLE_GNOMEVFS=,
--        MOZ_ENABLE_GNOMEVFS=force)
-+    MOZ_ARG_ENABLE_BOOL(gnomevfs,
-+    [  --enable-gnomevfs       Enable GnomeVFS support (default: disabled)],
-+        MOZ_ENABLE_GNOMEVFS=force,
-+        MOZ_ENABLE_GNOMEVFS=)
- 
-     if test "$MOZ_ENABLE_GNOMEVFS"
-     then
-@@ -4884,10 +4884,10 @@ then
-     dnl ========================================================
-     dnl = GIO support module
-     dnl ========================================================
--    MOZ_ARG_ENABLE_BOOL(gio,
--    [  --enable-gio            Enable GIO support (default: disabled)],
--        MOZ_ENABLE_GIO=force,
--        MOZ_ENABLE_GIO=)
-+    MOZ_ARG_DISABLE_BOOL(gio,
-+    [  --disable-gio           Disable GIO support],
-+        MOZ_ENABLE_GIO=,
-+        MOZ_ENABLE_GIO=force)
- 
-     if test "$MOZ_ENABLE_GIO" -a "$MOZ_ENABLE_GTK2"
-     then
-diff --git mozilla/xulrunner/confvars.sh mozilla/xulrunner/confvars.sh
-index 2fa6ead..5fe2c3d 100755
---- mozilla/xulrunner/confvars.sh
-+++ mozilla/xulrunner/confvars.sh
-@@ -10,5 +10,5 @@ MOZ_XULRUNNER=1
- MOZ_CHROME_FILE_FORMAT=omni
- MOZ_APP_VERSION=$MOZILLA_VERSION
- MOZ_PLACES=1
--MOZ_EXTENSIONS_DEFAULT=" gnomevfs"
-+MOZ_EXTENSIONS_DEFAULT=" gio"
- MOZ_URL_CLASSIFIER=1
-diff --git suite/confvars.sh suite/confvars.sh
-index 8c13a33..cdedd30 100755
---- suite/confvars.sh
-+++ suite/confvars.sh
-@@ -15,7 +15,7 @@ MOZ_COMPOSER=1
- MOZ_SUITE=1
- MOZ_BRANDING_DIRECTORY=suite/branding/nightly
- MOZ_OFFICIAL_BRANDING_DIRECTORY=suite/branding/nightly
--MOZ_EXTENSIONS_DEFAULT=" venkman inspector irc gnomevfs"
-+MOZ_EXTENSIONS_DEFAULT=" venkman inspector irc gio"
- MOZ_UPDATER=1
- # This should usually be the same as the value MAR_CHANNEL_ID.
- # If more than one ID is needed, then you should use a comma separated list
-
-commit d884d75
-Author: Karl Tomlinson <karlt+ at karlt.net>
-Date:   Thu Sep 27 18:34:44 2012 +1200
-
-    b=713802 disable gnomevfs extension without --enable-gnomevfs r=glandium
-    
-    --HG--
-    extra : transplant_source : i%07%81%E9%90_%C1%05b%194%9B%1E%93%FC%03%279%F9%8A
----
- configure.in | 12 +++---------
- 1 file changed, 3 insertions(+), 9 deletions(-)
-
-diff --git mozilla/configure.in mozilla/configure.in
-index f2b4041..87a9391 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -4875,12 +4875,6 @@ then
-             fi
-             MOZ_ENABLE_GNOMEVFS=
-         ])
--    else
--        if test `echo "$MOZ_EXTENSIONS" | grep -c gnomevfs` -ne 0; then
--            PKG_CHECK_MODULES(MOZ_GNOMEVFS, gnome-vfs-2.0 >= $GNOMEVFS_VERSION gnome-vfs-module-2.0 >= $GNOMEVFS_VERSION,[
--              MOZ_GNOMEVFS_LIBS=`echo $MOZ_GNOMEVFS_LIBS | sed 's/-llinc\>//'`
--            ])
--        fi
-     fi
- 
-     AC_SUBST(MOZ_ENABLE_GNOMEVFS)
-@@ -5967,10 +5961,10 @@ MOZ_ARG_ENABLE_STRING(extensions,
- done],
-     MOZ_EXTENSIONS="$MOZ_EXTENSIONS_DEFAULT")
- 
--if test -z "$MOZ_ENABLE_GNOMEVFS" -a -z "$MOZ_GNOMEVFS_LIBS" -a `echo "$MOZ_EXTENSIONS" | grep -c gnomevfs` -ne 0; then
-+if test -z "$MOZ_ENABLE_GNOMEVFS" -a `echo "$MOZ_EXTENSIONS" | grep -c gnomevfs` -ne 0; then
-     # Suppress warning on non-X11 platforms
-     if test -n "$MOZ_X11"; then
--        AC_MSG_WARN([Cannot build gnomevfs without required libraries. Removing gnomevfs from MOZ_EXTENSIONS.])
-+        AC_MSG_WARN([Removing gnomevfs from MOZ_EXTENSIONS due to no --enable-gnomevfs.])
-     fi
-     MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gnomevfs||'`
- fi
-@@ -5983,7 +5977,7 @@ fi
- if test -z "$MOZ_ENABLE_GIO" -a `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; then
-     # Suppress warning on non-X11 platforms
-     if test -n "$MOZ_X11"; then
--        AC_MSG_WARN([Cannot build gio without required libraries. Removing gio from MOZ_EXTENSIONS.])
-+        AC_MSG_WARN([Removing gio from MOZ_EXTENSIONS due to --disable-gio.])
-     fi
-     MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gio||'`
- fi
-
-commit ddedeea
-Author: Karl Tomlinson <karlt+ at karlt.net>
-Date:   Thu Sep 27 13:47:19 2012 +1200
-
-    b=713802 link gio extension against libxul for tracemalloc stack functions r=bsmedberg
-    
-    --HG--
-    extra : transplant_source : %C8%A3o%BE%A0z%F7%C8%8A%E6%0E%D4s%7D%90%9C%D9%0F%06%7E
----
- extensions/gio/Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git mozilla/extensions/gio/Makefile.in mozilla/extensions/gio/Makefile.in
-index 46412c4..ccf2846 100644
---- mozilla/extensions/gio/Makefile.in
-+++ mozilla/extensions/gio/Makefile.in
-@@ -23,7 +23,7 @@ LOCAL_INCLUDES	= $(MOZ_GIO_CFLAGS)
- 
- EXTRA_DSO_LDOPTS = \
- 		   $(XPCOM_GLUE_LDOPTS) \
--		   $(NSPR_LIBS) \
-+		   $(MOZ_COMPONENT_LIBS) \
- 		   $(MOZ_GIO_LIBS) \
- 		   $(NULL)
- 

Modified: trunk/www/seamonkey/files/patch-bug722975
==============================================================================
--- trunk/www/seamonkey/files/patch-bug722975	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/seamonkey/files/patch-bug722975	Mon Dec  3 18:03:03 2012	(r1110)
@@ -7,13 +7,13 @@
 diff --git a/mozilla/gfx/thebes/gfxPlatform.cpp b/mozilla/gfx/thebes/gfxPlatform.cpp
 --- mozilla/gfx/thebes/gfxPlatform.cpp
 +++ mozilla/gfx/thebes/gfxPlatform.cpp
-@@ -484,21 +484,19 @@ gfxPlatform::CreateDrawTargetForSurface(
+@@ -502,21 +502,19 @@ struct SourceSurfaceUserData
+   BackendType mBackendType;
+ };
  
- cairo_user_data_key_t kSourceSurface;
- 
- void SourceBufferDestroy(void *srcBuffer)
+ void SourceBufferDestroy(void *srcSurfUD)
  {
-   static_cast<SourceSurface*>(srcBuffer)->Release();
+   delete static_cast<SourceSurfaceUserData*>(srcSurfUD);
  }
  
 -void SourceSnapshotDetached(cairo_surface_t *nullSurf)
@@ -31,7 +31,7 @@
  {
    void *userData = aSurface->GetData(&kSourceSurface);
  
-@@ -588,24 +586,19 @@ gfxPlatform::GetSourceSurfaceForSurface(
+@@ -621,24 +619,19 @@ gfxPlatform::GetSourceSurfaceForSurface(
        }
  
        srcBuffer = Factory::CreateWrappingDataSourceSurface(imgSurface->Data(),
@@ -53,9 +53,9 @@
 +                                SourceSnapshotDetached, imgSurface.get());
    }
  
-   srcBuffer->AddRef();
-   aSurface->SetData(&kSourceSurface, srcBuffer, SourceBufferDestroy);
+   SourceSurfaceUserData *srcSurfUD = new SourceSurfaceUserData;
+   srcSurfUD->mBackendType = aTarget->GetType();
+   srcSurfUD->mSrcSurface = srcBuffer;
+   aSurface->SetData(&kSourceSurface, srcSurfUD, SourceBufferDestroy);
  
    return srcBuffer;
- }
- 

Deleted: trunk/www/seamonkey/files/patch-bug753046
==============================================================================
--- trunk/www/seamonkey/files/patch-bug753046	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,1213 +0,0 @@
-# Bug 753046 - Add support for DragonFly/NetBSD
-
-$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.cpp,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/dom/plugins/ipc/PluginModuleChild.cpp.orig	2011-12-20 23:28:14.000000000 +0000
-+++ mozilla/dom/plugins/ipc/PluginModuleChild.cpp
-@@ -5,6 +5,7 @@
-  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
- 
- #ifdef MOZ_WIDGET_QT
-+#include <unistd.h> // for _exit()
- #include <QtCore/QTimer>
- #include "nsQAppInstance.h"
- #include "NestedLoopTimer.h"
-@@ -228,7 +228,7 @@ PluginModuleChild::Init(const std::strin
- 
-     // TODO: use PluginPRLibrary here
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     mShutdownFunc =
-         (NP_PLUGINSHUTDOWN) PR_FindFunctionSymbol(mLibrary, "NP_Shutdown");
- 
-@@ -1790,7 +1790,7 @@ PluginModuleChild::AnswerNP_GetEntryPoin
-     PLUGIN_LOG_DEBUG_METHOD;
-     AssertPluginThread();
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     return true;
- #elif defined(OS_WIN) || defined(OS_MACOSX)
-     *_retval = mGetEntryPointsFunc(&mFunctions);
-@@ -1823,7 +1823,7 @@ PluginModuleChild::AnswerNP_Initialize(N
-     SendBackUpXResources(FileDescriptor(xSocketFd, false/*don't close*/));
- #endif
- 
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     *_retval = mInitializeFunc(&sBrowserFuncs, &mFunctions);
-     return true;
- #elif defined(OS_WIN) || defined(OS_MACOSX)
-$NetBSD: patch-dom_plugins_ipc_PluginModuleChild.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/dom/plugins/ipc/PluginModuleChild.h.orig	2011-12-20 23:28:14.000000000 +0000
-+++ mozilla/dom/plugins/ipc/PluginModuleChild.h
-@@ -340,7 +340,7 @@ private:
- 
-     // we get this from the plugin
-     NP_PLUGINSHUTDOWN mShutdownFunc;
--#ifdef OS_LINUX
-+#if defined(OS_LINUX) || defined(OS_BSD)
-     NP_PLUGINUNIXINIT mInitializeFunc;
- #elif defined(OS_WIN) || defined(OS_MACOSX)
-     NP_PLUGININIT mInitializeFunc;
-$NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/Makefile.in.orig	2012-02-16 06:40:33.000000000 +0000
-+++ mozilla/ipc/chromium/Makefile.in
-@@ -278,6 +278,33 @@ endif
- 
- endif # } OS_LINUX
- 
-+ifdef OS_BSD # {
-+
-+CPPSRCS += \
-+  atomicops_internals_x86_gcc.cc \
-+  process_util_bsd.cc \
-+  time_posix.cc \
-+  $(NULL)
-+
-+ifdef MOZ_ENABLE_GTK2
-+CPPSRCS += \
-+  message_pump_glib.cc \
-+  $(NULL)
-+endif
-+
-+ifdef MOZ_ENABLE_QT
-+MOCSRCS = \
-+  moc_message_pump_qt.cc \
-+  $(NULL)
-+
-+CPPSRCS += \
-+  $(MOCSRCS) \
-+  message_pump_qt.cc \
-+  $(NULL)
-+endif
-+
-+endif # } OS_BSD
-+
- # libevent
- 
- ifndef MOZ_NATIVE_LIBEVENT # {
-$NetBSD: patch-ipc_chromium_chromium-config.mk,v 1.2 2012/03/15 08:30:06 ryoon Exp $
-
---- mozilla/ipc/chromium/chromium-config.mk.orig	2012-02-16 07:40:33.000000000 +0100
-+++ mozilla/ipc/chromium/chromium-config.mk	2012-03-11 11:05:40.397182000 +0100
-@@ -56,17 +56,6 @@
-   -I$(DEPTH)/ipc/ipdl/_ipdlheaders \
-   $(NULL)
- 
--ifeq ($(OS_ARCH),Darwin) # {
--
--OS_MACOSX = 1
--OS_POSIX = 1
--
--DEFINES += \
--  -DOS_MACOSX=1 \
--  -DOS_POSIX=1 \
--  $(NULL)
--
--else # } {
- ifeq ($(OS_ARCH),WINNT) # {
- OS_LIBS += $(call EXPAND_LIBNAME,psapi shell32 dbghelp)
- 
-@@ -93,13 +82,65 @@
- endif
- 
- else # } {
--
--OS_LINUX = 1
- OS_POSIX = 1
-+DEFINES += -DOS_POSIX=1
-+
-+ifeq ($(OS_ARCH),Darwin) # {
-+
-+OS_MACOSX = 1
-+DEFINES += \
-+  -DOS_MACOSX=1 \
-+  $(NULL)
-+
-+else # } {
-+ifeq ($(OS_ARCH),DragonFly) # {
-+
-+OS_DRAGONFLY = 1
-+OS_BSD = 1
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+DEFINES += \
-+  -DOS_DRAGONFLY=1 \
-+  -DOS_BSD=1 \
-+  $(NULL)
-+
-+else # } {
-+ifeq ($(OS_ARCH),FreeBSD) # {
-+
-+OS_FREEBSD = 1
-+OS_BSD = 1
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+DEFINES += \
-+  -DOS_FREEBSD=1 \
-+  -DOS_BSD=1 \
-+  $(NULL)
- 
-+else # } {
-+ifeq ($(OS_ARCH),NetBSD) # {
-+
-+OS_NETBSD = 1
-+OS_BSD = 1
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+DEFINES += \
-+  -DOS_NETBSD=1 \
-+  -DOS_BSD=1 \
-+  $(NULL)
-+
-+else # } {
-+ifeq ($(OS_ARCH),OpenBSD) # {
-+
-+OS_OPENBSD = 1
-+OS_BSD = 1
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+DEFINES += \
-+  -DOS_OPENBSD=1 \
-+  -DOS_BSD=1 \
-+  $(NULL)
-+
-+else # } {
-+
-+OS_LINUX = 1
- DEFINES += \
-   -DOS_LINUX=1 \
--  -DOS_POSIX=1 \
-   $(NULL)
- 
- # NB: to stop gcc warnings about exporting template instantiation
-@@ -107,4 +147,8 @@
- 
- endif # }
- endif # }
-+endif # }
-+endif # }
-+endif # }
-+endif # }
- 
-$NetBSD: patch-ipc_chromium_src_base_base__paths.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/base_paths.h.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/base_paths.h
-@@ -13,7 +13,7 @@
- #include "base/base_paths_win.h"
- #elif defined(OS_MACOSX)
- #include "base/base_paths_mac.h"
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
- #include "base/base_paths_linux.h"
- #endif
- #include "base/path_service.h"
-$NetBSD: patch-ipc_chromium_src_base_debug__util__posic.cc,v 1.3 2012/04/01 15:18:45 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/debug_util_posix.cc.orig	2012-03-13 01:36:53.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/debug_util_posix.cc
-@@ -5,7 +5,7 @@
- #include "build/build_config.h"
- #include "base/debug_util.h"
- 
--#define MOZ_HAVE_EXECINFO_H (!defined(ANDROID) && !defined(__OpenBSD__))
-+#define MOZ_HAVE_EXECINFO_H (defined(OS_LINUX) && !defined(ANDROID))
- 
- #include <errno.h>
- #include <fcntl.h>
-@@ -17,9 +17,16 @@
- #include <unistd.h>
- #if MOZ_HAVE_EXECINFO_H
- #include <execinfo.h>
-+#endif
-+
-+#if defined(OS_MACOSX) || defined(OS_BSD)
- #include <sys/sysctl.h>
- #endif
- 
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
-+#include <sys/user.h>
-+#endif
-+
- #include "base/basictypes.h"
- #include "base/eintr_wrapper.h"
- #include "base/logging.h"
-@@ -32,7 +37,7 @@ bool DebugUtil::SpawnDebuggerOnProcess(u
-   return false;
- }
- 
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_BSD)
- 
- // Based on Apple's recommended method as described in
- // http://developer.apple.com/qa/qa2004/qa1361.html
-@@ -71,7 +76,15 @@ bool DebugUtil::BeingDebugged() {
- 
-   // This process is being debugged if the P_TRACED flag is set.
-   is_set = true;
-+#if defined(OS_DRAGONFLY)
-+  being_debugged = (info.kp_flags & P_TRACED) != 0;
-+#elif defined(OS_FREEBSD)
-+  being_debugged = (info.ki_flag & P_TRACED) != 0;
-+#elif defined(OS_OPENBSD)
-+  being_debugged = (info.p_flag & P_TRACED) != 0;
-+#else
-   being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0;
-+#endif
-   return being_debugged;
- }
- 
-diff --git ipc/chromium/src/base/dir_reader_bsd.h ipc/chromium/src/base/dir_reader_bsd.h
-new file mode 100644
-index 0000000..3fc1a87
---- /dev/null
-+++ mozilla/ipc/chromium/src/base/dir_reader_bsd.h
-@@ -0,0 +1,112 @@
-+// Copyright (c) 2010 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.
-+
-+// derived from dir_reader_linux.h
-+
-+#ifndef BASE_DIR_READER_BSD_H_
-+#define BASE_DIR_READER_BSD_H_
-+#pragma once
-+
-+#include <dirent.h>
-+#include <errno.h>
-+#include <fcntl.h>
-+#include <stdint.h>
-+#include <unistd.h>
-+
-+#include "base/logging.h"
-+#include "base/eintr_wrapper.h"
-+
-+// See the comments in dir_reader_posix.h about this.
-+
-+namespace base {
-+
-+class DirReaderBSD {
-+ public:
-+  explicit DirReaderBSD(const char* directory_path)
-+#ifdef O_DIRECTORY
-+      : fd_(open(directory_path, O_RDONLY | O_DIRECTORY)),
-+#else
-+      : fd_(open(directory_path, O_RDONLY)),
-+#endif
-+        offset_(0),
-+        size_(0) {
-+    memset(buf_, 0, sizeof(buf_));
-+  }
-+
-+  ~DirReaderBSD() {
-+    if (fd_ >= 0) {
-+      if (HANDLE_EINTR(close(fd_)))
-+        DLOG(ERROR) << "Failed to close directory handle";
-+    }
-+  }
-+
-+  bool IsValid() const {
-+    return fd_ >= 0;
-+  }
-+
-+  // Move to the next entry returning false if the iteration is complete.
-+  bool Next() {
-+    if (size_) {
-+      struct dirent* dirent = reinterpret_cast<struct dirent*>(&buf_[offset_]);
-+#ifdef OS_DRAGONFLY
-+      offset_ += _DIRENT_DIRSIZ(dirent);
-+#else
-+      offset_ += dirent->d_reclen;
-+#endif
-+    }
-+
-+    if (offset_ != size_)
-+      return true;
-+
-+#ifdef OS_OPENBSD
-+    const int r = getdirentries(fd_, buf_, sizeof(buf_), basep_);
-+#else
-+    const int r = getdents(fd_, buf_, sizeof(buf_));
-+#endif
-+    if (r == 0)
-+      return false;
-+    if (r == -1) {
-+#ifdef OS_OPENBSD
-+      DLOG(ERROR) << "getdirentries returned an error: " << errno;
-+#else
-+      DLOG(ERROR) << "getdents returned an error: " << errno;
-+#endif
-+      return false;
-+    }
-+    size_ = r;
-+    offset_ = 0;
-+    return true;
-+  }
-+
-+  const char* name() const {
-+    if (!size_)
-+      return NULL;
-+
-+    const struct dirent* dirent =
-+        reinterpret_cast<const struct dirent*>(&buf_[offset_]);
-+    return dirent->d_name;
-+  }
-+
-+  int fd() const {
-+    return fd_;
-+  }
-+
-+  static bool IsFallback() {
-+    return false;
-+  }
-+
-+ private:
-+  const int fd_;
-+  char buf_[512];
-+#ifdef OS_OPENBSD
-+  off_t *basep_;
-+#endif
-+  size_t offset_, size_;
-+
-+  DISALLOW_COPY_AND_ASSIGN(DirReaderBSD);
-+};
-+
-+}  // namespace base
-+
-+#endif // BASE_DIR_READER_BSD_H_
-diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_reader_posix.h
-index 9a34492..62b280c 100644
---- mozilla/ipc/chromium/src/base/dir_reader_posix.h
-+++ mozilla/ipc/chromium/src/base/dir_reader_posix.h
-@@ -18,16 +18,20 @@
- // seems worse than falling back to enumerating all file descriptors so we will
- // probably never implement this on the Mac.
- 
--#if defined(OS_LINUX) && !defined(OS_OPENBSD)
-+#if defined(OS_LINUX)
- #include "base/dir_reader_linux.h"
-+#elif defined(OS_BSD)
-+#include "base/dir_reader_bsd.h"
- #else
- #include "base/dir_reader_fallback.h"
- #endif
- 
- namespace base {
- 
--#if defined(OS_LINUX) && !defined(OS_OPENBSD)
-+#if defined(OS_LINUX)
- typedef DirReaderLinux DirReaderPosix;
-+#elif defined(OS_BSD)
-+typedef DirReaderBSD DirReaderPosix;
- #else
- typedef DirReaderFallback DirReaderPosix;
- #endif
-$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/file_util_posix.cc.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/file_util_posix.cc
-@@ -31,7 +31,7 @@
- #include "base/time.h"
- 
- // FreeBSD/OpenBSD lacks stat64, but its stat handles files >2GB just fine
--#if defined(OS_FREEBSD) || defined(OS_OPENBSD)
-+#ifndef HAVE_STAT64
- #define stat64 stat
- #endif
- 
-$NetBSD: patch-ipc_chromium_src_base_message__loop.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/message_loop.cc.orig	2012-02-16 07:40:33.000000000 +0100
-+++ mozilla/ipc/chromium/src/base/message_loop.cc	2012-02-21 21:24:41.000000000 +0100
-@@ -19,7 +19,7 @@
- #if defined(OS_POSIX)
- #include "base/message_pump_libevent.h"
- #endif
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_BSD)
- #ifdef MOZ_WIDGET_GTK2
- #include "base/message_pump_glib.h"
- #endif
-@@ -119,7 +119,7 @@
-   if (type_ == TYPE_UI) {
- #if defined(OS_MACOSX)
-     pump_ = base::MessagePumpMac::Create();
--#elif defined(OS_LINUX)
-+#elif defined(OS_LINUX) || defined(OS_BSD)
-     pump_ = new base::MessagePumpForUI();
- #endif  // OS_LINUX
-   } else if (type_ == TYPE_IO) {
-$NetBSD: patch-ipc_chromium_src_base_platform__thread.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/platform_thread.h.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/platform_thread.h
-@@ -22,9 +22,12 @@ typedef void* PlatformThreadHandle;  // HANDLE
- #elif defined(OS_POSIX)
- #include <pthread.h>
- typedef pthread_t PlatformThreadHandle;
--#if defined(OS_LINUX)
-+#if defined(OS_LINUX) || defined(OS_OPENBSD)
- #include <unistd.h>
- typedef pid_t PlatformThreadId;
-+#elif defined(OS_BSD)
-+#include <sys/types.h>
-+typedef lwpid_t PlatformThreadId;
- #elif defined(OS_MACOSX)
- #include <mach/mach.h>
- typedef mach_port_t PlatformThreadId;
-$NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/platform_thread_posix.cc.orig	2012-03-13 01:36:53.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc
-@@ -9,16 +9,30 @@
- 
- #if defined(OS_MACOSX)
- #include <mach/mach.h>
-+#elif defined(OS_NETBSD)
-+#include <lwp.h>
- #elif defined(OS_LINUX)
- #include <sys/syscall.h>
--#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
- #include <sys/prctl.h>
--#elif !defined(__NetBSD__)
--#include <pthread_np.h>
-+#elif defined(OS_FREEBSD)
-+#include <sys/param.h>
-+#if __FreeBSD_version > 802500
-+#include <sys/thr.h>
-+#else
-+_Pragma("GCC visibility push(default)")
-+extern "C" int thr_self(long *);
-+_Pragma("GCC visibility pop")
-+#endif
- #endif
-+
-+#if !defined(OS_MACOSX)
- #include <unistd.h>
- #endif
- 
-+#if defined(OS_BSD) && !defined(OS_NETBSD)
-+#include <pthread_np.h>
-+#endif
-+
- #if defined(OS_MACOSX)
- namespace base {
- void InitThreading();
-@@ -38,9 +45,20 @@ PlatformThreadId PlatformThread::CurrentId() {
-   // into the kernel.
- #if defined(OS_MACOSX)
-   return mach_thread_self();
--#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
-+#elif defined(OS_NETBSD)
-+  return _lwp_self();
-+#elif defined(OS_DRAGONFLY)
-+  return lwp_gettid();
-+#elif defined(OS_FREEBSD)
-+#  if __FreeBSD_version > 900030
-+    return pthread_getthreadid_np();
-+#  else
-+    long lwpid;
-+    thr_self(&lwpid);
-+    return lwpid;
-+#  endif
-+#elif defined(OS_OPENBSD)
--  // TODO(BSD): find a better thread ID
--  return (intptr_t)(pthread_self());
-+  return (intptr_t) (pthread_self());
- #elif defined(OS_LINUX)
-   return syscall(__NR_gettid);
- #endif
-@@ -102,9 +102,9 @@ void PlatformThread::SetName(const char* name) {
-   // Note that glibc also has a 'pthread_setname_np' api, but it may not be
-   // available everywhere and it's only benefit over using prctl directly is
-   // that it can set the name of threads other than the current thread.
--#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
-+#if defined(OS_BSD) && !defined(OS_NETBSD)
-   pthread_set_name_np(pthread_self(), name);
--#elif defined(__NetBSD__)
-+#elif defined(OS_NETBSD)
-   pthread_setname_np(pthread_self(), "%s", (void *)name);
- #else
-   prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0); 
-$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/process_util.h.orig	2011-12-21 00:28:19.000000000 +0100
-+++ mozilla/ipc/chromium/src/base/process_util.h	2012-01-31 13:14:54.000000000 +0100
-@@ -280,6 +280,7 @@ class NamedProcessIterator {
-   const ProcessEntry* NextProcessEntry();
- 
-  private:
-+#if !defined(OS_BSD)
-   // Determines whether there's another process (regardless of executable)
-   // left in the list of all processes.  Returns true and sets entry_ to
-   // that process's info if there is one, false otherwise.
-@@ -292,18 +292,24 @@
-   void InitProcessEntry(ProcessEntry* entry);
- 
-   std::wstring executable_name_;
-+#endif
- 
- #if defined(OS_WIN)
-   HANDLE snapshot_;
-   bool started_iteration_;
- #elif defined(OS_LINUX)
-   DIR *procfs_dir_;
-+#elif defined(OS_BSD)
-+  std::vector<ProcessEntry> content;
-+  size_t nextEntry;
- #elif defined(OS_MACOSX)
-   std::vector<kinfo_proc> kinfo_procs_;
-   size_t index_of_kinfo_proc_;
- #endif
-+#if !defined(OS_BSD)
-   ProcessEntry entry_;
-   const ProcessFilter* filter_;
-+#endif
- 
-   DISALLOW_EVIL_CONSTRUCTORS(NamedProcessIterator);
- };
-$NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:18:45 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/process_util_bsd.cc.orig	2012-04-01 00:04:28.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/process_util_bsd.cc
-@@ -0,0 +1,367 @@
-+// 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.
-+
-+// derived from process_util_linux.cc and process_util_mac.cc
-+
-+#include "base/process_util.h"
-+
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#include <sys/wait.h>
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
-+#include <sys/user.h>
-+#endif
-+
-+#include <ctype.h>
-+#include <fcntl.h>
-+#include <kvm.h>
-+#include <unistd.h>
-+
-+#include <string>
-+
-+#include "base/debug_util.h"
-+#include "base/eintr_wrapper.h"
-+#include "base/file_util.h"
-+#include "base/logging.h"
-+#include "base/string_tokenizer.h"
-+#include "base/string_util.h"
-+
-+#if (defined(_POSIX_SPAWN) && _POSIX_SPAWN > 0) \
-+  || (defined(OS_NETBSD) && __NetBSD_Version__ >= 599006500)
-+#define HAVE_POSIX_SPAWN	1
-+#endif
-+
-+/*
-+ * On platforms that are not gonk based, we fall back to an arbitrary
-+ * UID. This is generally the UID for user `nobody', albeit it is not
-+ * always the case.
-+ */
-+
-+#if defined(OS_NETBSD) || defined(OS_OPENBSD)
-+# define CHILD_UNPRIVILEGED_UID 32767
-+# define CHILD_UNPRIVILEGED_GID 32767
-+#else
-+# define CHILD_UNPRIVILEGED_UID 65534
-+# define CHILD_UNPRIVILEGED_GID 65534
-+#endif
-+
-+#ifndef __dso_public
-+# ifdef __exported
-+#  define __dso_public	__exported
-+# else
-+#  define __dso_public	__attribute__((__visibility__("default")))
-+# endif
-+#endif
-+
-+#ifdef HAVE_POSIX_SPAWN
-+#include <spawn.h>
-+extern "C" char **environ __dso_public;
-+#endif
-+
-+namespace {
-+
-+enum ParsingState {
-+  KEY_NAME,
-+  KEY_VALUE
-+};
-+
-+static mozilla::EnvironmentLog gProcessLog("MOZ_PROCESS_LOG");
-+
-+}  // namespace
-+
-+namespace base {
-+
-+#ifdef HAVE_POSIX_SPAWN
-+
-+void FreeEnvVarsArray(char* array[], int length)
-+{
-+  for (int i = 0; i < length; i++) {
-+    free(array[i]);
-+  }
-+  delete[] array;
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+               const file_handle_mapping_vector& fds_to_remap,
-+               bool wait, ProcessHandle* process_handle) {
-+  return LaunchApp(argv, fds_to_remap, environment_map(),
-+                   wait, process_handle);
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+               const file_handle_mapping_vector& fds_to_remap,
-+               const environment_map& env_vars_to_set,
-+               bool wait, ProcessHandle* process_handle,
-+               ProcessArchitecture arch) {
-+  return LaunchApp(argv, fds_to_remap, env_vars_to_set,
-+                   SAME_PRIVILEGES_AS_PARENT,
-+                   wait, process_handle);
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+               const file_handle_mapping_vector& fds_to_remap,
-+               const environment_map& env_vars_to_set,
-+               ChildPrivileges privs,
-+               bool wait, ProcessHandle* process_handle,
-+               ProcessArchitecture arch) {
-+  bool retval = true;
-+
-+  char* argv_copy[argv.size() + 1];
-+  for (size_t i = 0; i < argv.size(); i++) {
-+    argv_copy[i] = const_cast<char*>(argv[i].c_str());
-+  }
-+  argv_copy[argv.size()] = NULL;
-+
-+  // Make sure we don't leak any FDs to the child process by marking all FDs
-+  // as close-on-exec.
-+  SetAllFDsToCloseOnExec();
-+
-+  // Copy environment to a new char array and add the variables
-+  // in env_vars_to_set.
-+  // Existing variables are overwritten by env_vars_to_set.
-+  int pos = 0;
-+  environment_map combined_env_vars = env_vars_to_set;
-+  while(environ[pos] != NULL) {
-+    std::string varString = environ[pos];
-+    std::string varName = varString.substr(0, varString.find_first_of('='));
-+    std::string varValue = varString.substr(varString.find_first_of('=') + 1);
-+    if (combined_env_vars.find(varName) == combined_env_vars.end()) {
-+      combined_env_vars[varName] = varValue;
-+    }
-+    pos++;
-+  }
-+  int varsLen = combined_env_vars.size() + 1;
-+
-+  char** vars = new char*[varsLen];
-+  int i = 0;
-+  for (environment_map::const_iterator it = combined_env_vars.begin();
-+       it != combined_env_vars.end(); ++it) {
-+    std::string entry(it->first);
-+    entry += "=";
-+    entry += it->second;
-+    vars[i] = strdup(entry.c_str());
-+    i++;
-+  }
-+  vars[i] = NULL;
-+
-+  posix_spawn_file_actions_t file_actions;
-+  if (posix_spawn_file_actions_init(&file_actions) != 0) {
-+    FreeEnvVarsArray(vars, varsLen);
-+    return false;
-+  }
-+
-+  // Turn fds_to_remap array into a set of dup2 calls.
-+  for (file_handle_mapping_vector::const_iterator it = fds_to_remap.begin();
-+       it != fds_to_remap.end();
-+       ++it) {
-+    int src_fd = it->first;
-+    int dest_fd = it->second;
-+
-+    if (src_fd == dest_fd) {
-+      int flags = fcntl(src_fd, F_GETFD);
-+      if (flags != -1) {
-+        fcntl(src_fd, F_SETFD, flags & ~FD_CLOEXEC);
-+      }
-+    } else {
-+      if (posix_spawn_file_actions_adddup2(&file_actions, src_fd, dest_fd) != 0) {
-+        posix_spawn_file_actions_destroy(&file_actions);
-+        FreeEnvVarsArray(vars, varsLen);
-+        return false;
-+      }
-+    }
-+  }
-+
-+  pid_t pid = 0;
-+  int spawn_succeeded = (posix_spawnp(&pid,
-+                                      argv_copy[0],
-+                                      &file_actions,
-+                                      NULL,
-+                                      argv_copy,
-+                                      vars) == 0);
-+
-+  FreeEnvVarsArray(vars, varsLen);
-+
-+  posix_spawn_file_actions_destroy(&file_actions);
-+
-+  bool process_handle_valid = pid > 0;
-+  if (!spawn_succeeded || !process_handle_valid) {
-+    retval = false;
-+  } else {
-+    if (wait)
-+      HANDLE_EINTR(waitpid(pid, 0, 0));
-+
-+    if (process_handle)
-+      *process_handle = pid;
-+  }
-+
-+  return retval;
-+}
-+
-+bool LaunchApp(const CommandLine& cl,
-+               bool wait, bool start_hidden, ProcessHandle* process_handle) {
-+  // TODO(playmobil): Do we need to respect the start_hidden flag?
-+  file_handle_mapping_vector no_files;
-+  return LaunchApp(cl.argv(), no_files, wait, process_handle);
-+}
-+
-+#else // no posix_spawn, use fork/exec
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+               const file_handle_mapping_vector& fds_to_remap,
-+               bool wait, ProcessHandle* process_handle) {
-+  return LaunchApp(argv, fds_to_remap, environment_map(),
-+                   wait, process_handle);
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+               const file_handle_mapping_vector& fds_to_remap,
-+               const environment_map& env_vars_to_set,
-+               bool wait, ProcessHandle* process_handle,
-+               ProcessArchitecture arch) {
-+  return LaunchApp(argv, fds_to_remap, env_vars_to_set,
-+                   SAME_PRIVILEGES_AS_PARENT,
-+                   wait, process_handle);
-+}
-+
-+bool LaunchApp(const std::vector<std::string>& argv,
-+               const file_handle_mapping_vector& fds_to_remap,
-+               const environment_map& env_vars_to_set,
-+               ChildPrivileges privs,
-+               bool wait, ProcessHandle* process_handle,
-+               ProcessArchitecture arch) {
-+  scoped_array<char*> argv_cstr(new char*[argv.size() + 1]);
-+  // Illegal to allocate memory after fork and before execvp
-+  InjectiveMultimap fd_shuffle1, fd_shuffle2;
-+  fd_shuffle1.reserve(fds_to_remap.size());
-+  fd_shuffle2.reserve(fds_to_remap.size());
-+
-+  pid_t pid = fork();
-+  if (pid < 0)
-+    return false;
-+
-+  if (pid == 0) {
-+    for (file_handle_mapping_vector::const_iterator
-+        it = fds_to_remap.begin(); it != fds_to_remap.end(); ++it) {
-+      fd_shuffle1.push_back(InjectionArc(it->first, it->second, false));
-+      fd_shuffle2.push_back(InjectionArc(it->first, it->second, false));
-+    }
-+
-+    if (!ShuffleFileDescriptors(&fd_shuffle1))
-+      _exit(127);
-+
-+    CloseSuperfluousFds(fd_shuffle2);
-+
-+    for (size_t i = 0; i < argv.size(); i++)
-+      argv_cstr[i] = const_cast<char*>(argv[i].c_str());
-+    argv_cstr[argv.size()] = NULL;
-+
-+    if (privs == UNPRIVILEGED) {
-+      if (setgid(CHILD_UNPRIVILEGED_GID) != 0) {
-+        DLOG(ERROR) << "FAILED TO setgid() CHILD PROCESS, path: " << argv_cstr[0];
-+        _exit(127);
-+      }
-+      if (setuid(CHILD_UNPRIVILEGED_UID) != 0) {
-+        DLOG(ERROR) << "FAILED TO setuid() CHILD PROCESS, path: " << argv_cstr[0];
-+        _exit(127);
-+      }
-+      if (chdir("/") != 0)
-+        gProcessLog.print("==> could not chdir()\n");
-+    }
-+
-+    for (environment_map::const_iterator it = env_vars_to_set.begin();
-+         it != env_vars_to_set.end(); ++it) {
-+      if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/))
-+        _exit(127);
-+    }
-+    execv(argv_cstr[0], argv_cstr.get());
-+    // if we get here, we're in serious trouble and should complain loudly
-+    DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0];
-+    _exit(127);
-+  } else {
-+    gProcessLog.print("==> process %d launched child process %d\n",
-+                      GetCurrentProcId(), pid);
-+    if (wait)
-+      HANDLE_EINTR(waitpid(pid, 0, 0));
-+
-+    if (process_handle)
-+      *process_handle = pid;
-+  }
-+
-+  return true;
-+}
-+
-+bool LaunchApp(const CommandLine& cl,
-+               bool wait, bool start_hidden,
-+               ProcessHandle* process_handle) {
-+  file_handle_mapping_vector no_files;
-+  return LaunchApp(cl.argv(), no_files, wait, process_handle);
-+}
-+
-+#endif
-+
-+NamedProcessIterator::NamedProcessIterator(const std::wstring& executable_name,
-+                                           const ProcessFilter* filter)
-+{
-+  int numEntries;
-+  kvm_t *kvm;
-+  std::string exe(WideToASCII(executable_name));
-+
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)
-+  kvm  = kvm_open(NULL, NULL, NULL, O_RDONLY, NULL);
-+  struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), &numEntries);
-+  if (procs != NULL && numEntries > 0) {
-+    for (int i = 0; i < numEntries; i++) {
-+#  if defined(OS_DRAGONFLY)
-+    if (exe != procs[i].kp_comm) continue;
-+      if (filter && !filter->Includes(procs[i].kp_pid, procs[i].kp_ppid)) continue;
-+      ProcessEntry e;
-+      e.pid = procs[i].kp_pid;
-+      e.ppid = procs[i].kp_ppid;
-+      strlcpy(e.szExeFile, procs[i].kp_comm, sizeof e.szExeFile);
-+      content.push_back(e);
-+#  elif defined(OS_FREEBSD)
-+    if (exe != procs[i].ki_comm) continue;
-+      if (filter && !filter->Includes(procs[i].ki_pid, procs[i].ki_ppid)) continue;
-+      ProcessEntry e;
-+      e.pid = procs[i].ki_pid;
-+      e.ppid = procs[i].ki_ppid;
-+      strlcpy(e.szExeFile, procs[i].ki_comm, sizeof e.szExeFile);
-+      content.push_back(e);
-+#  endif
-+#else
-+  kvm  = kvm_open(NULL, NULL, NULL, KVM_NO_FILES, NULL);
-+#if defined(OS_OPENBSD)
-+  struct kinfo_proc* procs = kvm_getprocs(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc), &numEntries);
-+#else
-+  struct kinfo_proc2* procs = kvm_getproc2(kvm, KERN_PROC_UID, getuid(), sizeof(struct kinfo_proc2), &numEntries);
-+#endif
-+  if (procs != NULL && numEntries > 0) {
-+    for (int i = 0; i < numEntries; i++) {
-+    if (exe != procs[i].p_comm) continue;
-+      if (filter && !filter->Includes(procs[i].p_pid, procs[i].p_ppid)) continue;
-+      ProcessEntry e;
-+      e.pid = procs[i].p_pid;
-+      e.ppid = procs[i].p_ppid;
-+      strlcpy(e.szExeFile, procs[i].p_comm, sizeof e.szExeFile);
-+      content.push_back(e);
-+#endif
-+    }
-+  }
-+  nextEntry = 0;
-+  kvm_close(kvm);
-+}
-+
-+NamedProcessIterator::~NamedProcessIterator() {
-+}
-+
-+const ProcessEntry* NamedProcessIterator::NextProcessEntry() {
-+  if (nextEntry >= content.size()) return NULL;
-+  return &content[nextEntry++];
-+}
-+
-+bool ProcessMetrics::GetIOCounters(IoCounters* io_counters) const {
-+  return false;
-+}
-+
-+}  // namespace base
-$NetBSD: patch-ipc_chromium_src_base_process__util__posix.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/base/process_util_posix.cc.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/process_util_posix.cc
-@@ -116,6 +116,11 @@ void CloseSuperfluousFds(const base::Inj
- #elif defined(OS_MACOSX)
-   static const rlim_t kSystemDefaultMaxFds = 256;
-   static const char kFDDir[] = "/dev/fd";
-+#elif defined(OS_BSD)
-+  // the getrlimit below should never fail, so whatever ..
-+  static const rlim_t kSystemDefaultMaxFds = 1024;
-+  // at least /dev/fd will exist
-+  static const char kFDDir[] = "/dev/fd";
- #endif
- 
-   // Get the maximum number of FDs possible.
-@@ -199,7 +204,7 @@ void CloseSuperfluousFds(const base::Inj
- void SetAllFDsToCloseOnExec() {
- #if defined(OS_LINUX)
-   const char fd_dir[] = "/proc/self/fd";
--#elif defined(OS_MACOSX)
-+#elif defined(OS_MACOSX) || defined(OS_BSD)
-   const char fd_dir[] = "/dev/fd";
- #endif
-   ScopedDIR dir_closer(opendir(fd_dir));
-$NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:00 tnn Exp $
-
---- mozilla/ipc/chromium/src/base/sys_info_posix.cc.orig	2011-11-04 21:34:00.000000000 +0000
-+++ mozilla/ipc/chromium/src/base/sys_info_posix.cc
-@@ -18,6 +18,11 @@
- #include <mach/mach_init.h>
- #endif
- 
-+#if defined(OS_NETBSD)
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#endif
-+
- #include "base/logging.h"
- #include "base/string_util.h"
- 
-@@ -26,7 +31,11 @@ namespace base {
- int SysInfo::NumberOfProcessors() {
-   // It seems that sysconf returns the number of "logical" processors on both
-   // mac and linux.  So we get the number of "online logical" processors.
-+#ifdef _SC_NPROCESSORS_ONLN
-   static long res = sysconf(_SC_NPROCESSORS_ONLN);
-+#else
-+  static long res = 1;
-+#endif
-   if (res == -1) {
-     NOTREACHED();
-     return 1;
-@@ -52,6 +61,20 @@ int64 SysInfo::AmountOfPhysicalMemory() 
-   }
- 
-   return static_cast<int64>(hostinfo.max_mem);
-+#elif defined(OS_NETBSD)
-+  int mib[2];
-+  int rc;
-+  int64_t memSize;
-+  size_t len = sizeof(memSize);
-+
-+  mib[0] = CTL_HW;
-+  mib[1] = HW_PHYSMEM64;
-+  rc = sysctl( mib, 2, &memSize, &len, NULL, 0 );
-+  if (-1 != rc)  {
-+    return memSize;
-+  }
-+  return 0;
-+
- #else
-   long pages = sysconf(_SC_PHYS_PAGES);
-   long page_size = sysconf(_SC_PAGE_SIZE);
-diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc
-index abf2a56..48791f6 100644
---- mozilla/ipc/chromium/src/base/time_posix.cc
-+++ mozilla/ipc/chromium/src/base/time_posix.cc
-@@ -167,7 +167,7 @@ TimeTicks TimeTicks::Now() {
-   // 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(__OpenBSD__) || defined(OS_POSIX) && \
-+#elif defined(OS_OPENBSD) || defined(OS_POSIX) && \
-       defined(_POSIX_MONOTONIC_CLOCK) && _POSIX_MONOTONIC_CLOCK >= 0
- 
-   struct timespec ts;
-$NetBSD: patch-ipc_chromium_src_build_build__config.h,v 1.4 2012/04/01 15:18:45 ryoon Exp $
-
---- mozilla/ipc/chromium/src/build/build_config.h.orig	2012-03-13 01:36:53.000000000 +0000
-+++ mozilla/ipc/chromium/src/build/build_config.h
-@@ -19,6 +19,12 @@
- #define OS_MACOSX 1
- #elif defined(__linux__) || defined(ANDROID)
- #define OS_LINUX 1
-+#elif defined(__DragonFly__)
-+#define OS_DRAGONFLY 1
-+#elif defined(__FreeBSD__)
-+#define OS_FREEBSD 1
-+#elif defined(__NetBSD__)
-+#define OS_NETBSD 1
- #elif defined(__OpenBSD__)
- #define OS_OPENBSD 1
- #elif defined(_WIN32)
-@@ -27,9 +33,16 @@
- #error Please add support for your platform in build/build_config.h
- #endif
- 
-+// For access to standard BSD features, use OS_BSD instead of a
-+// more specific macro.
-+#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD)	\
-+  || defined(OS_NETBSD) || defined(OS_OPENBSD)
-+#define OS_BSD 1
-+#endif
-+
- // For access to standard POSIX features, use OS_POSIX instead of a more
- // specific macro.
--#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD)
-+#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
- #define OS_POSIX 1
- #endif
- 
-diff --git ipc/chromium/src/chrome/common/ipc_channel_posix.cc ipc/chromium/src/chrome/common/ipc_channel_posix.cc
-index bd866ee..2ea5b19 100644
---- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
-+++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
-@@ -7,6 +7,7 @@
- #include <errno.h>
- #include <fcntl.h>
- #include <stddef.h>
-+#include <unistd.h>
- #include <sys/types.h>
- #include <sys/socket.h>
- #include <sys/stat.h>
-$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__channel__posix.h,v 1.1 2011/07/11 12:46:14 tnn Exp $
-
---- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h.orig	2011-06-15 21:57:27.000000000 +0000
-+++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.h
-@@ -92,7 +92,7 @@ class Channel::ChannelImpl : public Mess
-   };
- 
-   // This is a control message buffer large enough to hold kMaxReadFDs
--#if defined(OS_MACOSX)
-+#if defined(OS_MACOSX) || defined(OS_NETBSD)
-   // TODO(agl): OSX appears to have non-constant CMSG macros!
-   char input_cmsg_buf_[1024];
- #else
-$NetBSD: patch-ipc_chromium_src_chrome_common_ipc__message__utils.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/chrome/common/ipc_message_utils.h
-@@ -195,7 +195,7 @@
- };
- #endif
- 
--#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || (defined(OS_LINUX) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390))
-+#if !(defined(OS_MACOSX) || defined(OS_OPENBSD) || defined(OS_WIN) || ((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS)) || defined(ARCH_CPU_S390))
- // There size_t is a synonym for |unsigned long| ...
- template <>
- struct ParamTraits<size_t> {
-@@ -248,7 +248,7 @@
- };
- #endif  // defined(OS_MACOSX)
- 
--#if !(defined(OS_LINUX) && defined(ARCH_CPU_64_BITS))
-+#if !((defined(OS_BSD) || defined(OS_LINUX)) && defined(ARCH_CPU_64_BITS))
- // int64 is |long int| on 64-bit systems, uint64 is |unsigned long|
- template <>
- struct ParamTraits<int64> {
-$NetBSD: patch-ipc_chromium_src_chrome_common_transport__dib.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
-
---- mozilla/ipc/chromium/src/chrome/common/transport_dib.h.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/chromium/src/chrome/common/transport_dib.h
-@@ -7,7 +7,7 @@
- 
- #include "base/basictypes.h"
- 
--#if defined(OS_WIN) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD)
- #include "base/shared_memory.h"
- #endif
- 
-@@ -66,7 +66,7 @@ class TransportDIB {
-     uint32 sequence_num;
-   };
-   typedef HandleAndSequenceNum Id;
--#elif defined(OS_MACOSX)
-+#elif defined(OS_MACOSX) || defined(OS_BSD)
-   typedef base::SharedMemoryHandle Handle;
-   // On Mac, the inode number of the backing file is used as an id.
-   typedef base::SharedMemoryId Id;
-@@ -108,7 +108,7 @@ class TransportDIB {
- 
-  private:
-   TransportDIB();
--#if defined(OS_WIN) || defined(OS_MACOSX)
-+#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD)
-   explicit TransportDIB(base::SharedMemoryHandle dib);
-   base::SharedMemory shared_memory_;
-   uint32 sequence_num_;
-$NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoon Exp $
-
---- mozilla/ipc/glue/GeckoChildProcessHost.cpp.orig	2011-12-20 23:28:19.000000000 +0000
-+++ mozilla/ipc/glue/GeckoChildProcessHost.cpp
-@@ -430,7 +430,7 @@
-   // and passing wstrings from one config to the other is unsafe.  So
-   // we split the logic here.
- 
--#if defined(OS_LINUX) || defined(OS_MACOSX)
-+#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
-@@ -445,8 +445,8 @@
-       if (NS_SUCCEEDED(rv)) {
-         nsCString path;
-         greDir->GetNativePath(path);
--# ifdef OS_LINUX
--#  ifdef MOZ_WIDGET_ANDROID
-+# if defined(OS_LINUX) || defined(OS_BSD)
-+#  if defined(MOZ_WIDGET_ANDROID) || defined(OS_BSD)
-         path += "/lib";
- #  endif  // MOZ_WIDGET_ANDROID
-         const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH");
-@@ -557,7 +557,7 @@
-   childArgv.push_back(pidstring);
- 
- #if defined(MOZ_CRASHREPORTER)
--#  if defined(OS_LINUX)
-+#  if defined(OS_LINUX) || defined(OS_BSD)
-   int childCrashFd, childCrashRemapFd;
-   if (!CrashReporter::CreateNotificationPipeForChild(
-         &childCrashFd, &childCrashRemapFd))
-@@ -594,7 +594,7 @@
- #endif
- 
-   base::LaunchApp(childArgv, mFileMap,
--#if defined(OS_LINUX) || defined(OS_MACOSX)
-+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
-                   newEnvVars, privs,
- #endif
-                   false, &process, arch);
-diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h
-index f37998d..b05dc7b 100644
---- mozilla/ipc/glue/SharedMemorySysV.h
-+++ mozilla/ipc/glue/SharedMemorySysV.h
-@@ -8,7 +8,7 @@
- #ifndef mozilla_ipc_SharedMemorySysV_h
- #define mozilla_ipc_SharedMemorySysV_h
- 
--#if defined(OS_LINUX) && !defined(ANDROID)
-+#if (defined(OS_LINUX) && !defined(ANDROID)) || defined(OS_BSD)
- 
- // SysV shared memory isn't available on Windows, but we define the
- // following macro so that #ifdefs are clearer (compared to #ifdef
-$NetBSD: patch-mm,v 1.13 2012/06/05 18:09:21 ryoon Exp $
-
---- mozilla/toolkit/library/Makefile.in.orig	2012-05-23 18:57:09.000000000 +0000
-+++ mozilla/toolkit/library/Makefile.in
-@@ -534,6 +538,12 @@ EXTRA_DSO_LDOPTS += -lelf -ldemangle
- endif
- endif
- 
-+ifneq (,$(filter DragonFly FreeBSD NetBSD OpenBSD,$(OS_ARCH)))
-+OS_LIBS += $(call EXPAND_LIBNAME,kvm)
-+# keep `environ' unresolved, see bug 14426 for binutils
-+EXTRA_DSO_LDOPTS += -Wl,--warn-unresolved-symbols
-+endif
-+
- ifeq ($(OS_ARCH),WINNT)
- OS_LIBS += $(call EXPAND_LIBNAME,shell32 ole32 version winspool comdlg32 imm32 msimg32 shlwapi psapi ws2_32 dbghelp rasapi32 rasdlg iphlpapi uxtheme setupapi secur32 sensorsapi portabledeviceguids windowscodecs wininet)
- ifdef ACCESSIBILITY

Added: trunk/www/seamonkey/files/patch-bug783505
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/www/seamonkey/files/patch-bug783505	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,52 @@
+commit b5f97ee
+Author: Rafael Ávila de Espíndola <respindola at mozilla.com>
+Date:   Mon Aug 20 10:28:08 2012 -0400
+
+    Bug 783505 - OS X gcc builds failing. r=jorendorff.
+    This patch adds a workaround for
+    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39608
+---
+ js/src/jstypedarray.cpp | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git mozilla/js/src/jstypedarray.cpp mozilla/js/src/jstypedarray.cpp
+index 1eaeea0..1957086 100644
+--- mozilla/js/src/jstypedarray.cpp
++++ mozilla/js/src/jstypedarray.cpp
+@@ -1423,8 +1423,14 @@ class TypedArrayTemplate
+     Getter(JSContext *cx, unsigned argc, Value *vp)
+     {
+         CallArgs args = CallArgsFromVp(argc, vp);
++        // FIXME: Hack to keep us building with gcc 4.2. Remove this once we
++        // drop support for gcc 4.2. See bug 783505 for the details.
++#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 2
++        return CallNonGenericMethod(cx, IsThisClass, GetterImpl<ValueGetter>, args);
++#else
+         return CallNonGenericMethod<ThisTypeArray::IsThisClass,
+                                     ThisTypeArray::GetterImpl<ValueGetter> >(cx, args);
++#endif
+     }
+ 
+     // Define an accessor for a read-only property that invokes a native getter
+--- mozilla/build/autoconf/gcc-pr39608.m4~
++++ mozilla/build/autoconf/gcc-pr39608.m4
+@@ -31,7 +31,6 @@ AC_LANG_RESTORE
+ 
+ AC_MSG_RESULT($ac_have_gcc_pr39608)
+ if test "$ac_have_gcc_pr39608" = "yes"; then
+-   echo This compiler would fail to build firefox, plase upgrade.
+-   exit 1
++   echo This compiler may fail to build firefox, plase upgrade.
+ fi
+ ])
+--- mozilla/js/src/build/autoconf/gcc-pr39608.m4~
++++ mozilla/js/src/build/autoconf/gcc-pr39608.m4
+@@ -31,7 +31,6 @@ AC_LANG_RESTORE
+ 
+ AC_MSG_RESULT($ac_have_gcc_pr39608)
+ if test "$ac_have_gcc_pr39608" = "yes"; then
+-   echo This compiler would fail to build firefox, plase upgrade.
+-   exit 1
++   echo This compiler may fail to build firefox, plase upgrade.
+ fi
+ ])

Deleted: trunk/www/seamonkey/files/patch-bug786995
==============================================================================
--- trunk/www/seamonkey/files/patch-bug786995	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,36 +0,0 @@
-# Bug 786995 - configure should check for SSSE3 support in the whole toolchain
-
---- mozilla/configure.in.orig	2012-09-02 00:37:29.000000000 +0200
-+++ mozilla/configure.in	2012-09-02 00:38:50.000000000 +0200
-@@ -1710,15 +1710,15 @@
-     _MOZ_RTTI_FLAGS_OFF=-fno-rtti
- 
-     # Check for -mssse3 on $CC
--    AC_MSG_CHECKING([for -mssse3 option to $CC])
--    HAVE_COMPILER_FLAG_MSSSE3=
-+    AC_MSG_CHECKING([if toolchain supports -mssse3 option])
-+    HAVE_TOOLCHAIN_SUPPORT_MSSSE3=
-     _SAVE_CFLAGS=$CFLAGS
-     CFLAGS="$CFLAGS -mssse3"
--    AC_TRY_COMPILE(,,AC_MSG_RESULT([yes])
--                     [HAVE_COMPILER_FLAG_MSSSE3=1],
-+    AC_TRY_COMPILE([asm ("pmaddubsw %xmm2,%xmm3");],,AC_MSG_RESULT([yes])
-+                     [HAVE_TOOLCHAIN_SUPPORT_MSSSE3=1],
-                      AC_MSG_RESULT([no]))
-     CFLAGS=$_SAVE_CFLAGS
--    AC_SUBST(HAVE_COMPILER_FLAG_MSSSE3)
-+    AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSSE3)
- 
-     # Turn on GNU-specific warnings:
-     # -Wall - turn on a lot of warnings
---- mozilla/gfx/skia/Makefile.in.orig	2012-09-02 00:39:00.000000000 +0200
-+++ mozilla/gfx/skia/Makefile.in	2012-09-02 00:39:21.000000000 +0200
-@@ -365,7 +365,7 @@
- 	SkUtils_opts_SSE2.cpp \
- 	opts_check_SSE2.cpp \
- 	$(NULL)
--ifdef HAVE_COMPILER_FLAG_MSSSE3
-+ifdef HAVE_TOOLCHAIN_SUPPORT_MSSSE3
- DEFINES += -DSK_BUILD_SSSE3
- CPPSRCS += SkBitmapProcState_opts_SSSE3.cpp
- endif

Deleted: trunk/www/seamonkey/files/patch-bug787904
==============================================================================
--- trunk/www/seamonkey/files/patch-bug787904	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,12 +0,0 @@
---- mozilla/js/src/gc/Heap.h
-+++ mozilla/js/src/gc/Heap.h
-@@ -108,7 +108,8 @@ struct Cell
-  * Bug 692267: Move page size definition to gc/Memory.h and include it
-  *             directly once jsgc.h is no longer an installed header.
-  */
--#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9))
-+#if (defined(SOLARIS) || defined(__FreeBSD__)) && \
-+    (defined(__sparc) || defined(__sparcv9) || defined(__ia64))
- const size_t PageShift = 13;
- #else
- const size_t PageShift = 12;

Deleted: trunk/www/seamonkey/files/patch-bug788039
==============================================================================
--- trunk/www/seamonkey/files/patch-bug788039	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,48 +0,0 @@
-# Bug 788039 - With no prefix search libevent via pkg-config.
-
---- mozilla/configure.in~
-+++ mozilla/configure.in
-@@ -3854,7 +3854,7 @@ fi
- dnl system libevent Support
- dnl ========================================================
- MOZ_ARG_WITH_STRING(system-libevent,
--[  --with-system-libevent=[PFX]
-+[  --with-system-libevent[=PFX]
-                           Use system libevent [installed at prefix PFX]],
-     LIBEVENT_DIR=$withval)
- 
-@@ -3863,10 +3863,11 @@ _SAVE_LDFLAGS=$LDFLAGS
- _SAVE_LIBS=$LIBS
- if test -z "$LIBEVENT_DIR" -o "$LIBEVENT_DIR" = no; then
-     MOZ_NATIVE_LIBEVENT=
-+elif test "$LIBEVENT_DIR" = yes; then
-+    PKG_CHECK_MODULES(MOZ_LIBEVENT, libevent,
-+        MOZ_NATIVE_LIBEVENT=1,
-+        AC_MSG_ERROR([--with-system-libevent requested but libevent package not found]))
- else
--    if test "${LIBEVENT_DIR}" = "yes"; then
--        LIBEVENT_DIR=/usr
--    fi
-     CFLAGS="-I${LIBEVENT_DIR}/include $CFLAGS"
-     LDFLAGS="-L${LIBEVENT_DIR}/lib $LDFLAGS"
-     MOZ_CHECK_HEADER(event.h,
-@@ -3876,16 +3877,16 @@ else
-         AC_MSG_ERROR([--with-system-libevent requested but event.h not found]))
-     AC_CHECK_LIB(event, event_init,
-                  [MOZ_NATIVE_LIBEVENT=1
--                  MOZ_LIBEVENT_INCLUDES="${LIBEVENT_DIR}/include"
-+                  MOZ_LIBEVENT_CFLAGS="-I${LIBEVENT_DIR}/include"
-                   MOZ_LIBEVENT_LIBS="-L${LIBEVENT_DIR}/lib -levent"],
--                 [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_INCLUDES= MOZ_LIBEVENT_LIBS=])
-+                 [MOZ_NATIVE_LIBEVENT= MOZ_LIBEVENT_CFLAGS= MOZ_LIBEVENT_LIBS=])
- fi
- CFLAGS=$_SAVE_CFLAGS
- LDFLAGS=$_SAVE_LDFLAGS
- LIBS=$_SAVE_LIBS
- 
- AC_SUBST(MOZ_NATIVE_LIBEVENT)
--AC_SUBST(MOZ_LIBEVENT_INCLUDES)
-+AC_SUBST(MOZ_LIBEVENT_CFLAGS)
- AC_SUBST(MOZ_LIBEVENT_LIBS)
- 
- dnl ========================================================

Deleted: trunk/www/seamonkey/files/patch-bug788108
==============================================================================
--- trunk/www/seamonkey/files/patch-bug788108	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,20 +0,0 @@
---- mozilla/content/base/public/nsContentUtils.h~
-+++ mozilla/content/base/public/nsContentUtils.h
-@@ -18,17 +18,6 @@
- #include <ieeefp.h>
- #endif
- 
--//A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
--#ifdef __FreeBSD__
--#include <ieeefp.h>
--#if !defined(__i386__) && !defined(__x86_64__)
--static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP;
--#else
--static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML;
--#endif
--static fp_except_t oldmask = fpsetmask(~allmask);
--#endif
--
- #include "nsAString.h"
- #include "nsIStatefulFrame.h"
- #include "nsNodeInfoManager.h"

Deleted: trunk/www/seamonkey/files/patch-bug789436
==============================================================================
--- trunk/www/seamonkey/files/patch-bug789436	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,27 +0,0 @@
---- mozilla/toolkit/xre/nsAppRunner.cpp~
-+++ mozilla/toolkit/xre/nsAppRunner.cpp
-@@ -1388,11 +1388,6 @@ static int MSCRTReportHook( int aReportType, char *aMessage, int *oReturnValue)
- 
- #endif
- 
--#if defined(FREEBSD)
--// pick up fpsetmask prototype.
--#include <ieeefp.h>
--#endif
--
- static inline void
- DumpVersion()
- {
-@@ -4136,12 +4131,5 @@ SetupErrorHandling(const char* progname)
- 
-   // Unbuffer stdout, needed for tinderbox tests.
-   setbuf(stdout, 0);
--
--#if defined(FREEBSD)
--  // Disable all SIGFPE's on FreeBSD, as it has non-IEEE-conformant fp
--  // trap behavior that trips up on floating-point tests performed by
--  // the JS engine.  See bugzilla bug 9967 details.
--  fpsetmask(0);
--#endif
- }
- 

Deleted: trunk/www/seamonkey/files/patch-bug789656
==============================================================================
--- trunk/www/seamonkey/files/patch-bug789656	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,11 +0,0 @@
---- mozilla/media/libopus/Makefile.in~
-+++ mozilla/media/libopus/Makefile.in
-@@ -20,7 +20,7 @@ DEFINES += \
-   -Drestrict= \
-   $(NULL)
- 
--ifneq ($(filter $(OS_ARCH),Linux Darwin),)
-+ifneq ($(filter $(OS_ARCH),Linux Darwin DragonFly FreeBSD NetBSD OpenBSD),)
-   DEFINES += -DHAVE_LRINTF
- endif
- ifeq ($(OS_ARCH), WINNT)

Deleted: trunk/www/seamonkey/files/patch-bug789693
==============================================================================
--- trunk/www/seamonkey/files/patch-bug789693	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,109 +0,0 @@
---- mozilla/toolkit/components/startup/nsAppStartup.cpp
-+++ mozilla/toolkit/components/startup/nsAppStartup.cpp
-@@ -50,18 +50,41 @@
- #include <sys/syscall.h>
- #endif
- 
--#ifdef XP_MACOSX
-+#if defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \
-+  || defined(__NetBSD__) || defined(__OpenBSD__)
-+#include <sys/param.h>
- #include <sys/sysctl.h>
- #endif
- 
--#ifdef __OpenBSD__
--#include <sys/param.h>
--#include <sys/sysctl.h>
-+#if defined(__DragonFly__) || defined(__FreeBSD__)
-+#include <sys/user.h>
- #endif
- 
- #include "mozilla/Telemetry.h"
- #include "mozilla/StartupTimeline.h"
- 
-+#if defined(__NetBSD__)
-+#undef KERN_PROC
-+#define KERN_PROC KERN_PROC2
-+#define KINFO_PROC struct kinfo_proc2
-+#else
-+#define KINFO_PROC struct kinfo_proc
-+#endif
-+
-+#if defined(XP_MACOSX)
-+#define KP_START_SEC kp_proc.p_un.__p_starttime.tv_sec
-+#define KP_START_USEC kp_proc.p_un.__p_starttime.tv_usec
-+#elif defined(__DragonFly__)
-+#define KP_START_SEC kp_start.tv_sec
-+#define KP_START_USEC kp_start.tv_usec
-+#elif defined(__FreeBSD__)
-+#define KP_START_SEC ki_start.tv_sec
-+#define KP_START_USEC ki_start.tv_usec
-+#else
-+#define KP_START_SEC p_ustart_sec
-+#define KP_START_USEC p_ustart_usec
-+#endif
-+
- static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
- 
- #define kPrefLastSuccess "toolkit.startup.last_success"
-@@ -836,42 +859,30 @@ CalculateProcessCreationTimestamp()
- #endif
-   return timestamp;
- }
--#elif defined(XP_MACOSX)
-+#elif defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \
-+  || defined(__NetBSD__) || defined(__OpenBSD__)
- static PRTime
- CalculateProcessCreationTimestamp()
- {
--  int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid() };
--  size_t buffer_size;
--  if (sysctl(mib, 4, NULL, &buffer_size, NULL, 0))
--    return 0;
-+  int mib[] = {
-+    CTL_KERN,
-+    KERN_PROC,
-+    KERN_PROC_PID,
-+    getpid(),
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
-+    sizeof(KINFO_PROC),
-+    1,
-+#endif
-+  };
-+  u_int miblen = sizeof(mib) / sizeof(mib[0]);
- 
--  struct kinfo_proc *proc = (kinfo_proc*) malloc(buffer_size);  
--  if (sysctl(mib, 4, proc, &buffer_size, NULL, 0)) {
--    free(proc);
--    return 0;
--  }
--  PRTime starttime = static_cast<PRTime>(proc->kp_proc.p_un.__p_starttime.tv_sec) * PR_USEC_PER_SEC;
--  starttime += proc->kp_proc.p_un.__p_starttime.tv_usec;
--  free(proc);
--  return starttime;
--}
--#elif defined(__OpenBSD__)
--static PRTime
--CalculateProcessCreationTimestamp()
--{
--  int mib[6] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, getpid(), sizeof(struct kinfo_proc), 1 };
--  size_t buffer_size;
--  if (sysctl(mib, 6, NULL, &buffer_size, NULL, 0))
-+  KINFO_PROC proc;
-+  size_t buffer_size = sizeof(proc);
-+  if (sysctl(mib, miblen, &proc, &buffer_size, NULL, 0))
-     return 0;
- 
--  struct kinfo_proc *proc = (struct kinfo_proc*) malloc(buffer_size);
--  if (sysctl(mib, 6, proc, &buffer_size, NULL, 0)) {
--    free(proc);
--    return 0;
--  }
--  PRTime starttime = static_cast<PRTime>(proc->p_ustart_sec) * PR_USEC_PER_SEC;
--  starttime += proc->p_ustart_usec;
--  free(proc);
-+  PRTime starttime = static_cast<PRTime>(proc.KP_START_SEC) * PR_USEC_PER_SEC;
-+  starttime += proc.KP_START_USEC;
-   return starttime;
- }
- #else

Modified: trunk/www/seamonkey/files/patch-bug791305
==============================================================================
--- trunk/www/seamonkey/files/patch-bug791305	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/seamonkey/files/patch-bug791305	Mon Dec  3 18:03:03 2012	(r1110)
@@ -15,93 +15,383 @@
  image/decoders/nsJPEGDecoder.cpp | 311 ++-------------------------------------
  2 files changed, 20 insertions(+), 297 deletions(-)
 
+diff --git configure.in configure.in
+index f0aeb5d..1c01010 100644
+--- mozilla/configure.in
++++ mozilla/configure.in
+@@ -4027,11 +4027,7 @@ if test "$MOZ_NATIVE_JPEG" = 1; then
+                      #include <jpeglib.h> ],
+                    [ #if JPEG_LIB_VERSION < $MOZJPEG
+                      #error "Insufficient JPEG library version ($MOZJPEG required)."
+-                     #endif
+-                     #ifndef JCS_EXTENSIONS
+-                     #error "libjpeg-turbo JCS_EXTENSIONS required"
+-                     #endif
+-                     ],
++                     #endif ],
+                    MOZ_NATIVE_JPEG=1,
+                    AC_MSG_ERROR([Insufficient JPEG library version for --with-system-jpeg]))
+ fi
 diff --git mozilla/image/decoders/nsJPEGDecoder.cpp mozilla/image/decoders/nsJPEGDecoder.cpp
-index c1fb515..1d2a259 100644
+index 8fa8200..1d2a259 100644
 --- mozilla/image/decoders/nsJPEGDecoder.cpp
 +++ mozilla/image/decoders/nsJPEGDecoder.cpp
-@@ -22,6 +22,13 @@
+@@ -21,13 +21,28 @@
+ 
  extern "C" {
  #include "iccjpeg.h"
+-}
  
 +#ifdef JCS_EXTENSIONS
-+#if defined(IS_BIG_ENDIAN)
-+#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_XRGB
-+#else
-+#define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_BGRX
-+#endif
+ #if defined(IS_BIG_ENDIAN)
+ #define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_XRGB
+ #else
+ #define MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB JCS_EXT_BGRX
+ #endif
 +#else
- /* Colorspace conversion (copied from jpegint.h) */
- struct jpeg_color_deconverter {
-   JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
-@@ -34,6 +41,7 @@ METHODDEF(void)
- ycc_rgb_convert_argb (j_decompress_ptr cinfo,
-                  JSAMPIMAGE input_buf, JDIMENSION input_row,
-                  JSAMPARRAY output_buf, int num_rows);
++/* Colorspace conversion (copied from jpegint.h) */
++struct jpeg_color_deconverter {
++  JMETHOD(void, start_pass, (j_decompress_ptr cinfo));
++  JMETHOD(void, color_convert, (j_decompress_ptr cinfo,
++				JSAMPIMAGE input_buf, JDIMENSION input_row,
++				JSAMPARRAY output_buf, int num_rows));
++};
++
++METHODDEF(void)
++ycc_rgb_convert_argb (j_decompress_ptr cinfo,
++                 JSAMPIMAGE input_buf, JDIMENSION input_row,
++                 JSAMPARRAY output_buf, int num_rows);
 +#endif
- }
++}
  
  static void cmyk_convert_rgb(JSAMPROW row, JDIMENSION width);
-@@ -329,7 +340,18 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, PRUint32 aCount)
+ 
+@@ -324,6 +340,7 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
        case JCS_GRAYSCALE:
        case JCS_RGB:
        case JCS_YCbCr:
 +#ifdef JCS_EXTENSIONS
-+        // if we're not color managing we can decode directly to
-+        // MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB
-+        if (mCMSMode != eCMSMode_All) {
-+            mInfo.out_color_space = MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB;
-+            mInfo.out_color_components = 4;
-+        } else {
-+            mInfo.out_color_space = JCS_RGB;
-+        }
+         // if we're not color managing we can decode directly to
+         // MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB
+         if (mCMSMode != eCMSMode_All) {
+@@ -332,6 +349,9 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
+         } else {
+             mInfo.out_color_space = JCS_RGB;
+         }
 +#else
-         mInfo.out_color_space = JCS_RGB;
++        mInfo.out_color_space = JCS_RGB;
 +#endif
          break;
        case JCS_CMYK:
        case JCS_YCCK:
-@@ -397,6 +419,7 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, PRUint32 aCount)
+@@ -399,6 +419,15 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, uint32_t aCount)
        return; /* I/O suspension */
      }
  
 +#ifndef JCS_EXTENSIONS
-     /* Force to use our YCbCr to Packed RGB converter when possible */
-     if (!mTransform && (mCMSMode != eCMSMode_All) &&
-         mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
-@@ -404,6 +427,7 @@ nsJPEGDecoder::WriteInternal(const char *aBuffer, PRUint32 aCount)
-       mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
-       mInfo.cconvert->color_convert = ycc_rgb_convert_argb;
-     }
++    /* Force to use our YCbCr to Packed RGB converter when possible */
++    if (!mTransform && (mCMSMode != eCMSMode_All) &&
++        mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
++      /* Special case for the most common case: transform from YCbCr direct into packed ARGB */
++      mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
++      mInfo.cconvert->color_convert = ycc_rgb_convert_argb;
++    }
 +#endif
  
      /* If this is a progressive JPEG ... */
      mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL;
-@@ -542,7 +566,11 @@ nsJPEGDecoder::OutputScanlines(bool* suspend)
-       PRUint32 *imageRow = ((PRUint32*)mImageData) +
+@@ -544,7 +573,11 @@ nsJPEGDecoder::OutputScanlines(bool* suspend)
+       uint32_t *imageRow = ((uint32_t*)mImageData) +
                             (mInfo.output_scanline * mInfo.output_width);
  
 +#ifdef JCS_EXTENSIONS
-+      if (mInfo.out_color_space == MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB) {
+       if (mInfo.out_color_space == MOZ_JCS_EXT_NATIVE_ENDIAN_XRGB) {
 +#else
-       if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
++      if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
 +#endif
          /* Special case: scanline will be directly converted into packed ARGB */
          if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) {
            *suspend = true; /* suspend */
-@@ -858,6 +887,7 @@ term_source (j_decompress_ptr jd)
+@@ -854,6 +887,282 @@ term_source (j_decompress_ptr jd)
  } // namespace mozilla
  
  
 +#ifndef JCS_EXTENSIONS
- /**************** YCbCr -> Cairo's RGB24/ARGB32 conversion: most common case **************/
- 
- /*
-@@ -1130,7 +1160,8 @@ ycc_rgb_convert_argb (j_decompress_ptr cinfo,
-     }
-   }
- }
++/**************** YCbCr -> Cairo's RGB24/ARGB32 conversion: most common case **************/
++
++/*
++ * YCbCr is defined per CCIR 601-1, except that Cb and Cr are
++ * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5.
++ * The conversion equations to be implemented are therefore
++ *      R = Y                + 1.40200 * Cr
++ *      G = Y - 0.34414 * Cb - 0.71414 * Cr
++ *      B = Y + 1.77200 * Cb
++ * where Cb and Cr represent the incoming values less CENTERJSAMPLE.
++ * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.)
++ *
++ * To avoid floating-point arithmetic, we represent the fractional constants
++ * as integers scaled up by 2^16 (about 4 digits precision); we have to divide
++ * the products by 2^16, with appropriate rounding, to get the correct answer.
++ * Notice that Y, being an integral input, does not contribute any fraction
++ * so it need not participate in the rounding.
++ *
++ * For even more speed, we avoid doing any multiplications in the inner loop
++ * by precalculating the constants times Cb and Cr for all possible values.
++ * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table);
++ * for 12-bit samples it is still acceptable.  It's not very reasonable for
++ * 16-bit samples, but if you want lossless storage you shouldn't be changing
++ * colorspace anyway.
++ * The Cr=>R and Cb=>B values can be rounded to integers in advance; the
++ * values for the G calculation are left scaled up, since we must add them
++ * together before rounding.
++ */
++
++#define SCALEBITS       16      /* speediest right-shift on some machines */
++
++/* Use static tables for color processing. */
++/* Four tables, each 256 entries of 4 bytes totals 4K which is not bad... */
++
++const int Cr_r_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++       -0xb3,       -0xb2,       -0xb1,       -0xaf,       -0xae,       -0xac,
++       -0xab,       -0xaa,       -0xa8,       -0xa7,       -0xa5,       -0xa4,
++       -0xa3,       -0xa1,       -0xa0,       -0x9e,       -0x9d,       -0x9c,
++       -0x9a,       -0x99,       -0x97,       -0x96,       -0x95,       -0x93,
++       -0x92,       -0x90,       -0x8f,       -0x8e,       -0x8c,       -0x8b,
++       -0x89,       -0x88,       -0x87,       -0x85,       -0x84,       -0x82,
++       -0x81,       -0x80,       -0x7e,       -0x7d,       -0x7b,       -0x7a,
++       -0x79,       -0x77,       -0x76,       -0x74,       -0x73,       -0x72,
++       -0x70,       -0x6f,       -0x6d,       -0x6c,       -0x6b,       -0x69,
++       -0x68,       -0x66,       -0x65,       -0x64,       -0x62,       -0x61,
++       -0x5f,       -0x5e,       -0x5d,       -0x5b,       -0x5a,       -0x58,
++       -0x57,       -0x56,       -0x54,       -0x53,       -0x51,       -0x50,
++       -0x4f,       -0x4d,       -0x4c,       -0x4a,       -0x49,       -0x48,
++       -0x46,       -0x45,       -0x43,       -0x42,       -0x40,       -0x3f,
++       -0x3e,       -0x3c,       -0x3b,       -0x39,       -0x38,       -0x37,
++       -0x35,       -0x34,       -0x32,       -0x31,       -0x30,       -0x2e,
++       -0x2d,       -0x2b,       -0x2a,       -0x29,       -0x27,       -0x26,
++       -0x24,       -0x23,       -0x22,       -0x20,       -0x1f,       -0x1d,
++       -0x1c,       -0x1b,       -0x19,       -0x18,       -0x16,       -0x15,
++       -0x14,       -0x12,       -0x11,       -0x0f,       -0x0e,       -0x0d,
++       -0x0b,       -0x0a,       -0x08,       -0x07,       -0x06,       -0x04,
++       -0x03,       -0x01,        0x00,        0x01,        0x03,        0x04,
++        0x06,        0x07,        0x08,        0x0a,        0x0b,        0x0d,
++        0x0e,        0x0f,        0x11,        0x12,        0x14,        0x15,
++        0x16,        0x18,        0x19,        0x1b,        0x1c,        0x1d,
++        0x1f,        0x20,        0x22,        0x23,        0x24,        0x26,
++        0x27,        0x29,        0x2a,        0x2b,        0x2d,        0x2e,
++        0x30,        0x31,        0x32,        0x34,        0x35,        0x37,
++        0x38,        0x39,        0x3b,        0x3c,        0x3e,        0x3f,
++        0x40,        0x42,        0x43,        0x45,        0x46,        0x48,
++        0x49,        0x4a,        0x4c,        0x4d,        0x4f,        0x50,
++        0x51,        0x53,        0x54,        0x56,        0x57,        0x58,
++        0x5a,        0x5b,        0x5d,        0x5e,        0x5f,        0x61,
++        0x62,        0x64,        0x65,        0x66,        0x68,        0x69,
++        0x6b,        0x6c,        0x6d,        0x6f,        0x70,        0x72,
++        0x73,        0x74,        0x76,        0x77,        0x79,        0x7a,
++        0x7b,        0x7d,        0x7e,        0x80,        0x81,        0x82,
++        0x84,        0x85,        0x87,        0x88,        0x89,        0x8b,
++        0x8c,        0x8e,        0x8f,        0x90,        0x92,        0x93,
++        0x95,        0x96,        0x97,        0x99,        0x9a,        0x9c,
++        0x9d,        0x9e,        0xa0,        0xa1,        0xa3,        0xa4,
++        0xa5,        0xa7,        0xa8,        0xaa,        0xab,        0xac,
++        0xae,        0xaf,        0xb1,        0xb2,
++  };
++
++const int Cb_b_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++       -0xe3,       -0xe1,       -0xdf,       -0xde,       -0xdc,       -0xda,
++       -0xd8,       -0xd6,       -0xd5,       -0xd3,       -0xd1,       -0xcf,
++       -0xce,       -0xcc,       -0xca,       -0xc8,       -0xc6,       -0xc5,
++       -0xc3,       -0xc1,       -0xbf,       -0xbe,       -0xbc,       -0xba,
++       -0xb8,       -0xb7,       -0xb5,       -0xb3,       -0xb1,       -0xaf,
++       -0xae,       -0xac,       -0xaa,       -0xa8,       -0xa7,       -0xa5,
++       -0xa3,       -0xa1,       -0x9f,       -0x9e,       -0x9c,       -0x9a,
++       -0x98,       -0x97,       -0x95,       -0x93,       -0x91,       -0x90,
++       -0x8e,       -0x8c,       -0x8a,       -0x88,       -0x87,       -0x85,
++       -0x83,       -0x81,       -0x80,       -0x7e,       -0x7c,       -0x7a,
++       -0x78,       -0x77,       -0x75,       -0x73,       -0x71,       -0x70,
++       -0x6e,       -0x6c,       -0x6a,       -0x69,       -0x67,       -0x65,
++       -0x63,       -0x61,       -0x60,       -0x5e,       -0x5c,       -0x5a,
++       -0x59,       -0x57,       -0x55,       -0x53,       -0x52,       -0x50,
++       -0x4e,       -0x4c,       -0x4a,       -0x49,       -0x47,       -0x45,
++       -0x43,       -0x42,       -0x40,       -0x3e,       -0x3c,       -0x3a,
++       -0x39,       -0x37,       -0x35,       -0x33,       -0x32,       -0x30,
++       -0x2e,       -0x2c,       -0x2b,       -0x29,       -0x27,       -0x25,
++       -0x23,       -0x22,       -0x20,       -0x1e,       -0x1c,       -0x1b,
++       -0x19,       -0x17,       -0x15,       -0x13,       -0x12,       -0x10,
++       -0x0e,       -0x0c,       -0x0b,       -0x09,       -0x07,       -0x05,
++       -0x04,       -0x02,        0x00,        0x02,        0x04,        0x05,
++        0x07,        0x09,        0x0b,        0x0c,        0x0e,        0x10,
++        0x12,        0x13,        0x15,        0x17,        0x19,        0x1b,
++        0x1c,        0x1e,        0x20,        0x22,        0x23,        0x25,
++        0x27,        0x29,        0x2b,        0x2c,        0x2e,        0x30,
++        0x32,        0x33,        0x35,        0x37,        0x39,        0x3a,
++        0x3c,        0x3e,        0x40,        0x42,        0x43,        0x45,
++        0x47,        0x49,        0x4a,        0x4c,        0x4e,        0x50,
++        0x52,        0x53,        0x55,        0x57,        0x59,        0x5a,
++        0x5c,        0x5e,        0x60,        0x61,        0x63,        0x65,
++        0x67,        0x69,        0x6a,        0x6c,        0x6e,        0x70,
++        0x71,        0x73,        0x75,        0x77,        0x78,        0x7a,
++        0x7c,        0x7e,        0x80,        0x81,        0x83,        0x85,
++        0x87,        0x88,        0x8a,        0x8c,        0x8e,        0x90,
++        0x91,        0x93,        0x95,        0x97,        0x98,        0x9a,
++        0x9c,        0x9e,        0x9f,        0xa1,        0xa3,        0xa5,
++        0xa7,        0xa8,        0xaa,        0xac,        0xae,        0xaf,
++        0xb1,        0xb3,        0xb5,        0xb7,        0xb8,        0xba,
++        0xbc,        0xbe,        0xbf,        0xc1,        0xc3,        0xc5,
++        0xc6,        0xc8,        0xca,        0xcc,        0xce,        0xcf,
++        0xd1,        0xd3,        0xd5,        0xd6,        0xd8,        0xda,
++        0xdc,        0xde,        0xdf,        0xe1,
++  };
++
++const int Cr_g_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++    0x5b6900,    0x5ab22e,    0x59fb5c,    0x59448a,    0x588db8,    0x57d6e6,
++    0x572014,    0x566942,    0x55b270,    0x54fb9e,    0x5444cc,    0x538dfa,
++    0x52d728,    0x522056,    0x516984,    0x50b2b2,    0x4ffbe0,    0x4f450e,
++    0x4e8e3c,    0x4dd76a,    0x4d2098,    0x4c69c6,    0x4bb2f4,    0x4afc22,
++    0x4a4550,    0x498e7e,    0x48d7ac,    0x4820da,    0x476a08,    0x46b336,
++    0x45fc64,    0x454592,    0x448ec0,    0x43d7ee,    0x43211c,    0x426a4a,
++    0x41b378,    0x40fca6,    0x4045d4,    0x3f8f02,    0x3ed830,    0x3e215e,
++    0x3d6a8c,    0x3cb3ba,    0x3bfce8,    0x3b4616,    0x3a8f44,    0x39d872,
++    0x3921a0,    0x386ace,    0x37b3fc,    0x36fd2a,    0x364658,    0x358f86,
++    0x34d8b4,    0x3421e2,    0x336b10,    0x32b43e,    0x31fd6c,    0x31469a,
++    0x308fc8,    0x2fd8f6,    0x2f2224,    0x2e6b52,    0x2db480,    0x2cfdae,
++    0x2c46dc,    0x2b900a,    0x2ad938,    0x2a2266,    0x296b94,    0x28b4c2,
++    0x27fdf0,    0x27471e,    0x26904c,    0x25d97a,    0x2522a8,    0x246bd6,
++    0x23b504,    0x22fe32,    0x224760,    0x21908e,    0x20d9bc,    0x2022ea,
++    0x1f6c18,    0x1eb546,    0x1dfe74,    0x1d47a2,    0x1c90d0,    0x1bd9fe,
++    0x1b232c,    0x1a6c5a,    0x19b588,    0x18feb6,    0x1847e4,    0x179112,
++    0x16da40,    0x16236e,    0x156c9c,    0x14b5ca,    0x13fef8,    0x134826,
++    0x129154,    0x11da82,    0x1123b0,    0x106cde,    0x0fb60c,    0x0eff3a,
++    0x0e4868,    0x0d9196,    0x0cdac4,    0x0c23f2,    0x0b6d20,    0x0ab64e,
++    0x09ff7c,    0x0948aa,    0x0891d8,    0x07db06,    0x072434,    0x066d62,
++    0x05b690,    0x04ffbe,    0x0448ec,    0x03921a,    0x02db48,    0x022476,
++    0x016da4,    0x00b6d2,    0x000000,   -0x00b6d2,   -0x016da4,   -0x022476,
++   -0x02db48,   -0x03921a,   -0x0448ec,   -0x04ffbe,   -0x05b690,   -0x066d62,
++   -0x072434,   -0x07db06,   -0x0891d8,   -0x0948aa,   -0x09ff7c,   -0x0ab64e,
++   -0x0b6d20,   -0x0c23f2,   -0x0cdac4,   -0x0d9196,   -0x0e4868,   -0x0eff3a,
++   -0x0fb60c,   -0x106cde,   -0x1123b0,   -0x11da82,   -0x129154,   -0x134826,
++   -0x13fef8,   -0x14b5ca,   -0x156c9c,   -0x16236e,   -0x16da40,   -0x179112,
++   -0x1847e4,   -0x18feb6,   -0x19b588,   -0x1a6c5a,   -0x1b232c,   -0x1bd9fe,
++   -0x1c90d0,   -0x1d47a2,   -0x1dfe74,   -0x1eb546,   -0x1f6c18,   -0x2022ea,
++   -0x20d9bc,   -0x21908e,   -0x224760,   -0x22fe32,   -0x23b504,   -0x246bd6,
++   -0x2522a8,   -0x25d97a,   -0x26904c,   -0x27471e,   -0x27fdf0,   -0x28b4c2,
++   -0x296b94,   -0x2a2266,   -0x2ad938,   -0x2b900a,   -0x2c46dc,   -0x2cfdae,
++   -0x2db480,   -0x2e6b52,   -0x2f2224,   -0x2fd8f6,   -0x308fc8,   -0x31469a,
++   -0x31fd6c,   -0x32b43e,   -0x336b10,   -0x3421e2,   -0x34d8b4,   -0x358f86,
++   -0x364658,   -0x36fd2a,   -0x37b3fc,   -0x386ace,   -0x3921a0,   -0x39d872,
++   -0x3a8f44,   -0x3b4616,   -0x3bfce8,   -0x3cb3ba,   -0x3d6a8c,   -0x3e215e,
++   -0x3ed830,   -0x3f8f02,   -0x4045d4,   -0x40fca6,   -0x41b378,   -0x426a4a,
++   -0x43211c,   -0x43d7ee,   -0x448ec0,   -0x454592,   -0x45fc64,   -0x46b336,
++   -0x476a08,   -0x4820da,   -0x48d7ac,   -0x498e7e,   -0x4a4550,   -0x4afc22,
++   -0x4bb2f4,   -0x4c69c6,   -0x4d2098,   -0x4dd76a,   -0x4e8e3c,   -0x4f450e,
++   -0x4ffbe0,   -0x50b2b2,   -0x516984,   -0x522056,   -0x52d728,   -0x538dfa,
++   -0x5444cc,   -0x54fb9e,   -0x55b270,   -0x566942,   -0x572014,   -0x57d6e6,
++   -0x588db8,   -0x59448a,   -0x59fb5c,   -0x5ab22e,
++ };
++
++const int Cb_g_tab[(MAXJSAMPLE+1) * sizeof(int)] ={
++    0x2c8d00,    0x2c34e6,    0x2bdccc,    0x2b84b2,    0x2b2c98,    0x2ad47e,
++    0x2a7c64,    0x2a244a,    0x29cc30,    0x297416,    0x291bfc,    0x28c3e2,
++    0x286bc8,    0x2813ae,    0x27bb94,    0x27637a,    0x270b60,    0x26b346,
++    0x265b2c,    0x260312,    0x25aaf8,    0x2552de,    0x24fac4,    0x24a2aa,
++    0x244a90,    0x23f276,    0x239a5c,    0x234242,    0x22ea28,    0x22920e,
++    0x2239f4,    0x21e1da,    0x2189c0,    0x2131a6,    0x20d98c,    0x208172,
++    0x202958,    0x1fd13e,    0x1f7924,    0x1f210a,    0x1ec8f0,    0x1e70d6,
++    0x1e18bc,    0x1dc0a2,    0x1d6888,    0x1d106e,    0x1cb854,    0x1c603a,
++    0x1c0820,    0x1bb006,    0x1b57ec,    0x1affd2,    0x1aa7b8,    0x1a4f9e,
++    0x19f784,    0x199f6a,    0x194750,    0x18ef36,    0x18971c,    0x183f02,
++    0x17e6e8,    0x178ece,    0x1736b4,    0x16de9a,    0x168680,    0x162e66,
++    0x15d64c,    0x157e32,    0x152618,    0x14cdfe,    0x1475e4,    0x141dca,
++    0x13c5b0,    0x136d96,    0x13157c,    0x12bd62,    0x126548,    0x120d2e,
++    0x11b514,    0x115cfa,    0x1104e0,    0x10acc6,    0x1054ac,    0x0ffc92,
++    0x0fa478,    0x0f4c5e,    0x0ef444,    0x0e9c2a,    0x0e4410,    0x0debf6,
++    0x0d93dc,    0x0d3bc2,    0x0ce3a8,    0x0c8b8e,    0x0c3374,    0x0bdb5a,
++    0x0b8340,    0x0b2b26,    0x0ad30c,    0x0a7af2,    0x0a22d8,    0x09cabe,
++    0x0972a4,    0x091a8a,    0x08c270,    0x086a56,    0x08123c,    0x07ba22,
++    0x076208,    0x0709ee,    0x06b1d4,    0x0659ba,    0x0601a0,    0x05a986,
++    0x05516c,    0x04f952,    0x04a138,    0x04491e,    0x03f104,    0x0398ea,
++    0x0340d0,    0x02e8b6,    0x02909c,    0x023882,    0x01e068,    0x01884e,
++    0x013034,    0x00d81a,    0x008000,    0x0027e6,   -0x003034,   -0x00884e,
++   -0x00e068,   -0x013882,   -0x01909c,   -0x01e8b6,   -0x0240d0,   -0x0298ea,
++   -0x02f104,   -0x03491e,   -0x03a138,   -0x03f952,   -0x04516c,   -0x04a986,
++   -0x0501a0,   -0x0559ba,   -0x05b1d4,   -0x0609ee,   -0x066208,   -0x06ba22,
++   -0x07123c,   -0x076a56,   -0x07c270,   -0x081a8a,   -0x0872a4,   -0x08cabe,
++   -0x0922d8,   -0x097af2,   -0x09d30c,   -0x0a2b26,   -0x0a8340,   -0x0adb5a,
++   -0x0b3374,   -0x0b8b8e,   -0x0be3a8,   -0x0c3bc2,   -0x0c93dc,   -0x0cebf6,
++   -0x0d4410,   -0x0d9c2a,   -0x0df444,   -0x0e4c5e,   -0x0ea478,   -0x0efc92,
++   -0x0f54ac,   -0x0facc6,   -0x1004e0,   -0x105cfa,   -0x10b514,   -0x110d2e,
++   -0x116548,   -0x11bd62,   -0x12157c,   -0x126d96,   -0x12c5b0,   -0x131dca,
++   -0x1375e4,   -0x13cdfe,   -0x142618,   -0x147e32,   -0x14d64c,   -0x152e66,
++   -0x158680,   -0x15de9a,   -0x1636b4,   -0x168ece,   -0x16e6e8,   -0x173f02,
++   -0x17971c,   -0x17ef36,   -0x184750,   -0x189f6a,   -0x18f784,   -0x194f9e,
++   -0x19a7b8,   -0x19ffd2,   -0x1a57ec,   -0x1ab006,   -0x1b0820,   -0x1b603a,
++   -0x1bb854,   -0x1c106e,   -0x1c6888,   -0x1cc0a2,   -0x1d18bc,   -0x1d70d6,
++   -0x1dc8f0,   -0x1e210a,   -0x1e7924,   -0x1ed13e,   -0x1f2958,   -0x1f8172,
++   -0x1fd98c,   -0x2031a6,   -0x2089c0,   -0x20e1da,   -0x2139f4,   -0x21920e,
++   -0x21ea28,   -0x224242,   -0x229a5c,   -0x22f276,   -0x234a90,   -0x23a2aa,
++   -0x23fac4,   -0x2452de,   -0x24aaf8,   -0x250312,   -0x255b2c,   -0x25b346,
++   -0x260b60,   -0x26637a,   -0x26bb94,   -0x2713ae,   -0x276bc8,   -0x27c3e2,
++   -0x281bfc,   -0x287416,   -0x28cc30,   -0x29244a,   -0x297c64,   -0x29d47e,
++   -0x2a2c98,   -0x2a84b2,   -0x2adccc,   -0x2b34e6,
++ };
++
++
++/* We assume that right shift corresponds to signed division by 2 with
++ * rounding towards minus infinity.  This is correct for typical "arithmetic
++ * shift" instructions that shift in copies of the sign bit.  But some
++ * C compilers implement >> with an unsigned shift.  For these machines you
++ * must define RIGHT_SHIFT_IS_UNSIGNED.
++ * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity.
++ * It is only applied with constant shift counts.  SHIFT_TEMPS must be
++ * included in the variables of any routine using RIGHT_SHIFT.
++ */
++
++#ifdef RIGHT_SHIFT_IS_UNSIGNED
++#define SHIFT_TEMPS	INT32 shift_temp;
++#define RIGHT_SHIFT(x,shft)  \
++	((shift_temp = (x)) < 0 ? \
++	 (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \
++	 (shift_temp >> (shft)))
++#else
++#define SHIFT_TEMPS
++#define RIGHT_SHIFT(x,shft)	((x) >> (shft))
 +#endif
- 
- 
++
++
++METHODDEF(void)
++ycc_rgb_convert_argb (j_decompress_ptr cinfo,
++                 JSAMPIMAGE input_buf, JDIMENSION input_row,
++                 JSAMPARRAY output_buf, int num_rows)
++{
++  JDIMENSION num_cols = cinfo->output_width;
++  JSAMPLE * range_limit = cinfo->sample_range_limit;
++
++  SHIFT_TEMPS
++
++  /* This is used if we don't have SSE2 */
++
++  while (--num_rows >= 0) {
++    JSAMPROW inptr0 = input_buf[0][input_row];
++    JSAMPROW inptr1 = input_buf[1][input_row];
++    JSAMPROW inptr2 = input_buf[2][input_row];
++    input_row++;
++    uint32_t *outptr = (uint32_t *) *output_buf++;
++    for (JDIMENSION col = 0; col < num_cols; col++) {
++      int y  = GETJSAMPLE(inptr0[col]);
++      int cb = GETJSAMPLE(inptr1[col]);
++      int cr = GETJSAMPLE(inptr2[col]);
++      JSAMPLE * range_limit_y = range_limit + y;
++      /* Range-limiting is essential due to noise introduced by DCT losses. */
++      outptr[col] = 0xFF000000 |
++                    ( range_limit_y[Cr_r_tab[cr]] << 16 ) |
++                    ( range_limit_y[((int) RIGHT_SHIFT(Cb_g_tab[cb] + Cr_g_tab[cr], SCALEBITS))] << 8 ) |
++                    ( range_limit_y[Cb_b_tab[cb]] );
++    }
++  }
++}
++#endif
++
++
  /**************** Inverted CMYK -> RGB conversion **************/
  /*
+  * Input is (Inverted) CMYK stored as 4 bytes per pixel.

Deleted: trunk/www/seamonkey/files/patch-bug791366
==============================================================================
--- trunk/www/seamonkey/files/patch-bug791366	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,95 +0,0 @@
-diff --git mozilla/xpcom/base/nsMemoryReporterManager.cpp mozilla/xpcom/base/nsMemoryReporterManager.cpp
-index a9aff58..674e757 100644
---- mozilla/xpcom/base/nsMemoryReporterManager.cpp
-+++ mozilla/xpcom/base/nsMemoryReporterManager.cpp
-@@ -32,7 +32,7 @@ using namespace mozilla;
- #  include "jemalloc.h"
- #endif  // MOZ_MEMORY
- 
--#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(SOLARIS)
-+#ifdef XP_UNIX
- 
- #include <sys/time.h>
- #include <sys/resource.h>
-@@ -95,6 +95,81 @@ static nsresult GetResident(PRInt64 *n)
-     return GetProcSelfStatmField(1, n);
- }
- 
-+#elif defined(__DragonFly__) || defined(__FreeBSD__) \
-+    || defined(__NetBSD__) || defined(__OpenBSD__)
-+
-+#include <sys/param.h>
-+#include <sys/sysctl.h>
-+#if defined(__DragonFly__) || defined(__FreeBSD__)
-+#include <sys/user.h>
-+#endif
-+
-+#include <unistd.h>
-+
-+#if defined(__NetBSD__)
-+#undef KERN_PROC
-+#define KERN_PROC KERN_PROC2
-+#define KINFO_PROC struct kinfo_proc2
-+#else
-+#define KINFO_PROC struct kinfo_proc
-+#endif
-+
-+#if defined(__DragonFly__)
-+#define KP_SIZE(kp) (kp.kp_vm_map_size)
-+#define KP_RSS(kp) (kp.kp_vm_rssize * getpagesize())
-+#elif defined(__FreeBSD__)
-+#define KP_SIZE(kp) (kp.ki_size)
-+#define KP_RSS(kp) (kp.ki_rssize * getpagesize())
-+#elif defined(__NetBSD__)
-+#define KP_SIZE(kp) (kp.p_vm_msize * getpagesize())
-+#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize())
-+#elif defined(__OpenBSD__)
-+#define KP_SIZE(kp) ((kp.p_vm_dsize + kp.p_vm_ssize                     \
-+                      + kp.p_vm_tsize) * getpagesize())
-+#define KP_RSS(kp) (kp.p_vm_rssize * getpagesize())
-+#endif
-+
-+static nsresult GetKinfoProcSelf(KINFO_PROC *proc)
-+{
-+    int mib[] = {
-+        CTL_KERN,
-+        KERN_PROC,
-+        KERN_PROC_PID,
-+        getpid(),
-+#if defined(__NetBSD__) || defined(__OpenBSD__)
-+        sizeof(KINFO_PROC),
-+        1,
-+#endif
-+    };
-+    u_int miblen = sizeof(mib) / sizeof(mib[0]);
-+    size_t size = sizeof(KINFO_PROC);
-+    if (sysctl(mib, miblen, proc, &size, NULL, 0))
-+        return NS_ERROR_FAILURE;
-+
-+    return NS_OK;
-+}
-+
-+#define HAVE_VSIZE_AND_RESIDENT_REPORTERS 1
-+static nsresult GetVsize(PRInt64 *n)
-+{
-+    KINFO_PROC proc;
-+    nsresult rv = GetKinfoProcSelf(&proc);
-+    if (NS_SUCCEEDED(rv))
-+        *n = KP_SIZE(proc);
-+
-+    return rv;
-+}
-+
-+static nsresult GetResident(PRInt64 *n)
-+{
-+    KINFO_PROC proc;
-+    nsresult rv = GetKinfoProcSelf(&proc);
-+    if (NS_SUCCEEDED(rv))
-+        *n = KP_RSS(proc);
-+
-+    return rv;
-+}
-+
- #elif defined(SOLARIS)
- 
- #include <procfs.h>

Added: trunk/www/seamonkey/files/patch-bug798354
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/www/seamonkey/files/patch-bug798354	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,15 @@
+--- mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc~
++++ mozilla/ipc/chromium/src/chrome/common/ipc_channel_posix.cc
+@@ -133,7 +133,12 @@ int ChannelNameToClientFD(const std::string& channel_id) {
+ }
+ 
+ //------------------------------------------------------------------------------
++#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 2
++sockaddr_un sizecheck;
++const size_t kMaxPipeNameLength = sizeof(sizecheck.sun_path);
++#else
+ const size_t kMaxPipeNameLength = sizeof(sockaddr_un::sun_path);
++#endif
+ 
+ // Creates a Fifo with the specified name ready to listen on.
+ bool CreateServerFifo(const std::string& pipe_name, int* server_listen_fd) {

Deleted: trunk/www/seamonkey/files/patch-bug799441
==============================================================================
--- trunk/www/seamonkey/files/patch-bug799441	Mon Dec  3 18:03:03 2012	(r1109)
+++ /dev/null	00:00:00 1970	(deleted)
@@ -1,116 +0,0 @@
-commit b9accdd
-Author: Mike Hommey <mh+mozilla at glandium.org>
-Date:   Thu Oct 18 14:47:10 2012 +0200
-
-    Bug 799441 - Build GIO module in libxul. r=ted
----
- configure.in                              |  6 ++++++
- extensions/gio/Makefile.in                | 14 +++-----------
- toolkit/library/Makefile.in               |  5 +++++
- toolkit/library/nsStaticXULComponents.cpp |  7 +++++++
- toolkit/toolkit-tiers.mk                  |  4 ++++
- 5 files changed, 25 insertions(+), 11 deletions(-)
-
-diff --git configure.in configure.in
-index a9fb5f1..37e6db8 100644
---- mozilla/configure.in
-+++ mozilla/configure.in
-@@ -6086,6 +6086,12 @@ if test -n "$LIBXUL_SDK_DIR" -a `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; th
-     MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gio||'`
- fi
- 
-+if test `echo "$MOZ_EXTENSIONS" | grep -c gio` -ne 0; then
-+    MOZ_GIO_COMPONENT=1
-+    MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|gio||'`
-+fi
-+AC_SUBST(MOZ_GIO_COMPONENT)
-+
- if test -z "$MOZ_JSDEBUGGER" -a `echo "$MOZ_EXTENSIONS" | grep -c venkman` -ne 0; then
-     AC_MSG_WARN([Cannot build venkman without JavaScript debug library. Removing venkman from MOZ_EXTENSIONS.])
-     MOZ_EXTENSIONS=`echo $MOZ_EXTENSIONS | sed -e 's|venkman||'`
-diff --git extensions/gio/Makefile.in extensions/gio/Makefile.in
-index ccf2846..79112a8 100644
---- mozilla/extensions/gio/Makefile.in
-+++ mozilla/extensions/gio/Makefile.in
-@@ -14,6 +14,9 @@ MODULE		= nkgio
- LIBRARY_NAME	= nkgio
- SHORT_LIBNAME	= nkgio
- IS_COMPONENT	= 1
-+EXPORT_LIBRARY	= 1
-+MODULE_NAME	= nsGIOModule
-+LIBXUL_LIBRARY	= 1
- 
- CPPSRCS		= \
- 		nsGIOProtocolHandler.cpp \
-@@ -21,15 +24,4 @@ CPPSRCS		= \
- 
- LOCAL_INCLUDES	= $(MOZ_GIO_CFLAGS)
- 
--EXTRA_DSO_LDOPTS = \
--		   $(XPCOM_GLUE_LDOPTS) \
--		   $(MOZ_COMPONENT_LIBS) \
--		   $(MOZ_GIO_LIBS) \
--		   $(NULL)
--
--# make sure this component is never statically linked into the main
--# application.  this is necessary since we don't want to force users
--# to install gio in order to use the rest of mozilla ;-)
--FORCE_SHARED_LIB= 1
--
- include $(topsrcdir)/config/rules.mk
-diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
-index 7f9046e..6499758 100644
---- mozilla/toolkit/library/Makefile.in
-+++ mozilla/toolkit/library/Makefile.in
-@@ -333,6 +333,11 @@ COMPONENT_LIBS += gkdebug
- endif
- endif
- 
-+ifdef MOZ_GIO_COMPONENT
-+DEFINES += -DMOZ_GIO_COMPONENT
-+COMPONENT_LIBS += nkgio
-+endif
-+
- ifdef MOZ_APP_COMPONENT_LIBS
- COMPONENT_LIBS += $(MOZ_APP_COMPONENT_LIBS)
- endif
-diff --git toolkit/library/nsStaticXULComponents.cpp toolkit/library/nsStaticXULComponents.cpp
-index e1d90f2..85b21a2 100644
---- mozilla/toolkit/library/nsStaticXULComponents.cpp
-+++ mozilla/toolkit/library/nsStaticXULComponents.cpp
-@@ -164,6 +164,12 @@
- #define PROFILER_MODULE
- #endif
- 
-+#if defined(MOZ_GIO_COMPONENT)
-+#define GIO_MODULE MODULE(nsGIOModule)
-+#else
-+#define GIO_MODULE
-+#endif
-+
- #define XUL_MODULES                          \
-     MODULE(nsUConvModule)                    \
-     MODULE(nsI18nModule)                     \
-@@ -220,6 +226,7 @@
-     MODULE(nsTelemetryModule)                \
-     MODULE(jsinspector)                      \
-     MODULE(jsdebugger)                       \
-+    GIO_MODULE                               \
-     /* end of list */
- 
- #define MODULE(_name) \
-diff --git toolkit/toolkit-tiers.mk toolkit/toolkit-tiers.mk
-index e87d7af..4b16d23 100644
---- mozilla/toolkit/toolkit-tiers.mk
-+++ mozilla/toolkit/toolkit-tiers.mk
-@@ -252,6 +252,10 @@ tier_platform_dirs += js/ductwork/debugger
- 
- tier_platform_dirs += other-licenses/snappy
- 
-+ifdef MOZ_GIO_COMPONENT
-+tier_platform_dirs += extensions/gio
-+endif
-+
- ifdef APP_LIBXUL_STATICDIRS
- # Applications can cheat and ask for code to be
- # built before libxul so libxul can be linked against it.

Modified: trunk/www/seamonkey/files/patch-bug806139
==============================================================================
--- trunk/www/seamonkey/files/patch-bug806139	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/seamonkey/files/patch-bug806139	Mon Dec  3 18:03:03 2012	(r1110)
@@ -11,10 +11,10 @@
  #ifdef MOZ_MEDIA_PLUGINS
 --- mozilla/content/html/content/src/nsHTMLMediaElement.cpp~
 +++ mozilla/content/html/content/src/nsHTMLMediaElement.cpp
-@@ -2114,12 +2114,14 @@ const char nsHTMLMediaElement::gH264Type
-   "video/quicktime",
- };
+@@ -2135,12 +2135,14 @@ nsHTMLMediaElement::IsWebMType(const nsA
+ #endif
  
+ #if defined(MOZ_GSTREAMER) || defined(MOZ_WIDGET_GONK)
 -char const *const nsHTMLMediaElement::gH264Codecs[7] = {
 +char const *const nsHTMLMediaElement::gH264Codecs[9] = {
    "avc1.42E01E",

Added: trunk/www/seamonkey/files/patch-bug815025
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/www/seamonkey/files/patch-bug815025	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,27 @@
+--- mozilla/mfbt/SHA1.h~
++++ mozilla/mfbt/SHA1.h
+@@ -27,6 +27,11 @@
+ #include "mozilla/StandardInteger.h"
+ #include "mozilla/Types.h"
+ 
++#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 3
++/* c++/36107: mark SHA1Sum constructor as weak manually */
++__asm__(".weak _ZN7mozilla7SHA1SumC1Ev");
++#endif
++
+ namespace mozilla {
+ class SHA1Sum {
+   union {
+@@ -39,7 +43,12 @@ class SHA1Sum {
+ 
+ public:
+   static const unsigned int HashSize = 20;
++#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 3
++  /* c++/36107: gcc42 fails to remove *INTERNAL* from produced asm */
++  MOZ_IMPORT_API() SHA1Sum();
++#else
+   MFBT_API() SHA1Sum();
++#endif
+   MFBT_API(void) update(const void* dataIn, uint32_t len);
+   MFBT_API(void) finish(uint8_t hashout[20]);
+ };

Modified: trunk/www/seamonkey/files/patch-mozilla-content-media-nsAudioStream.cpp
==============================================================================
--- trunk/www/seamonkey/files/patch-mozilla-content-media-nsAudioStream.cpp	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/seamonkey/files/patch-mozilla-content-media-nsAudioStream.cpp	Mon Dec  3 18:03:03 2012	(r1110)
@@ -1,14 +1,11 @@
 --- mozilla/content/media/nsAudioStream.cpp~
 +++ mozilla/content/media/nsAudioStream.cpp
-@@ -298,7 +298,11 @@ static int PrefChanged(const char* aPref
-       gVolumeScale = NS_MAX<double>(0, PR_strtod(utf8.get(), nsnull));
+@@ -298,7 +298,7 @@ static int PrefChanged(const char* aPref, void* aClosure)
+       gVolumeScale = NS_MAX<double>(0, PR_strtod(utf8.get(), nullptr));
      }
    } else if (strcmp(aPref, PREF_USE_CUBEB) == 0) {
-+#if defined(__FreeBSD__) && __FreeBSD_version < 800097
-+    bool value = Preferences::GetBool(aPref, false);
-+#else
+-#ifdef MOZ_WIDGET_GONK
++#if defined(MOZ_WIDGET_GONK) || defined(__FreeBSD__) && __FreeBSD_version < 800097
+     bool value = Preferences::GetBool(aPref, false);
+ #else
      bool value = Preferences::GetBool(aPref, true);
-+#endif
-     mozilla::MutexAutoLock lock(*gAudioPrefsLock);
-     gUseCubeb = value;
-   } else if (strcmp(aPref, PREF_CUBEB_LATENCY) == 0) {

Modified: trunk/www/seamonkey/files/patch-mozilla-gfx-qcms-qcmstypes.h
==============================================================================
--- trunk/www/seamonkey/files/patch-mozilla-gfx-qcms-qcmstypes.h	Mon Dec  3 18:02:46 2012	(r1109)
+++ trunk/www/seamonkey/files/patch-mozilla-gfx-qcms-qcmstypes.h	Mon Dec  3 18:03:03 2012	(r1110)
@@ -6,6 +6,6 @@
  #include <stdlib.h>
 -#elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED)
 +#elif !defined(__intptr_t_defined) && !defined(_INTPTR_T_DECLARED) 
- typedef PRUptrdiff uintptr_t;
+ typedef unsigned long uintptr_t;
  #endif
  #endif

Added: trunk/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/www/seamonkey/files/patch-mozilla-ipc-chromium-src-base-platform_thread_posix.cc	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,16 @@
+--- mozilla/ipc/chromium/src/base/platform_thread_posix.cc~
++++ mozilla/ipc/chromium/src/base/platform_thread_posix.cc
+@@ -16,7 +16,13 @@
+ #include <sys/prctl.h>
+ #elif defined(OS_FREEBSD)
+ #include <sys/param.h>
++#if __FreeBSD_version > 802500
+ #include <sys/thr.h>
++#else
++_Pragma("GCC visibility push(default)")
++extern "C" int thr_self(long *);
++_Pragma("GCC visibility pop")
++#endif
+ #endif
+ 
+ #if !defined(OS_MACOSX)

Added: trunk/www/seamonkey/files/patch-mozilla-xpcom-base-AvailableMemoryTracker.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ trunk/www/seamonkey/files/patch-mozilla-xpcom-base-AvailableMemoryTracker.cpp	Mon Dec  3 18:03:03 2012	(r1110)
@@ -0,0 +1,10 @@
+--- mozilla/xpcom/base/AvailableMemoryTracker.cpp~
++++ mozilla/xpcom/base/AvailableMemoryTracker.cpp
+@@ -499,6 +499,6 @@ nsJemallocFreeDirtyPagesRunnable::Run()
+   MOZ_ASSERT(NS_IsMainThread());
+ 
+ #if defined(MOZ_JEMALLOC)
+-  mallctl("arenas.purge", nullptr, 0, nullptr, 0);
++//  mallctl("arenas.purge", nullptr, 0, nullptr, 0);
+ #elif defined(MOZ_MEMORY)
+   jemalloc_free_dirty_pages();


More information about the freebsd-gecko mailing list