aboutsummaryrefslogtreecommitdiff
path: root/www/firefox
diff options
context:
space:
mode:
authorFlorian Smeets <flo@FreeBSD.org>2013-05-16 02:00:38 +0000
committerFlorian Smeets <flo@FreeBSD.org>2013-05-16 02:00:38 +0000
commitba05efc063c9046a1d004d9fefcf212026a60faf (patch)
tree97b1a90026635f394b7c23d7ecfdef200676e2e1 /www/firefox
parentee6d4723a1cf41f56743d512a7d972e283c59a60 (diff)
Notes
Diffstat (limited to 'www/firefox')
-rw-r--r--www/firefox/Makefile19
-rw-r--r--www/firefox/Makefile.options6
-rw-r--r--www/firefox/distinfo4
-rw-r--r--www/firefox/files/patch-bug807492943
-rw-r--r--www/firefox/files/patch-bug8243176
-rw-r--r--www/firefox/files/patch-bug82698526
-rw-r--r--www/firefox/files/patch-bug827521147
-rw-r--r--www/firefox/files/patch-bug82800336
-rw-r--r--www/firefox/files/patch-bug84481812
-rw-r--r--www/firefox/files/patch-build-pgo-profileserver.py4
-rw-r--r--www/firefox/files/patch-clang3377
-rw-r--r--www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp4
12 files changed, 551 insertions, 733 deletions
diff --git a/www/firefox/Makefile b/www/firefox/Makefile
index aea6f0c49065..fb35654fb824 100644
--- a/www/firefox/Makefile
+++ b/www/firefox/Makefile
@@ -2,11 +2,10 @@
# $FreeBSD$
PORTNAME= firefox
-DISTVERSION= 20.0
+DISTVERSION= 21.0
PORTEPOCH= 1
CATEGORIES= www ipv6
-MASTER_SITES= ${MASTER_SITE_MOZILLA}
-MASTER_SITE_SUBDIR= ${PORTNAME}/releases/${DISTVERSION}/source
+MASTER_SITES= MOZILLA/${PORTNAME}/releases/${DISTVERSION}/source
DISTNAME= ${PORTNAME}-${DISTVERSION}.source
MAINTAINER= gecko@FreeBSD.org
@@ -23,7 +22,7 @@ USE_AUTOTOOLS= autoconf213:env
USE_PYTHON_BUILD=-2.7
OBJDIR_BUILD= # in-tree build broken after bug 789837
USE_GECKO= gecko
-CONFLICTS= firefox-1[07].*
+CONFLICTS= firefox-24.* firefox-1[07].*
MOZ_PKGCONFIG_FILES= # empty
USE_MOZILLA= # empty
MOZILLA_NAME= Firefox
@@ -37,7 +36,7 @@ GNU_CONFIGURE= yes
USE_BZIP2= yes
USE_GMAKE= yes
USE_GL= gl
-USE_DOS2UNIX= media/webrtc/trunk/src/system_wrappers/source/spreadsortlib/spreadsort.hpp
+USE_DOS2UNIX= media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp
NO_MOZPKGINSTALL=yes
FIREFOX_ICON= ${MOZILLA}.png
@@ -46,13 +45,10 @@ MOZ_OPTIONS= --program-transform-name='s/firefox/${MOZILLA}/' \
--enable-application=browser \
--enable-official-branding
-OPTIONS_DEFINE= GSTREAMER PGO WEBRTC
-OPTIONS_DEFAULT=GIO WEBRTC
+OPTIONS_DEFINE= PGO WEBRTC
+OPTIONS_DEFAULT=WEBRTC
.include "${.CURDIR}/../../www/firefox/Makefile.options"
-
-OPTIONS_DEFAULT:=${OPTIONS_DEFAULT:S/OSS/ALSA/}
-
.include <bsd.port.pre.mk>
WRKSRC:= ${WRKDIR}/mozilla-release
@@ -104,6 +100,9 @@ port-pre-install:
${ECHO_CMD} 'share/applications/${MOZILLA}.desktop' >> ${PLISTF}
${ECHO_CMD} "@dirrmtry share/applications" >> ${PLISTD}
${ECHO_CMD} 'share/pixmaps/${FIREFOX_ICON}' >> ${PLISTF}
+ ${ECHO_CMD} "@dirrm lib/firefox/chrome/icons/default" >> ${PLISTD}
+ ${ECHO_CMD} "@dirrm lib/firefox/chrome/icons" >> ${PLISTD}
+ ${ECHO_CMD} "@dirrm lib/firefox/chrome" >> ${PLISTD}
post-install:
${MKDIR} ${PREFIX}/share/applications ${PREFIX}/share/pixmaps
diff --git a/www/firefox/Makefile.options b/www/firefox/Makefile.options
index 61f1dde43ffb..2636d411aae4 100644
--- a/www/firefox/Makefile.options
+++ b/www/firefox/Makefile.options
@@ -1,8 +1,8 @@
# -*- makefile-bsdmake -*-
-OPTIONS_DEFINE+= DBUS DEBUG GCONF GIO GNOMEUI GNOMEVFS2 LIBPROXY \
- LOGGING OPTIMIZED_CFLAGS
-OPTIONS_DEFAULT+= DBUS LOGGING OSS
+OPTIONS_DEFINE+= DBUS DEBUG GCONF GIO GNOMEUI GNOMEVFS2 GSTREAMER \
+ LIBPROXY LOGGING OPTIMIZED_CFLAGS
+OPTIONS_DEFAULT+= ALSA DBUS GIO LOGGING
OPTIONS_SINGLE+= AUDIO
OPTIONS_SINGLE_AUDIO= ALSA OSS PULSEAUDIO
diff --git a/www/firefox/distinfo b/www/firefox/distinfo
index 268c587b4b92..851d8ec02cd7 100644
--- a/www/firefox/distinfo
+++ b/www/firefox/distinfo
@@ -1,2 +1,2 @@
-SHA256 (firefox-20.0.source.tar.bz2) = 69818444915d3002a0d15583d47bc86fcf5027b53fab2a8a91ae18a7bfa20577
-SIZE (firefox-20.0.source.tar.bz2) = 100311453
+SHA256 (firefox-21.0.source.tar.bz2) = 3909031cb5d403b12c796afb7775b4950f0347786ffd06028761852a1074d91c
+SIZE (firefox-21.0.source.tar.bz2) = 105558931
diff --git a/www/firefox/files/patch-bug807492 b/www/firefox/files/patch-bug807492
index 12bbb48a1cba..21415b55ace1 100644
--- a/www/firefox/files/patch-bug807492
+++ b/www/firefox/files/patch-bug807492
@@ -17,7 +17,7 @@ diff --git configure.in configure.in
index c167461..8346c11 100644
--- configure.in
+++ configure.in
-@@ -1449,16 +1449,27 @@ if test "$GNU_CC"; then
+@@ -1413,16 +1413,27 @@ if test "$GNU_CC"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -mssse3"
AC_TRY_COMPILE([asm ("pmaddubsw %xmm2,%xmm3");],,AC_MSG_RESULT([yes])
@@ -39,13 +39,13 @@ index c167461..8346c11 100644
+
# Turn on GNU-specific warnings:
# -Wall - turn on a lot of warnings
- # -pedantic - this is turned on below
- # -Wpointer-arith - enabled with -pedantic, but good to have even if not
+ # -Wpointer-arith - good to have
# -Wdeclaration-after-statement - MSVC doesn't like these
# -Werror=return-type - catches missing returns, zero false positives
# -Wtype-limits - catches overflow bugs, few false positives
# -Wempty-body - catches bugs, e.g. "if (c); foo();", few false positives
-@@ -5259,17 +5270,17 @@ dnl Turn off webrtc for OS's we don't handle yet, but allow
+ #
+@@ -5203,17 +5214,17 @@ dnl Turn off webrtc for OS's we don't ha
dnl --enable-webrtc to override. Can disable for everything in
dnl the master list above.
if test -n "$MOZ_WEBRTC"; then
@@ -64,7 +64,7 @@ index c167461..8346c11 100644
;;
esac
fi
-@@ -9065,16 +9076,21 @@ elif test "${OS_TARGET}" = "Android"; then
+@@ -8997,16 +9008,21 @@ elif test "${OS_TARGET}" = "Android"; th
EXTRA_GYP_DEFINES="-D gtest_target_type=executable -D android_toolchain=${android_toolchain} -G os=android "
if test -n "$ARM_ARCH" && test "$ARM_ARCH" -lt 7; then
EXTRA_GYP_DEFINES+=" -D armv7=0 "
@@ -83,7 +83,7 @@ index c167461..8346c11 100644
dnl Any --include files must also appear in -D FORCED_INCLUDE_FILE= entries
dnl so that regeneration via dependencies works correctly
- WEBRTC_CONFIG="-D build_with_mozilla=1 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi"
+ WEBRTC_CONFIG="-D build_with_mozilla=1 -D build_with_chromium=0 --include ${srcdir}/media/webrtc/webrtc_config.gypi -D FORCED_INCLUDE_FILE=${srcdir}/media/webrtc/webrtc_config.gypi"
GYP_WEBRTC_OPTIONS="--format=mozmake ${WEBRTC_CONFIG} -D target_arch=${WEBRTC_TARGET_ARCH} ${EXTRA_GYP_DEFINES} --depth=${srcdir}/media/webrtc/trunk --toplevel-dir=${srcdir} -G OBJDIR=${_objdir}"
diff --git js/src/config/system-headers js/src/config/system-headers
@@ -137,7 +137,7 @@ diff --git media/mtransport/test/Makefile.in media/mtransport/test/Makefile.in
index c1d5bf4..2ecf2c7 100644
--- media/mtransport/test/Makefile.in
+++ media/mtransport/test/Makefile.in
-@@ -67,22 +67,24 @@ DEFINES += -D__Userspace_os_FreeBSD=1
+@@ -73,22 +73,24 @@ DEFINES += -D__Userspace_os_FreeBSD=1
else
#default_fallback; probably doesn't work
DEFINES += -D__Userspace_os_$(OS_TARGET)=1
@@ -167,7 +167,7 @@ diff --git media/mtransport/third_party/nICEr/nicer.gyp media/mtransport/third_p
index 0e1f8b4..9a4b995 100644
--- media/mtransport/third_party/nICEr/nicer.gyp
+++ media/mtransport/third_party/nICEr/nicer.gyp
-@@ -124,26 +124,36 @@
+@@ -126,26 +126,36 @@
'R_DEFINED_UINT2=uint16_t',
'R_DEFINED_INT4=int32_t',
'R_DEFINED_UINT4=uint32_t',
@@ -394,11 +394,11 @@ index cc260b7..66af2d7 100644
+#endif /* HAVE_XLOCALE */
{
if (nbytes == (size_t)-1) /* should never happen */ {
- assert(0);
+ assert(0);
ABORT(R_INTERNAL);
- }
+ }
if (nbytes == (size_t)-2) /* encoding error */ {
- assert(0);
+ assert(0);
ABORT(R_BAD_DATA);
diff --git media/mtransport/third_party/nrappkit/nrappkit.gyp media/mtransport/third_party/nrappkit/nrappkit.gyp
index 3cc8e1c..74016c6 100644
@@ -443,7 +443,7 @@ index 3cc8e1c..74016c6 100644
'RETSIGTYPE=void',
'TIME_WITH_SYS_TIME_H=1',
diff --git media/mtransport/third_party/nrappkit/src/log/r_log.c media/mtransport/third_party/nrappkit/src/log/r_log.c
-index b25d5c2..b207b8c 100644
+index efb7ef2..aebf578 100644
--- media/mtransport/third_party/nrappkit/src/log/r_log.c
+++ media/mtransport/third_party/nrappkit/src/log/r_log.c
@@ -43,16 +43,17 @@ static char *RCSSTRING __UNUSED__ ="$Id: r_log.c,v 1.10 2008/11/25 22:25:18 adam
@@ -464,32 +464,6 @@ index b25d5c2..b207b8c 100644
#include <time.h>
-diff --git media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h
-index 15452e3..2c9651a 100644
---- media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h
-+++ media/mtransport/third_party/nrappkit/src/port/darwin/include/csi_platform.h
-@@ -37,16 +37,21 @@
- */
-
-
- #ifndef _platform_h
- #define _platform_h
-
- #include <unistd.h>
-
-+#ifdef BSD
-+/* Hack version of addr2ascii (in util/util.c) */
-+char *addr2ascii(int af, const void *addrp, int len,char *buf);
-+#endif
-+
- #define STDIO_BYTES_BUFFERED(fp) (fp->_r)
-
- #ifdef NR_SOCKET_IS_VOID_PTR
- typedef void* NR_SOCKET;
- #else
- typedef int NR_SOCKET;
- #define NR_SOCKET_READ(sock,buf,count) read((sock),(buf),(count))
- #define NR_SOCKET_WRITE(sock,buf,count) write((sock),(buf),(count))
diff --git media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
index bcb1ec0..bb73591 100644
--- media/mtransport/third_party/nrappkit/src/port/generic/include/sys/queue.h
@@ -504,21 +478,14 @@ index bcb1ec0..bb73591 100644
#define __offsetof offsetof
#endif
diff --git media/mtransport/third_party/nrappkit/src/util/util.c media/mtransport/third_party/nrappkit/src/util/util.c
-index 3aced8b..be020bb 100644
+index a7d4ff1..ff11a60 100644
--- media/mtransport/third_party/nrappkit/src/util/util.c
+++ media/mtransport/third_party/nrappkit/src/util/util.c
-@@ -36,20 +36,24 @@
- ekr@rtfm.com Wed Dec 26 17:19:36 2001
- */
-
-
+@@ -40,16 +40,17 @@
static char *RCSSTRING __UNUSED__ ="$Id: util.c,v 1.5 2007/11/21 00:09:13 adamcain Exp $";
#ifndef WIN32
#include <sys/uio.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
-+#include <arpa/inet.h>
#include <pwd.h>
#include <dirent.h>
#endif
@@ -532,25 +499,6 @@ index 3aced8b..be020bb 100644
#include "nr_common.h"
#include "r_common.h"
#include "registry.h"
-@@ -431,17 +435,17 @@ int nr_reg_uint8_fetch_and_check(NR_registry key, UINT8 min, UINT8 max, int log_
- abort:
- if(die && _status){
- r_log(log_fac,LOG_CRIT,"Exiting due to invalid configuration (key '%s')",key);
- exit(1);
- }
- return(_status);
- }
-
--#if defined(LINUX) || defined(WIN32)
-+#if defined(LINUX) || defined(BSD) || defined(WIN32)
- /* Hack version of addr2ascii */
- char *addr2ascii(int af, const void *addrp, int len,char *buf)
- {
- static char buf2[256];
- char *ret;
- struct in_addr *addr=(struct in_addr *)addrp;
-
- if (! buf)
diff --git media/webrtc/signaling/signaling.gyp media/webrtc/signaling/signaling.gyp
index 2a91e3d..31de641 100644
--- media/webrtc/signaling/signaling.gyp
@@ -664,26 +612,7 @@ diff --git media/webrtc/signaling/test/Makefile.in media/webrtc/signaling/test/M
index a30e330..cfbd8a3 100644
--- media/webrtc/signaling/test/Makefile.in
+++ media/webrtc/signaling/test/Makefile.in
-@@ -22,17 +22,17 @@ LIBS = \
- $(DEPTH)/media/webrtc/signalingtest/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \
- $(DEPTH)/media/webrtc/signalingtest/signaling_sipcc/$(LIB_PREFIX)sipcc.$(LIB_SUFFIX) \
- $(DEPTH)/layout/media/$(LIB_PREFIX)gkmedias.$(LIB_SUFFIX) \
- $(DEPTH)/media/webrtc/trunk/testing/gtest_gtest/$(LIB_PREFIX)gtest.$(LIB_SUFFIX) \
- $(DEPTH)/netwerk/srtp/src/$(LIB_PREFIX)nksrtp_s.$(LIB_SUFFIX) \
- $(NULL)
-
- ifdef MOZ_SYDNEYAUDIO
--ifeq ($(OS_TARGET),Linux)
-+ifneq (,$(filter Linux DragonFly FreeBSD NetBSD OpenBSD,$(OS_TARGET)))
- LIBS += \
- $(MOZ_ALSA_LIBS) \
- $(NULL)
- endif
- endif
-
- ifeq ($(OS_TARGET),Android)
- LIBS += \
-@@ -76,17 +76,17 @@ endif
+@@ -81,17 +81,17 @@ endif
ifeq (qt,$(MOZ_WIDGET_TOOLKIT))
LIBS += \
$(XLIBS) \
@@ -802,39 +731,39 @@ index 6ca2f70..5d261cb 100644
# Flags to use X11 on non-Mac POSIX platforms
['OS=="win" or OS=="mac" or OS=="ios" or OS=="android"', {
'use_glib%': 0,
-diff --git media/webrtc/trunk/src/build/common.gypi media/webrtc/trunk/src/build/common.gypi
+diff --git media/webrtc/trunk/webrtc/build/common.gypi media/webrtc/trunk/webrtc/build/common.gypi
index 9ca9f7c..d5c4ab9 100644
---- media/webrtc/trunk/src/build/common.gypi
-+++ media/webrtc/trunk/src/build/common.gypi
-@@ -101,16 +101,21 @@
- 'enable_protobuf%': 1,
- 'include_tests%': 1,
-
- # TODO(andrew): For now, disable the Chrome plugins, which causes a
+--- media/webrtc/trunk/webrtc/build/common.gypi
++++ media/webrtc/trunk/webrtc/build/common.gypi
+@@ -119,16 +119,21 @@
# flood of chromium-style warnings. Investigate enabling them:
# http://code.google.com/p/webrtc/issues/detail?id=163
'clang_use_chrome_plugins%': 0,
+
+ # Switch between Android audio device OpenSL ES implementation
+ # and Java Implementation
+ 'enable_android_opensl%': 0,
}],
+ ['OS=="linux" or OS=="solaris" or os_bsd==1', {
+ 'include_v4l2_video_capture%': 1,
+ }, {
+ 'include_v4l2_video_capture%': 0,
+ }],
- ], # conditions
- },
- 'target_defaults': {
- 'include_dirs': [
- # TODO(andrew): we should be able to just use <(webrtc_root) here.
- '..','../..',
- ],
- 'defines': [
-@@ -176,16 +181,28 @@
- 'defines': [
- 'WEBRTC_LINUX',
- 'WEBRTC_THREAD_RR',
- # TODO(andrew): can we select this automatically?
- # Define this if the Linux system does not support CLOCK_MONOTONIC.
- #'WEBRTC_CLOCK_TYPE_REALTIME',
+ ['OS=="ios"', {
+ 'enable_video%': 0,
+ 'enable_protobuf%': 0,
+ 'build_libjpeg%': 0,
+ 'build_libyuv%': 0,
+ 'build_libvpx%': 0,
+ 'include_tests%': 0,
+ }],
+@@ -205,16 +210,28 @@
+ 'defines': ['WEBRTC_ARCH_ARM_NEON',],
+ }, {
+ 'defines': ['WEBRTC_DETECT_ARM_NEON',],
+ }],
+ ],
+ }],
],
}],
+ ['os_bsd==1', {
@@ -849,18 +778,18 @@ index 9ca9f7c..d5c4ab9 100644
+ 'WEBRTC_CLOCK_TYPE_REALTIME',
+ ],
+ }],
- ['OS=="mac"', {
+ ['OS=="ios"', {
'defines': [
'WEBRTC_MAC',
- 'WEBRTC_MAC_INTEL', # TODO(andrew): remove this.
+ 'WEBRTC_IOS',
'WEBRTC_THREAD_RR',
'WEBRTC_CLOCK_TYPE_REALTIME',
],
}],
-diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc
+diff --git media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc
index 203f09a..0b0b70e 100644
---- media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc
-+++ media/webrtc/trunk/src/modules/audio_device/main/source/audio_device_utility.cc
+--- media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc
++++ media/webrtc/trunk/webrtc/modules/audio_device/audio_device_utility.cc
@@ -41,17 +41,17 @@ bool AudioDeviceUtility::StringCompare(
const char* str1 , const char* str2,
const WebRtc_UWord32 length)
@@ -893,10 +822,10 @@ index 203f09a..0b0b70e 100644
+#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
-diff --git media/webrtc/trunk/src/modules/rtp_rtcp/source/forward_error_correction.cc media/webrtc/trunk/src/modules/rtp_rtcp/source/forward_error_correction.cc
+diff --git media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc
index bdad224..39e1132 100644
---- media/webrtc/trunk/src/modules/rtp_rtcp/source/forward_error_correction.cc
-+++ media/webrtc/trunk/src/modules/rtp_rtcp/source/forward_error_correction.cc
+--- media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc
++++ media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc
@@ -7,16 +7,17 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
@@ -915,10 +844,10 @@ index bdad224..39e1132 100644
#include "system_wrappers/interface/trace.h"
namespace webrtc {
-diff --git media/webrtc/trunk/src/modules/rtp_rtcp/source/rtp_utility.cc media/webrtc/trunk/src/modules/rtp_rtcp/source/rtp_utility.cc
+diff --git media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
index 298d479..37b70c9 100644
---- media/webrtc/trunk/src/modules/rtp_rtcp/source/rtp_utility.cc
-+++ media/webrtc/trunk/src/modules/rtp_rtcp/source/rtp_utility.cc
+--- media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
++++ media/webrtc/trunk/webrtc/modules/rtp_rtcp/source/rtp_utility.cc
@@ -13,17 +13,17 @@
#include <cassert>
#include <cmath> // ceil
@@ -995,9 +924,9 @@ index 298d479..37b70c9 100644
WebRtc_UWord32 GetCurrentRTP(RtpRtcpClock* clock, WebRtc_UWord32 freq) {
const bool use_global_clock = (clock == NULL);
-@@ -313,17 +313,17 @@ bool OldTimestamp(uint32_t newTimestamp,
- * Misc utility routines
- */
+@@ -325,17 +325,17 @@ WebRtc_UWord16 GetPayloadDataLength(const WebRtcRTPHeader* rtp_header,
+ return static_cast<WebRtc_UWord16>(length);
+ }
#if defined(_WIN32)
bool StringCompare(const char* str1, const char* str2,
@@ -1014,10 +943,10 @@ index 298d479..37b70c9 100644
#if !defined(WEBRTC_LITTLE_ENDIAN) && !defined(WEBRTC_BIG_ENDIAN)
#error Either WEBRTC_LITTLE_ENDIAN or WEBRTC_BIG_ENDIAN must be defined
-diff --git media/webrtc/trunk/src/modules/udp_transport/source/udp_transport_impl.cc media/webrtc/trunk/src/modules/udp_transport/source/udp_transport_impl.cc
+diff --git media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc
index e50db5d..70ad8a8 100644
---- media/webrtc/trunk/src/modules/udp_transport/source/udp_transport_impl.cc
-+++ media/webrtc/trunk/src/modules/udp_transport/source/udp_transport_impl.cc
+--- media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc
++++ media/webrtc/trunk/webrtc/modules/udp_transport/source/udp_transport_impl.cc
@@ -13,60 +13,62 @@
#include <stdio.h>
#include <stdlib.h>
@@ -1041,7 +970,7 @@ index e50db5d..70ad8a8 100644
-#include <sys/socket.h>
#include <sys/time.h>
#include <unistd.h>
- #ifndef MAC_IPHONE
+ #ifndef WEBRTC_IOS
#include <net/if_arp.h>
#endif
#endif // defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
@@ -1162,10 +1091,10 @@ index e50db5d..70ad8a8 100644
ptrNumericIP = &(address._sockaddr_in.sin_addr);
}
else if(ipFamily == AF_INET6)
-diff --git media/webrtc/trunk/src/modules/utility/source/rtp_dump_impl.cc media/webrtc/trunk/src/modules/utility/source/rtp_dump_impl.cc
+diff --git media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc
index 69a52ec..7ac226c 100644
---- media/webrtc/trunk/src/modules/utility/source/rtp_dump_impl.cc
-+++ media/webrtc/trunk/src/modules/utility/source/rtp_dump_impl.cc
+--- media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc
++++ media/webrtc/trunk/webrtc/modules/utility/source/rtp_dump_impl.cc
@@ -14,17 +14,17 @@
#include <stdio.h>
@@ -1204,10 +1133,10 @@ index 69a52ec..7ac226c 100644
val = tv.tv_sec * 1000 + tv.tv_usec / 1000;
return val;
#else
-diff --git media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
index 653ee16..8d6fd68 100644
---- media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc
-+++ media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc
+--- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
@@ -14,17 +14,23 @@
#include <unistd.h>
#include <sys/ioctl.h>
@@ -1232,10 +1161,10 @@ index 653ee16..8d6fd68 100644
namespace webrtc
{
namespace videocapturemodule
-diff --git media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
index 12df1b3..424ea0a 100644
---- media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc
-+++ media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc
+--- media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
@@ -7,22 +7,30 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
@@ -1268,10 +1197,10 @@ index 12df1b3..424ea0a 100644
#include "critical_section_wrapper.h"
#include "video_capture_linux.h"
-diff --git media/webrtc/trunk/src/modules/video_capture/main/source/device_info_impl.cc media/webrtc/trunk/src/modules/video_capture/main/source/device_info_impl.cc
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc
index e3f7bb5..882cede 100644
---- media/webrtc/trunk/src/modules/video_capture/main/source/device_info_impl.cc
-+++ media/webrtc/trunk/src/modules/video_capture/main/source/device_info_impl.cc
+--- media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc
++++ media/webrtc/trunk/webrtc/modules/video_capture/device_info_impl.cc
@@ -49,17 +49,17 @@ WebRtc_Word32 DeviceInfoImpl::NumberOfCapabilities(
if (!deviceUniqueIdUTF8)
return -1;
@@ -1281,8 +1210,8 @@ index e3f7bb5..882cede 100644
if (_lastUsedDeviceNameLength == strlen((char*) deviceUniqueIdUTF8))
{
// Is it the same device that is asked for again.
--#if defined(WEBRTC_MAC_INTEL) || defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_MAC_INTEL) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+-#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX)
++#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
if(strncasecmp((char*)_lastUsedDeviceName,
(char*) deviceUniqueIdUTF8,
_lastUsedDeviceNameLength)==0)
@@ -1300,8 +1229,8 @@ index e3f7bb5..882cede 100644
ReadLockScoped cs(_apiLock);
if ((_lastUsedDeviceNameLength != strlen((char*) deviceUniqueIdUTF8))
--#if defined(WEBRTC_MAC_INTEL) || defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_MAC_INTEL) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+-#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX)
++#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
|| (strncasecmp((char*)_lastUsedDeviceName,
(char*) deviceUniqueIdUTF8,
_lastUsedDeviceNameLength)!=0))
@@ -1319,8 +1248,8 @@ index e3f7bb5..882cede 100644
ReadLockScoped cs(_apiLock);
if ((_lastUsedDeviceNameLength != strlen((char*) deviceUniqueIdUTF8))
--#if defined(WEBRTC_MAC_INTEL) || defined(WEBRTC_LINUX)
-+#if defined(WEBRTC_MAC_INTEL) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
+-#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX)
++#if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
|| (strncasecmp((char*)_lastUsedDeviceName,
(char*) deviceUniqueIdUTF8,
_lastUsedDeviceNameLength)!=0))
@@ -1329,38 +1258,38 @@ index e3f7bb5..882cede 100644
(char*) deviceUniqueIdUTF8,
_lastUsedDeviceNameLength) != 0))
#endif
-diff --git media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
index 0a9765e..8d4bbf4 100644
---- media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
-+++ media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
-@@ -55,17 +55,17 @@
+--- media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
++++ media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
+@@ -43,17 +43,17 @@
+ 'conditions': [
['include_internal_video_capture==0', {
'sources': [
- 'External/device_info_external.cc',
- 'External/video_capture_external.cc',
+ 'external/device_info_external.cc',
+ 'external/video_capture_external.cc',
],
- },{ # include_internal_video_capture == 1
+ }, { # include_internal_video_capture == 1
'conditions': [
- # DEFINE PLATFORM SPECIFIC SOURCE FILES
- ['OS=="linux"', {
+ ['include_v4l2_video_capture==1', {
'include_dirs': [
- 'Linux',
+ 'linux',
],
'sources': [
- 'Linux/device_info_linux.h',
- 'Linux/video_capture_linux.h',
- 'Linux/device_info_linux.cc',
- 'Linux/video_capture_linux.cc',
-@@ -162,31 +162,35 @@
- '../interface',
+ 'linux/device_info_linux.cc',
+ 'linux/device_info_linux.h',
+ 'linux/video_capture_linux.cc',
+ 'linux/video_capture_linux.h',
+@@ -152,31 +152,35 @@
+ 'include_dirs': [
+ 'include',
],
'sources': [
- '../test/video_capture_unittest.cc',
- '../test/video_capture_main_mac.mm',
+ 'test/video_capture_unittest.cc',
+ 'test/video_capture_main_mac.mm',
],
'conditions': [
- # DEFINE PLATFORM SPECIFIC INCLUDE AND CFLAGS
- ['OS=="mac" or OS=="linux"', {
+ ['OS!="win" and OS!="android"', {
'cflags': [
@@ -1391,176 +1320,167 @@ index 0a9765e..8d4bbf4 100644
'xcode_settings': {
# TODO(andrew): CoreAudio and AudioToolbox shouldn't be needed.
'OTHER_LDFLAGS': [
-diff --git media/webrtc/trunk/src/system_wrappers/interface/tick_util.h media/webrtc/trunk/src/system_wrappers/interface/tick_util.h
+diff --git media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h
index 0cd85d0..45591be 100644
---- media/webrtc/trunk/src/system_wrappers/interface/tick_util.h
-+++ media/webrtc/trunk/src/system_wrappers/interface/tick_util.h
-@@ -161,17 +161,17 @@ inline TickTime TickTime::Now()
- // so it must have been a wrap around.
- if(old > 0xf0000000 && now < 0x0fffffff)
- {
- numWrapTimeGetTime++;
- }
- }
- result._ticks = now + (numWrapTimeGetTime<<32);
- #endif
+--- media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h
++++ media/webrtc/trunk/webrtc/system_wrappers/interface/asm_defines.h
+@@ -6,17 +6,17 @@
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+ #ifndef WEBRTC_SYSTEM_WRAPPERS_INTERFACE_ASM_DEFINES_H_
+ #define WEBRTC_SYSTEM_WRAPPERS_INTERFACE_ASM_DEFINES_H_
+
+-#if defined(__linux__) && defined(__ELF__)
++#if (defined(__linux__) || defined(__FreeBSD__)) && defined(__ELF__)
+ .section .note.GNU-stack,"",%progbits
+ #endif
+
+ // Define the macros used in ARM assembly code, so that for Mac or iOS builds
+ // we add leading underscores for the function names.
+ #ifdef __APPLE__
+ .macro GLOBAL_FUNCTION name
+ .global _\name
+diff --git media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h
+index 0cd85d0..45591be 100644
+--- media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h
++++ media/webrtc/trunk/webrtc/system_wrappers/interface/tick_util.h
+@@ -189,17 +189,17 @@ inline WebRtc_Word64 TickTime::QueryOsForTicks() {
+ // 0x0fffffff ~3.1 days, the code will not take that long to execute
+ // so it must have been a wrap around.
+ if (old > 0xf0000000 && now < 0x0fffffff) {
+ num_wrap_time_get_time++;
+ }
+ }
+ result.ticks_ = now + (num_wrap_time_get_time << 32);
+ #endif
-#elif defined(WEBRTC_LINUX)
+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD)
- struct timespec ts;
- // TODO(wu): Remove CLOCK_REALTIME implementation.
- #ifdef WEBRTC_CLOCK_TYPE_REALTIME
- clock_gettime(CLOCK_REALTIME, &ts);
- #else
- clock_gettime(CLOCK_MONOTONIC, &ts);
- #endif
- result._ticks = 1000000000LL * static_cast<WebRtc_Word64>(ts.tv_sec) + static_cast<WebRtc_Word64>(ts.tv_nsec);
-@@ -203,17 +203,17 @@ inline WebRtc_Word64 TickTime::MillisecondTimestamp()
+ struct timespec ts;
+ // TODO(wu): Remove CLOCK_REALTIME implementation.
+ #ifdef WEBRTC_CLOCK_TYPE_REALTIME
+ clock_gettime(CLOCK_REALTIME, &ts);
+ #else
+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ #endif
+ result.ticks_ = 1000000000LL * static_cast<WebRtc_Word64>(ts.tv_sec) +
+@@ -236,34 +236,34 @@ inline WebRtc_Word64 TickTime::MillisecondTimestamp() {
#if _WIN32
- #ifdef USE_QUERY_PERFORMANCE_COUNTER
- LARGE_INTEGER qpfreq;
- QueryPerformanceFrequency(&qpfreq);
- return (now._ticks * 1000) / qpfreq.QuadPart;
- #else
- return now._ticks;
- #endif
+ #ifdef USE_QUERY_PERFORMANCE_COUNTER
+ LARGE_INTEGER qpfreq;
+ QueryPerformanceFrequency(&qpfreq);
+ return (ticks * 1000) / qpfreq.QuadPart;
+ #else
+ return ticks;
+ #endif
-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
- return now._ticks / 1000000LL;
+ return ticks / 1000000LL;
#else
- return now._ticks / 1000LL;
+ return ticks / 1000LL;
#endif
}
- inline WebRtc_Word64 TickTime::MicrosecondTimestamp()
- {
-@@ -222,17 +222,17 @@ inline WebRtc_Word64 TickTime::MicrosecondTimestamp()
+ inline WebRtc_Word64 TickTime::MicrosecondTimestamp() {
+ WebRtc_Word64 ticks = TickTime::Now().Ticks();
#if _WIN32
- #ifdef USE_QUERY_PERFORMANCE_COUNTER
- LARGE_INTEGER qpfreq;
- QueryPerformanceFrequency(&qpfreq);
- return (now._ticks * 1000) / (qpfreq.QuadPart/1000);
- #else
- return now._ticks *1000LL;
- #endif
+ #ifdef USE_QUERY_PERFORMANCE_COUNTER
+ LARGE_INTEGER qpfreq;
+ QueryPerformanceFrequency(&qpfreq);
+ return (ticks * 1000) / (qpfreq.QuadPart / 1000);
+ #else
+ return ticks * 1000LL;
+ #endif
-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
- return now._ticks / 1000LL;
+ return ticks / 1000LL;
#else
- return now._ticks;
+ return ticks;
#endif
}
- inline WebRtc_Word64 TickTime::Ticks() const
- {
-@@ -244,34 +244,34 @@ inline WebRtc_Word64 TickTime::MillisecondsToTicks(const WebRtc_Word64 ms)
+ inline WebRtc_Word64 TickTime::Ticks() const {
+ return ticks_;
+@@ -273,33 +273,33 @@ inline WebRtc_Word64 TickTime::MillisecondsToTicks(const WebRtc_Word64 ms) {
#if _WIN32
- #ifdef USE_QUERY_PERFORMANCE_COUNTER
- LARGE_INTEGER qpfreq;
- QueryPerformanceFrequency(&qpfreq);
- return (qpfreq.QuadPart * ms) / 1000;
- #else
- return ms;
- #endif
+ #ifdef USE_QUERY_PERFORMANCE_COUNTER
+ LARGE_INTEGER qpfreq;
+ QueryPerformanceFrequency(&qpfreq);
+ return (qpfreq.QuadPart * ms) / 1000;
+ #else
+ return ms;
+ #endif
-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
- return ms * 1000000LL;
+ return ms * 1000000LL;
#else
- return ms * 1000LL;
+ return ms * 1000LL;
#endif
}
- inline WebRtc_Word64 TickTime::TicksToMilliseconds(const WebRtc_Word64 ticks)
- {
+ inline WebRtc_Word64 TickTime::TicksToMilliseconds(const WebRtc_Word64 ticks) {
#if _WIN32
- #ifdef USE_QUERY_PERFORMANCE_COUNTER
- LARGE_INTEGER qpfreq;
- QueryPerformanceFrequency(&qpfreq);
- return (ticks * 1000) / qpfreq.QuadPart;
- #else
- return ticks;
- #endif
+ #ifdef USE_QUERY_PERFORMANCE_COUNTER
+ LARGE_INTEGER qpfreq;
+ QueryPerformanceFrequency(&qpfreq);
+ return (ticks * 1000) / qpfreq.QuadPart;
+ #else
+ return ticks;
+ #endif
-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
- return ticks / 1000000LL;
+ return ticks / 1000000LL;
#else
- return ticks / 1000LL;
+ return ticks / 1000LL;
#endif
}
- inline TickTime& TickTime::operator+=(const WebRtc_Word64& ticks)
- {
-@@ -294,17 +294,17 @@ inline WebRtc_Word64 TickInterval::Milliseconds() const
- #ifdef USE_QUERY_PERFORMANCE_COUNTER
- LARGE_INTEGER qpfreq;
- QueryPerformanceFrequency(&qpfreq);
- return (_interval * 1000) / qpfreq.QuadPart;
- #else
- // _interval is in ms
- return _interval;
- #endif
+ inline TickTime& TickTime::operator+=(const WebRtc_Word64& ticks) {
+ ticks_ += ticks;
+@@ -318,17 +318,17 @@ inline WebRtc_Word64 TickInterval::Milliseconds() const {
+ #ifdef USE_QUERY_PERFORMANCE_COUNTER
+ LARGE_INTEGER qpfreq;
+ QueryPerformanceFrequency(&qpfreq);
+ return (interval_ * 1000) / qpfreq.QuadPart;
+ #else
+ // interval_ is in ms
+ return interval_;
+ #endif
-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
- // _interval is in ns
- return _interval / 1000000;
+ // interval_ is in ns
+ return interval_ / 1000000;
#else
- // _interval is usecs
- return _interval / 1000;
+ // interval_ is usecs
+ return interval_ / 1000;
#endif
}
-@@ -314,17 +314,17 @@ inline WebRtc_Word64 TickInterval::Microseconds() const
- #ifdef USE_QUERY_PERFORMANCE_COUNTER
- LARGE_INTEGER qpfreq;
- QueryPerformanceFrequency(&qpfreq);
- return (_interval * 1000000) / qpfreq.QuadPart;
- #else
- // _interval is in ms
- return _interval *1000LL;
- #endif
+@@ -337,17 +337,17 @@ inline WebRtc_Word64 TickInterval::Microseconds() const {
+ #ifdef USE_QUERY_PERFORMANCE_COUNTER
+ LARGE_INTEGER qpfreq;
+ QueryPerformanceFrequency(&qpfreq);
+ return (interval_ * 1000000) / qpfreq.QuadPart;
+ #else
+ // interval_ is in ms
+ return interval_ * 1000LL;
+ #endif
-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
- // _interval is in ns
- return _interval / 1000;
+ // interval_ is in ns
+ return interval_ / 1000;
#else
- // _interval is usecs
- return _interval;
+ // interval_ is usecs
+ return interval_;
#endif
}
-diff --git media/webrtc/trunk/src/system_wrappers/source/aligned_malloc.cc media/webrtc/trunk/src/system_wrappers/source/aligned_malloc.cc
-index bb10c6b..4878d71 100644
---- media/webrtc/trunk/src/system_wrappers/source/aligned_malloc.cc
-+++ media/webrtc/trunk/src/system_wrappers/source/aligned_malloc.cc
-@@ -7,24 +7,21 @@
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
- #include "aligned_malloc.h"
-
- #include <assert.h>
- #include <memory.h>
--
--#ifdef WEBRTC_ANDROID
- #include <stdlib.h>
--#endif
-
- #if WEBRTC_MAC
- #include <malloc/malloc.h>
--#else
-+#elif WEBRTC_WIN
- #include <malloc.h>
- #endif
-
- #if _WIN32
- #include <windows.h>
- #else
- #include <stdint.h>
- #endif
-diff --git media/webrtc/trunk/src/system_wrappers/source/atomic32_posix.cc media/webrtc/trunk/src/system_wrappers/source/atomic32_posix.cc
+diff --git media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc
index 05b0e57..993456c 100644
---- media/webrtc/trunk/src/system_wrappers/source/atomic32_posix.cc
-+++ media/webrtc/trunk/src/system_wrappers/source/atomic32_posix.cc
+--- media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc
++++ media/webrtc/trunk/webrtc/system_wrappers/source/atomic32_posix.cc
@@ -7,17 +7,16 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
@@ -1576,14 +1496,14 @@ index 05b0e57..993456c 100644
namespace webrtc {
- Atomic32::Atomic32(WebRtc_Word32 initialValue) : _value(initialValue)
- {
- assert(Is32bitAligned());
-diff --git media/webrtc/trunk/src/system_wrappers/source/condition_variable.cc media/webrtc/trunk/src/system_wrappers/source/condition_variable.cc
+ Atomic32::Atomic32(WebRtc_Word32 initial_value)
+ : value_(initial_value) {
+ assert(Is32bitAligned());
+diff --git media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc
index b37d037..fcea221 100644
---- media/webrtc/trunk/src/system_wrappers/source/condition_variable.cc
-+++ media/webrtc/trunk/src/system_wrappers/source/condition_variable.cc
-@@ -3,35 +3,33 @@
+--- media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc
++++ media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable.cc
+@@ -3,31 +3,33 @@
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
@@ -1595,113 +1515,108 @@ index b37d037..fcea221 100644
+#include "condition_variable_wrapper.h"
+
#if defined(_WIN32)
- #include <windows.h>
-- #include "condition_variable_wrapper.h"
- #include "condition_variable_win.h"
--#elif defined(WEBRTC_LINUX)
-- #include <pthread.h>
-- #include "condition_variable_wrapper.h"
-- #include "condition_variable_posix.h"
--#elif defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL)
-+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL)
- #include <pthread.h>
-- #include "condition_variable_wrapper.h"
- #include "condition_variable_posix.h"
+ #include <windows.h>
+ #include "condition_variable_win.h"
+-#include "condition_variable_wrapper.h"
+-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
+ #include <pthread.h>
+ #include "condition_variable_posix.h"
+-#include "condition_variable_wrapper.h"
+#else
-+ #include <stddef.h> // for NULL
++#include <stddef.h> // for NULL
#endif
namespace webrtc {
- ConditionVariableWrapper*
- ConditionVariableWrapper::CreateConditionVariable()
- {
+
+ ConditionVariableWrapper* ConditionVariableWrapper::CreateConditionVariable() {
#if defined(_WIN32)
- return new ConditionVariableWindows;
--#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL)
-+#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL)
- return ConditionVariablePosix::Create();
+ return new ConditionVariableWindows;
+-#elif defined(WEBRTC_LINUX) || defined(WEBRTC_MAC)
++#elif defined(WEBRTC_LINUX) || defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
+ return ConditionVariablePosix::Create();
#else
- return NULL;
+ return NULL;
#endif
}
+
} // namespace webrtc
-diff --git media/webrtc/trunk/src/system_wrappers/source/condition_variable_posix.cc media/webrtc/trunk/src/system_wrappers/source/condition_variable_posix.cc
+diff --git media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc
index 48835ab..16c6033 100644
---- media/webrtc/trunk/src/system_wrappers/source/condition_variable_posix.cc
-+++ media/webrtc/trunk/src/system_wrappers/source/condition_variable_posix.cc
-@@ -90,17 +90,17 @@ void ConditionVariablePosix::SleepCS(CriticalSectionWrapper& critSect)
- bool
- ConditionVariablePosix::SleepCS(
- CriticalSectionWrapper& critSect,
- unsigned long maxTimeInMS)
- {
- const unsigned long INFINITE = 0xFFFFFFFF;
+--- media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc
++++ media/webrtc/trunk/webrtc/system_wrappers/source/condition_variable_posix.cc
+@@ -74,17 +74,17 @@ void ConditionVariablePosix::SleepCS(CriticalSectionWrapper& crit_sect) {
+ &crit_sect);
+ pthread_cond_wait(&cond_, &cs->mutex_);
+ }
- const int MILLISECONDS_PER_SECOND = 1000;
+ bool ConditionVariablePosix::SleepCS(CriticalSectionWrapper& crit_sect,
+ unsigned long max_time_inMS) {
+ const unsigned long INFINITE = 0xFFFFFFFF;
+ const int MILLISECONDS_PER_SECOND = 1000;
-#ifndef WEBRTC_LINUX
+#if !defined(WEBRTC_LINUX) && !defined(WEBRTC_BSD)
- const int MICROSECONDS_PER_MILLISECOND = 1000;
+ const int MICROSECONDS_PER_MILLISECOND = 1000;
#endif
- const int NANOSECONDS_PER_SECOND = 1000000000;
- const int NANOSECONDS_PER_MILLISECOND = 1000000;
+ const int NANOSECONDS_PER_SECOND = 1000000000;
+ const int NANOSECONDS_PER_MILLISECOND = 1000000;
- CriticalSectionPosix* cs = reinterpret_cast<CriticalSectionPosix*>(
- &critSect);
+ CriticalSectionPosix* cs = reinterpret_cast<CriticalSectionPosix*>(
+ &crit_sect);
-diff --git media/webrtc/trunk/src/system_wrappers/source/cpu.cc media/webrtc/trunk/src/system_wrappers/source/cpu.cc
+diff --git media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc
index 3df5d18..4cd3ddf 100644
---- media/webrtc/trunk/src/system_wrappers/source/cpu.cc
-+++ media/webrtc/trunk/src/system_wrappers/source/cpu.cc
-@@ -11,28 +11,28 @@
- #include "cpu_wrapper.h"
+--- media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc
++++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu.cc
+@@ -9,28 +9,28 @@
+ */
+
+ #include "system_wrappers/interface/cpu_wrapper.h"
#if defined(_WIN32)
- #include "cpu_win.h"
+ #include "cpu_win.h"
#elif defined(WEBRTC_MAC)
- #include "cpu_mac.h"
- #elif defined(WEBRTC_MAC_INTEL)
- #include "cpu_mac.h"
+ #include "cpu_mac.h"
-#elif defined(WEBRTC_ANDROID)
+#elif defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD)
- // Not implemented yet, might be possible to use Linux implementation
+ // Not implemented yet, might be possible to use Linux implementation
#else // defined(WEBRTC_LINUX)
- #include "cpu_linux.h"
+ #include "cpu_linux.h"
#endif
namespace webrtc {
- CpuWrapper* CpuWrapper::CreateCpu()
- {
+ CpuWrapper* CpuWrapper::CreateCpu() {
#if defined(_WIN32)
- return new CpuWindows();
- #elif (defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL))
- return new CpuWrapperMac();
+ return new CpuWindows();
+ #elif defined(WEBRTC_MAC)
+ return new CpuWrapperMac();
-#elif defined(WEBRTC_ANDROID)
+#elif defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD)
- return 0;
+ return 0;
#else
- return new CpuLinux();
+ return new CpuLinux();
#endif
}
- } // namespace webrtc
-diff --git media/webrtc/trunk/src/system_wrappers/source/cpu_info.cc media/webrtc/trunk/src/system_wrappers/source/cpu_info.cc
+
+ } // namespace webrtc
+diff --git media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc
index e367abf..e14d7af 100644
---- media/webrtc/trunk/src/system_wrappers/source/cpu_info.cc
-+++ media/webrtc/trunk/src/system_wrappers/source/cpu_info.cc
-@@ -7,25 +7,27 @@
+--- media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc
++++ media/webrtc/trunk/webrtc/system_wrappers/source/cpu_info.cc
+@@ -7,23 +7,25 @@
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
- #include "cpu_info.h"
+ #include "system_wrappers/interface/cpu_info.h"
#if defined(_WIN32)
#include <Windows.h>
-#elif defined(WEBRTC_MAC)
+-#include <sys/sysctl.h>
+#elif defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
#include <sys/types.h>
- #include <sys/sysctl.h>
- #elif defined(WEBRTC_MAC_INTEL)
- // Intentionally empty
++#include <sys/sysctl.h>
#elif defined(WEBRTC_ANDROID)
// Not implemented yet, might be possible to use Linux implementation
-#else // defined(WEBRTC_LINUX)
@@ -1715,65 +1630,63 @@ index e367abf..e14d7af 100644
namespace webrtc {
- WebRtc_UWord32 CpuInfo::_numberOfCores = 0;
+ WebRtc_UWord32 CpuInfo::number_of_cores_ = 0;
-@@ -40,31 +42,40 @@ WebRtc_UWord32 CpuInfo::DetectNumberOfCores()
- WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
- "Available number of cores:%d", _numberOfCores);
+@@ -36,29 +38,38 @@ WebRtc_UWord32 CpuInfo::DetectNumberOfCores() {
+ WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
+ "Available number of cores:%d", number_of_cores_);
#elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID)
- _numberOfCores = get_nprocs();
- WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
- "Available number of cores:%d", _numberOfCores);
-
--#elif (defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL))
-- int name[] = {CTL_HW, HW_AVAILCPU};
-+#elif (defined(WEBRTC_BSD) || defined(WEBRTC_MAC) || defined(WEBRTC_MAC_INTEL))
-+ int name[] = {
-+ CTL_HW,
+ number_of_cores_ = get_nprocs();
+ WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
+ "Available number of cores:%d", number_of_cores_);
+
+-#elif defined(WEBRTC_MAC)
+- int name[] = {CTL_HW, HW_AVAILCPU};
++#elif defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
++ int name[] = {
++ CTL_HW,
+#ifdef HW_AVAILCPU
-+ HW_AVAILCPU,
++ HW_AVAILCPU,
+#else
-+ HW_NCPU,
++ HW_NCPU,
+#endif
-+ };
- int ncpu;
- size_t size = sizeof(ncpu);
- if(0 == sysctl(name, 2, &ncpu, &size, NULL, 0))
- {
- _numberOfCores = static_cast<WebRtc_UWord32>(ncpu);
- WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
- "Available number of cores:%d", _numberOfCores);
- } else
- {
- WEBRTC_TRACE(kTraceError, kTraceUtility, -1,
- "Failed to get number of cores");
- _numberOfCores = 1;
++ };
+ int ncpu;
+ size_t size = sizeof(ncpu);
+ if (0 == sysctl(name, 2, &ncpu, &size, NULL, 0)) {
+ number_of_cores_ = static_cast<WebRtc_UWord32>(ncpu);
+ WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
+ "Available number of cores:%d", number_of_cores_);
+ } else {
+ WEBRTC_TRACE(kTraceError, kTraceUtility, -1,
+ "Failed to get number of cores");
+ number_of_cores_ = 1;
}
+#elif defined(_SC_NPROCESSORS_ONLN)
-+ _numberOfCores = sysconf(_SC_NPROCESSORS_ONLN);
++ _numberOfCores = sysconf(_SC_NPROCESSORS_ONLN);
#else
- WEBRTC_TRACE(kTraceWarning, kTraceUtility, -1,
- "No function to get number of cores");
- _numberOfCores = 1;
+ WEBRTC_TRACE(kTraceWarning, kTraceUtility, -1,
+ "No function to get number of cores");
+ number_of_cores_ = 1;
#endif
- }
- return _numberOfCores;
+ }
+ return number_of_cores_;
}
-diff --git media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc
+diff --git media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc
index 6334490..852ebaa 100644
---- media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc
-+++ media/webrtc/trunk/src/system_wrappers/source/thread_posix.cc
-@@ -53,16 +53,25 @@
+--- media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc
++++ media/webrtc/trunk/webrtc/system_wrappers/source/thread_posix.cc
+@@ -54,16 +54,27 @@
+ #ifdef WEBRTC_LINUX
+ #include <sys/types.h>
#include <sched.h>
#include <sys/syscall.h>
#include <linux/unistd.h>
#include <sys/prctl.h>
#endif
- #if defined(WEBRTC_MAC)
- #include <mach/mach.h>
-+#elif defined(__NetBSD__)
++#if defined(__NetBSD__)
+#include <lwp.h>
+#elif defined(__FreeBSD__)
+#include <sys/param.h>
@@ -1782,23 +1695,25 @@ index 6334490..852ebaa 100644
+
+#if defined(WEBRTC_BSD) && !defined(__NetBSD__)
+#include <pthread_np.h>
- #endif
-
- #include "system_wrappers/interface/critical_section_wrapper.h"
- #include "system_wrappers/interface/event_wrapper.h"
- #include "system_wrappers/interface/trace.h"
++#endif
++
+ #include "webrtc/system_wrappers/interface/critical_section_wrapper.h"
+ #include "webrtc/system_wrappers/interface/event_wrapper.h"
+ #include "webrtc/system_wrappers/interface/trace.h"
namespace webrtc {
- extern "C"
-@@ -116,16 +125,30 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, ThreadObj obj,
- }
+
+ int ConvertToSystemPriority(ThreadPriority priority, int min_prio,
+ int max_prio) {
+@@ -136,16 +147,30 @@ ThreadPosix::ThreadPosix(ThreadRunFunction func, ThreadObj obj,
+ }
}
uint32_t ThreadWrapper::GetThreadId() {
#if defined(WEBRTC_ANDROID) || defined(WEBRTC_LINUX)
return static_cast<uint32_t>(syscall(__NR_gettid));
- #elif defined(WEBRTC_MAC)
- return static_cast<uint32_t>(mach_thread_self());
+ #elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
+ return pthread_mach_thread_np(pthread_self());
+#elif defined(__NetBSD__)
+ return _lwp_self();
+#elif defined(__DragonFly__)
@@ -1818,41 +1733,43 @@ index 6334490..852ebaa 100644
#endif
}
- int ThreadPosix::Construct()
- {
- int result = 0;
-@@ -154,16 +177,17 @@ ThreadPosix::~ThreadPosix()
- {
- pthread_attr_destroy(&_attr);
- delete _event;
- delete _crit_state;
+ int ThreadPosix::Construct() {
+ int result = 0;
+ #if !defined(WEBRTC_ANDROID)
+@@ -167,17 +192,17 @@ int ThreadPosix::Construct() {
}
- #define HAS_THREAD_ID !defined(MAC_IPHONE) && !defined(MAC_IPHONE_SIM) && \
- !defined(WEBRTC_MAC) && !defined(WEBRTC_MAC_INTEL) && \
-+ !defined(WEBRTC_BSD) && \
- !defined(MAC_DYLIB) && !defined(MAC_INTEL_DYLIB)
- #if HAS_THREAD_ID
- bool ThreadPosix::Start(unsigned int& threadID)
- #else
- bool ThreadPosix::Start(unsigned int& /*threadID*/)
- #endif
+ ThreadPosix::~ThreadPosix() {
+ pthread_attr_destroy(&attr_);
+ delete event_;
+ delete crit_state_;
+ }
+
+-#define HAS_THREAD_ID !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC)
++#define HAS_THREAD_ID !defined(WEBRTC_IOS) && !defined(WEBRTC_MAC) && !defined(WEBRTC_BSD)
+
+ bool ThreadPosix::Start(unsigned int& thread_id)
{
- if (!_runFunction)
-@@ -229,31 +253,39 @@ bool ThreadPosix::Start(unsigned int& /*threadID*/)
- {
- return false;
- }
- return true;
+ if (!run_function_) {
+ return false;
+ }
+ int result = pthread_attr_setdetachstate(&attr_, PTHREAD_CREATE_DETACHED);
+ // Set the stack stack size to 1M.
+@@ -232,31 +257,40 @@ bool ThreadPosix::Start(unsigned int& thread_id)
+ WEBRTC_TRACE(kTraceError, kTraceUtility, -1,
+ "unable to set thread priority");
+ }
+ return true;
}
// CPU_ZERO and CPU_SET are not available in NDK r7, so disable
// SetAffinity on Android for now.
-#if (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)))
-+#if defined(__FreeBSD__) || (defined(WEBRTC_LINUX) && (!defined(WEBRTC_ANDROID)))
- bool ThreadPosix::SetAffinity(const int* processorNumbers,
- const unsigned int amountOfProcessors) {
- if (!processorNumbers || (amountOfProcessors == 0)) {
++#if defined(__FreeBSD__) || (defined(WEBRTC_LINUX) && \
++ (!defined(WEBRTC_ANDROID)))
+ bool ThreadPosix::SetAffinity(const int* processor_numbers,
+ const unsigned int amount_of_processors) {
+ if (!processor_numbers || (amount_of_processors == 0)) {
return false;
}
+#if defined(__FreeBSD__)
@@ -1863,72 +1780,95 @@ index 6334490..852ebaa 100644
CPU_ZERO(&mask);
for (unsigned int processor = 0;
- processor < amountOfProcessors;
- processor++) {
- CPU_SET(processorNumbers[processor], &mask);
+ processor < amount_of_processors;
+ ++processor) {
+ CPU_SET(processor_numbers[processor], &mask);
}
-#if defined(WEBRTC_ANDROID)
+#if defined(__FreeBSD__)
-+ const int result = pthread_setaffinity_np(_thread,
++ const int result = pthread_setaffinity_np(thread_,
+ sizeof(mask),
+ &mask);
+#elif defined(WEBRTC_ANDROID)
// Android.
const int result = syscall(__NR_sched_setaffinity,
- _pid,
+ pid_,
sizeof(mask),
&mask);
#else
// "Normal" Linux.
- const int result = sched_setaffinity(_pid,
-@@ -340,16 +372,20 @@ void ThreadPosix::Run()
+ const int result = sched_setaffinity(pid_,
+@@ -320,16 +353,20 @@ void ThreadPosix::Run() {
+ pid_ = GetThreadId();
#endif
- // The event the Start() is waiting for.
- _event->Set();
+ // The event the Start() is waiting for.
+ event_->Set();
- if (_setThreadName)
- {
+ if (set_thread_name_) {
#ifdef WEBRTC_LINUX
- prctl(PR_SET_NAME, (unsigned long)_name, 0, 0, 0);
+ prctl(PR_SET_NAME, (unsigned long)name_, 0, 0, 0);
+#elif defined(__NetBSD__)
-+ pthread_setname_np(pthread_self(), "%s", (void *)_name);
++ pthread_setname_np(pthread_self(), "%s", (void *)name_);
+#elif defined(WEBRTC_BSD)
-+ pthread_set_name_np(pthread_self(), _name);
++ pthread_set_name_np(pthread_self(), name_);
#endif
- WEBRTC_TRACE(kTraceStateInfo, kTraceUtility,-1,
- "Thread with name:%s started ", _name);
- } else
- {
- WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
- "Thread without name started");
- }
-diff --git media/webrtc/trunk/src/system_wrappers/source/trace_posix.cc media/webrtc/trunk/src/system_wrappers/source/trace_posix.cc
-index f3a5306..d9c2810 100644
---- media/webrtc/trunk/src/system_wrappers/source/trace_posix.cc
-+++ media/webrtc/trunk/src/system_wrappers/source/trace_posix.cc
-@@ -52,17 +52,17 @@ WebRtc_Word32 TracePosix::AddTime(char* traceMessage,
- {
- struct timeval systemTimeHighRes;
- if (gettimeofday(&systemTimeHighRes, 0) == -1)
- {
- return -1;
- }
- struct tm buffer;
- const struct tm* systemTime =
-- localtime_r(&systemTimeHighRes.tv_sec, &buffer);
-+ localtime_r((const time_t *)(&systemTimeHighRes.tv_sec), &buffer);
-
- const WebRtc_UWord32 ms_time = systemTimeHighRes.tv_usec / 1000;
- WebRtc_UWord32 prevTickCount = 0;
- if (level == kTraceApiCall)
- {
- prevTickCount = _prevTickCount;
- _prevTickCount = ms_time;
- } else {
-diff --git media/webrtc/trunk/src/video_engine/vie_defines.h media/webrtc/trunk/src/video_engine/vie_defines.h
+ WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
+ "Thread with name:%s started ", name_);
+ } else {
+ WEBRTC_TRACE(kTraceStateInfo, kTraceUtility, -1,
+ "Thread without name started");
+ }
+ bool alive = true;
+diff --git media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc
+index 2c7e59a..6f23fcb 100644
+--- media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc
++++ media/webrtc/trunk/webrtc/system_wrappers/source/trace_posix.cc
+@@ -49,17 +49,17 @@ TracePosix::~TracePosix() {
+ WebRtc_Word32 TracePosix::AddTime(char* trace_message,
+ const TraceLevel level) const {
+ struct timeval system_time_high_res;
+ if (gettimeofday(&system_time_high_res, 0) == -1) {
+ return -1;
+ }
+ struct tm buffer;
+ const struct tm* system_time =
+- localtime_r(&system_time_high_res.tv_sec, &buffer);
++ localtime_r((const time_t *)(&system_time_high_res.tv_sec), &buffer);
+
+ const WebRtc_UWord32 ms_time = system_time_high_res.tv_usec / 1000;
+ WebRtc_UWord32 prev_tickCount = 0;
+ if (level == kTraceApiCall) {
+ prev_tickCount = prev_tick_count_;
+ prev_tick_count_ = ms_time;
+ } else {
+ prev_tickCount = prev_api_tick_count_;
+diff --git media/webrtc/trunk/webrtc/typedefs.h media/webrtc/trunk/webrtc/typedefs.h
+index 6334490..852ebaa 100644
+--- media/webrtc/trunk/webrtc/typedefs.h
++++ media/webrtc/trunk/webrtc/typedefs.h
+@@ -16,17 +16,17 @@
+
+ // Reserved words definitions
+ // TODO(andrew): Remove this.
+ #define G_CONST const
+
+ // For access to standard POSIXish features, use WEBRTC_POSIX instead of a
+ // more specific macro.
+ #if defined(WEBRTC_MAC) || defined(WEBRTC_LINUX) || \
+- defined(WEBRTC_ANDROID)
++ defined(WEBRTC_ANDROID) || defined(WEBRTC_BSD)
+ #define WEBRTC_POSIX
+ #endif
+
+ // Processor architecture detection. For more info on what's defined, see:
+ // http://msdn.microsoft.com/en-us/library/b0084kay.aspx
+ // http://www.agner.org/optimize/calling_conventions.pdf
+ // or with gcc, run: "echo | gcc -E -dM -"
+ // TODO(andrew): replace WEBRTC_LITTLE_ENDIAN with WEBRTC_ARCH_LITTLE_ENDIAN.
+diff --git media/webrtc/trunk/webrtc/video_engine/vie_defines.h media/webrtc/trunk/webrtc/video_engine/vie_defines.h
index 2cc18cc7..2c042a0 100644
---- media/webrtc/trunk/src/video_engine/vie_defines.h
-+++ media/webrtc/trunk/src/video_engine/vie_defines.h
+--- media/webrtc/trunk/webrtc/video_engine/vie_defines.h
++++ media/webrtc/trunk/webrtc/video_engine/vie_defines.h
@@ -168,17 +168,17 @@ inline int ChannelId(const int moduleId) {
// Example: "Oct 10 2002 12:05:30 r".
@@ -1948,10 +1888,10 @@ index 2cc18cc7..2c042a0 100644
#elif defined(NDEBUG)
#define BUILDMODE "r"
#else
-diff --git media/webrtc/trunk/src/voice_engine/voe_network_impl.cc media/webrtc/trunk/src/voice_engine/voe_network_impl.cc
+diff --git media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc
index 174abca..f8a2b2d 100644
---- media/webrtc/trunk/src/voice_engine/voe_network_impl.cc
-+++ media/webrtc/trunk/src/voice_engine/voe_network_impl.cc
+--- media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc
++++ media/webrtc/trunk/webrtc/voice_engine/voe_network_impl.cc
@@ -467,17 +467,17 @@ int VoENetworkImpl::SetSendTOS(int channel,
int DSCP,
int priority,
@@ -2009,11 +1949,11 @@ index 174abca..f8a2b2d 100644
if (!_shared->statistics().Initialized())
{
_shared->SetLastError(VE_NOT_INITED, kTraceError);
-diff --git media/webrtc/trunk/src/voice_engine/voice_engine_defines.h media/webrtc/trunk/src/voice_engine/voice_engine_defines.h
+diff --git media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h
index 7d4c729..4104719 100644
---- media/webrtc/trunk/src/voice_engine/voice_engine_defines.h
-+++ media/webrtc/trunk/src/voice_engine/voice_engine_defines.h
-@@ -437,41 +437,44 @@ namespace webrtc
+--- media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h
++++ media/webrtc/trunk/webrtc/voice_engine/voice_engine_defines.h
+@@ -409,41 +409,43 @@ namespace webrtc
#else
#define ANDROID_NOT_SUPPORTED(stat)
@@ -2040,17 +1980,16 @@ index 7d4c729..4104719 100644
#include <sched.h>
#include <sys/time.h>
#include <time.h>
-+
-+#ifdef WEBRTC_MAC
++#if !defined(WEBRTC_BSD)
#include <AudioUnit/AudioUnit.h>
- #if !defined(MAC_IPHONE) && !defined(MAC_IPHONE_SIM)
+ #if !defined(WEBRTC_IOS)
#include <CoreServices/CoreServices.h>
#include <CoreAudio/CoreAudio.h>
#include <AudioToolbox/DefaultAudioOutput.h>
#include <AudioToolbox/AudioConverter.h>
#include <CoreAudio/HostTime.h>
#endif
-+#endif // WEBRTC_MAC
++#endif
#define DWORD unsigned long int
#define WINAPI
@@ -2059,15 +1998,15 @@ index 7d4c729..4104719 100644
#define TRUE 1
#define SOCKADDR_IN struct sockaddr_in
#define UINT unsigned int
-@@ -579,13 +582,13 @@ namespace webrtc
+@@ -526,13 +528,13 @@ namespace webrtc
// Defines
// ----------------------------------------------------------------------------
- #define IPHONE_NOT_SUPPORTED()
+ #define IPHONE_NOT_SUPPORTED(stat)
#endif
#else
- #define IPHONE_NOT_SUPPORTED()
+ #define IPHONE_NOT_SUPPORTED(stat)
-#endif // #ifdef WEBRTC_MAC
+#endif // #if defined(WEBRTC_BSD) || defined(WEBRTC_MAC)
@@ -2093,10 +2032,10 @@ index 6f4eb9e..5f044ad 100644
{
'target_name': 'libyuv',
'type': 'static_library',
+ # 'type': 'shared_library',
'conditions': [
['use_system_libjpeg==0', {
- 'dependencies': [
-@@ -43,16 +44,21 @@
+@@ -45,16 +46,21 @@
],
'direct_dependent_settings': {
'include_dirs': [
@@ -2140,7 +2079,7 @@ index 338d0b7..2241d41 100644
generator_default_variables = {
}
-@@ -111,30 +112,44 @@ endif
+@@ -107,30 +108,44 @@ endif
def ensure_directory_exists(path):
dir = os.path.dirname(path)
diff --git a/www/firefox/files/patch-bug824317 b/www/firefox/files/patch-bug824317
index 9568450015d5..71927d593caf 100644
--- a/www/firefox/files/patch-bug824317
+++ b/www/firefox/files/patch-bug824317
@@ -2,13 +2,15 @@ diff --git a/xpcom/string/public/nsAlgorithm.h b/xpcom/string/public/nsAlgorithm
index fa50194a..c5f5737 100644
--- xpcom/string/public/nsAlgorithm.h
+++ xpcom/string/public/nsAlgorithm.h
-@@ -42,7 +42,8 @@ NS_MAX( const T& a, const T& b )
+@@ -42,7 +42,10 @@ NS_MAX( const T& a, const T& b )
return a > b ? a : b;
}
-#if defined(_MSC_VER) && (_MSC_VER < 1600)
+#if (defined(_MSC_VER) && (_MSC_VER < 1600)) || \
-+ (defined(_GLIBCXX_USE_LONG_LONG) && (!_GLIBCXX_USE_C99 || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC))
++ ((defined(__GLIBCXX__) && __GLIBCXX__ < 20121005) && \
++ (defined(_GLIBCXX_USE_LONG_LONG) && \
++ (!_GLIBCXX_USE_C99 || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC)))
namespace std {
inline
long long
diff --git a/www/firefox/files/patch-bug826985 b/www/firefox/files/patch-bug826985
index e7df887723f7..d15ab05562d1 100644
--- a/www/firefox/files/patch-bug826985
+++ b/www/firefox/files/patch-bug826985
@@ -6,9 +6,9 @@ Date: Fri Jan 4 13:49:22 2013 +0100
---
configure.in | 7 +++++++
media/webrtc/signaling/test/Makefile.in | 1 +
- .../modules/video_capture/main/source/Linux/device_info_linux.cc | 17 +++++++++++++++++
- .../modules/video_capture/main/source/Linux/video_capture_linux.cc | 16 +++++++++++++++-
- .../webrtc/modules/video_capture/main/source/video_capture.gypi | 11 +++++++++++
+ .../modules/video_capture/linux/device_info_linux.cc | 17 +++++++++++++++++
+ .../modules/video_capture/linux/video_capture_linux.cc | 16 +++++++++++++++-
+ .../webrtc/modules/video_capture/video_capture.gypi | 11 +++++++++++
toolkit/library/Makefile.in | 1 +
6 files changed, 52 insertions(+), 1 deletion(-)
@@ -16,7 +16,7 @@ diff --git configure.in configure.in
index 55e4cd1..76567b3 100644
--- configure.in
+++ configure.in
-@@ -5238,6 +5238,9 @@ if test -n "$MOZ_WEBRTC"; then
+@@ -5250,6 +5250,9 @@ if test -n "$MOZ_WEBRTC"; then
MOZ_VP8_ENCODER=1
MOZ_VP8_ERROR_CONCEALMENT=1
@@ -49,10 +49,10 @@ index b483cd1..f1dd1f0 100644
$(DEPTH)/xpcom/glue/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
$(DEPTH)/media/mtransport/standalone/$(LIB_PREFIX)mtransport_s.$(LIB_SUFFIX) \
$(DEPTH)/media/webrtc/signalingtest/signaling_ecc/$(LIB_PREFIX)ecc.$(LIB_SUFFIX) \
-diff --git media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
index 239a292..bab496c 100644
---- media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc
-+++ media/webrtc/trunk/src/modules/video_capture/main/source/Linux/device_info_linux.cc
+--- media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/device_info_linux.cc
@@ -26,11 +26,23 @@
#else
#include <linux/videodev2.h>
@@ -89,10 +89,10 @@ index 239a292..bab496c 100644
if (deviceNameLength >= strlen(cameraName))
{
memcpy(deviceNameUTF8, cameraName, strlen(cameraName));
-diff --git media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
index 12df1b3..e9863ba 100644
---- media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc
-+++ media/webrtc/trunk/src/modules/video_capture/main/source/Linux/video_capture_linux.cc
+--- media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
++++ media/webrtc/trunk/webrtc/modules/video_capture/linux/video_capture_linux.cc
@@ -25,6 +25,9 @@
#else
#include <linux/videodev2.h>
@@ -119,10 +119,10 @@ index 12df1b3..e9863ba 100644
namespace webrtc
{
namespace videocapturemodule
-diff --git media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
+diff --git media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
index d46b5aa..e452223 100644
---- media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
-+++ media/webrtc/trunk/src/modules/video_capture/main/source/video_capture.gypi
+--- media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
++++ media/webrtc/trunk/webrtc/modules/video_capture/video_capture.gypi
@@ -7,6 +7,9 @@
# be found in the AUTHORS file in the root of the source tree.
diff --git a/www/firefox/files/patch-bug827521 b/www/firefox/files/patch-bug827521
deleted file mode 100644
index a9f76176c801..000000000000
--- a/www/firefox/files/patch-bug827521
+++ /dev/null
@@ -1,147 +0,0 @@
-commit ab46441
-Author: Graeme McCutcheon <graememcc_firefox@graeme-online.co.uk>
-Date: Thu Jan 10 14:37:30 2013 +0000
-
- Bug 827521 - Work around spurious operator ambiguity errors in buggy versions of Clang. r=longsonr
----
- .../svg/content/src/SVGAnimatedPreserveAspectRatio.cpp | 17 ++++++++---------
- .../svg/content/src/SVGAnimatedPreserveAspectRatio.h | 7 +++----
- content/svg/content/src/SVGPreserveAspectRatio.h | 17 +++++++++++++----
- 3 files changed, 24 insertions(+), 17 deletions(-)
-
-diff --git content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp
-index 6593461..56956b2 100644
---- content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp
-+++ content/svg/content/src/SVGAnimatedPreserveAspectRatio.cpp
-@@ -54,7 +54,7 @@ GetAlignForString(const nsAString &aAlignString)
- {
- for (uint32_t i = 0 ; i < ArrayLength(sAlignStrings) ; i++) {
- if (aAlignString.EqualsASCII(sAlignStrings[i])) {
-- return (i + SVG_PRESERVEASPECTRATIO_NONE);
-+ return (i + SVG_ALIGN_MIN_VALID);
- }
- }
-
-@@ -65,12 +65,11 @@ static void
- GetAlignString(nsAString& aAlignString, uint16_t aAlign)
- {
- NS_ASSERTION(
-- aAlign >= SVG_PRESERVEASPECTRATIO_NONE &&
-- aAlign <= SVG_PRESERVEASPECTRATIO_XMAXYMAX,
-+ aAlign >= SVG_ALIGN_MIN_VALID && aAlign <= SVG_ALIGN_MAX_VALID,
- "Unknown align");
-
- aAlignString.AssignASCII(
-- sAlignStrings[aAlign - SVG_PRESERVEASPECTRATIO_NONE]);
-+ sAlignStrings[aAlign - SVG_ALIGN_MIN_VALID]);
- }
-
- static uint16_t
-@@ -78,7 +77,7 @@ GetMeetOrSliceForString(const nsAString &aMeetOrSlice)
- {
- for (uint32_t i = 0 ; i < ArrayLength(sMeetOrSliceStrings) ; i++) {
- if (aMeetOrSlice.EqualsASCII(sMeetOrSliceStrings[i])) {
-- return (i + SVG_MEETORSLICE_MEET);
-+ return (i + SVG_MEETORSLICE_MIN_VALID);
- }
- }
-
-@@ -89,12 +88,12 @@ static void
- GetMeetOrSliceString(nsAString& aMeetOrSliceString, uint16_t aMeetOrSlice)
- {
- NS_ASSERTION(
-- aMeetOrSlice >= SVG_MEETORSLICE_MEET &&
-- aMeetOrSlice <= SVG_MEETORSLICE_SLICE,
-+ aMeetOrSlice >= SVG_MEETORSLICE_MIN_VALID &&
-+ aMeetOrSlice <= SVG_MEETORSLICE_MAX_VALID,
- "Unknown meetOrSlice");
-
- aMeetOrSliceString.AssignASCII(
-- sMeetOrSliceStrings[aMeetOrSlice - SVG_MEETORSLICE_MEET]);
-+ sMeetOrSliceStrings[aMeetOrSlice - SVG_MEETORSLICE_MIN_VALID]);
- }
-
- already_AddRefed<DOMSVGPreserveAspectRatio>
-@@ -226,7 +225,7 @@ SVGAnimatedPreserveAspectRatio::GetBaseValueString(
- GetAlignString(tmpString, mBaseVal.mAlign);
- aValueAsString.Append(tmpString);
-
-- if (mBaseVal.mAlign != SVG_PRESERVEASPECTRATIO_NONE) {
-+ if (mBaseVal.mAlign != uint8_t(SVG_PRESERVEASPECTRATIO_NONE)) {
-
- aValueAsString.AppendLiteral(" ");
- GetMeetOrSliceString(tmpString, mBaseVal.mMeetOrSlice);
-diff --git content/svg/content/src/SVGAnimatedPreserveAspectRatio.h content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
-index 61cfba7..b08fb60 100644
---- content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
-+++ content/svg/content/src/SVGAnimatedPreserveAspectRatio.h
-@@ -42,8 +42,7 @@ public:
- void SetBaseValue(const SVGPreserveAspectRatio &aValue,
- nsSVGElement *aSVGElement);
- nsresult SetBaseAlign(uint16_t aAlign, nsSVGElement *aSVGElement) {
-- if (aAlign < SVG_PRESERVEASPECTRATIO_NONE ||
-- aAlign > SVG_PRESERVEASPECTRATIO_XMAXYMAX) {
-+ if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID) {
- return NS_ERROR_FAILURE;
- }
- SetBaseValue(SVGPreserveAspectRatio(
-@@ -53,8 +52,8 @@ public:
- return NS_OK;
- }
- nsresult SetBaseMeetOrSlice(uint16_t aMeetOrSlice, nsSVGElement *aSVGElement) {
-- if (aMeetOrSlice < SVG_MEETORSLICE_MEET ||
-- aMeetOrSlice > SVG_MEETORSLICE_SLICE) {
-+ if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID ||
-+ aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID) {
- return NS_ERROR_FAILURE;
- }
- SetBaseValue(SVGPreserveAspectRatio(
-diff --git content/svg/content/src/SVGPreserveAspectRatio.h content/svg/content/src/SVGPreserveAspectRatio.h
-index 066ad52..ebe724e 100644
---- content/svg/content/src/SVGPreserveAspectRatio.h
-+++ content/svg/content/src/SVGPreserveAspectRatio.h
-@@ -28,6 +28,11 @@ enum SVGAlign MOZ_ENUM_TYPE(uint8_t) {
- SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10
- };
-
-+// These constants represent the range of valid enum values for the <align>
-+// parameter. They exclude the sentinel _UNKNOWN value.
-+const uint16_t SVG_ALIGN_MIN_VALID = SVG_PRESERVEASPECTRATIO_NONE;
-+const uint16_t SVG_ALIGN_MAX_VALID = SVG_PRESERVEASPECTRATIO_XMAXYMAX;
-+
- // Meet-or-slice Types
- enum SVGMeetOrSlice MOZ_ENUM_TYPE(uint8_t) {
- SVG_MEETORSLICE_UNKNOWN = 0,
-@@ -35,6 +40,11 @@ enum SVGMeetOrSlice MOZ_ENUM_TYPE(uint8_t) {
- SVG_MEETORSLICE_SLICE = 2
- };
-
-+// These constants represent the range of valid enum values for the
-+// <meetOrSlice> parameter. They exclude the sentinel _UNKNOWN value.
-+const uint16_t SVG_MEETORSLICE_MIN_VALID = SVG_MEETORSLICE_MEET;
-+const uint16_t SVG_MEETORSLICE_MAX_VALID = SVG_MEETORSLICE_SLICE;
-+
- class SVGAnimatedPreserveAspectRatio;
-
- class SVGPreserveAspectRatio MOZ_FINAL
-@@ -57,8 +67,7 @@ public:
- {}
-
- nsresult SetAlign(uint16_t aAlign) {
-- if (aAlign < SVG_PRESERVEASPECTRATIO_NONE ||
-- aAlign > SVG_PRESERVEASPECTRATIO_XMAXYMAX)
-+ if (aAlign < SVG_ALIGN_MIN_VALID || aAlign > SVG_ALIGN_MAX_VALID)
- return NS_ERROR_FAILURE;
- mAlign = static_cast<uint8_t>(aAlign);
- return NS_OK;
-@@ -69,8 +78,8 @@ public:
- }
-
- nsresult SetMeetOrSlice(uint16_t aMeetOrSlice) {
-- if (aMeetOrSlice < SVG_MEETORSLICE_MEET ||
-- aMeetOrSlice > SVG_MEETORSLICE_SLICE)
-+ if (aMeetOrSlice < SVG_MEETORSLICE_MIN_VALID ||
-+ aMeetOrSlice > SVG_MEETORSLICE_MAX_VALID)
- return NS_ERROR_FAILURE;
- mMeetOrSlice = static_cast<uint8_t>(aMeetOrSlice);
- return NS_OK;
diff --git a/www/firefox/files/patch-bug828003 b/www/firefox/files/patch-bug828003
deleted file mode 100644
index 3ec412894f74..000000000000
--- a/www/firefox/files/patch-bug828003
+++ /dev/null
@@ -1,36 +0,0 @@
---- gfx/qcms/qcmstypes.h
-+++ gfx/qcms/qcmstypes.h
-@@ -7,30 +7,12 @@
- #include "mozilla/StandardInteger.h"
-
- /* prtypes.h defines IS_LITTLE_ENDIAN and IS_BIG ENDIAN */
-+/* StandardInteger.h defines int*_t and uintptr_t */
-
--#if defined (__SVR4) && defined (__sun)
--/* int_types.h gets included somehow, so avoid redefining the types differently */
--#include <sys/int_types.h>
--#elif defined (_AIX)
-+#if defined(_AIX)
- #include <sys/types.h>
--#elif defined(__OpenBSD__)
--#include <inttypes.h>
--#elif !defined(ANDROID)
--typedef int8_t int8_t;
--typedef uint8_t uint8_t;
--typedef int16_t int16_t;
--typedef uint16_t uint16_t;
--typedef int32_t int32_t;
--typedef uint32_t uint32_t;
--typedef int64_t int64_t;
--typedef uint64_t uint64_t;
--
--#ifdef __OS2__
--/* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */
-+#elif defined(__OS2__)
- #include <stdlib.h>
--#elif !defined(__intptr_t_defined) && !defined(_UINTPTR_T_DEFINED)
--typedef unsigned long uintptr_t;
--#endif
- #endif
-
- #else // MOZ_QCMS
diff --git a/www/firefox/files/patch-bug844818 b/www/firefox/files/patch-bug844818
index cf796b639134..87151264c032 100644
--- a/www/firefox/files/patch-bug844818
+++ b/www/firefox/files/patch-bug844818
@@ -21,10 +21,10 @@ index 7cd6e17..a1dbdf7 100644
# Don't try to compile sse4.1 code if toolchain doesn't support
if test -z "$HAVE_TOOLCHAIN_SUPPORT_MSSE4_1"; then
EXTRA_GYP_DEFINES="$EXTRA_GYP_DEFINES -D yuv_disable_asm=1"
-diff --git media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
+diff --git media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi
index 8457737..dfc83ff 100644
---- media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
-+++ media/webrtc/trunk/src/modules/audio_device/main/source/audio_device.gypi
+--- media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi
++++ media/webrtc/trunk/webrtc/modules/audio_device/audio_device.gypi
@@ -45,11 +45,15 @@
'dummy/audio_device_utility_dummy.h',
],
@@ -40,9 +40,9 @@ index 8457737..dfc83ff 100644
+ 'WEBRTC_LINUX',
+ ],
+ }], # include_alsa_audio==1 or include_pulse_audio==1
- ['OS=="mac"', {
- 'include_dirs': [
- 'mac',
+ ['OS=="ios"', {
+ 'include_dirs': [
+ 'ios',
@@ -74,14 +78,8 @@
}],
['include_internal_audio_device==1', {
diff --git a/www/firefox/files/patch-build-pgo-profileserver.py b/www/firefox/files/patch-build-pgo-profileserver.py
index 0571eb19903d..fdab788f8fe4 100644
--- a/www/firefox/files/patch-build-pgo-profileserver.py
+++ b/www/firefox/files/patch-build-pgo-profileserver.py
@@ -1,6 +1,6 @@
--- build/pgo/profileserver.py.orig 2011-02-24 21:49:47.000000000 +0100
+++ build/pgo/profileserver.py 2011-02-24 21:50:30.000000000 +0100
-@@ -77,13 +77,13 @@
+@@ -43,13 +43,13 @@ if __name__ == '__main__':
t.setDaemon(True) # don't hang on exit
t.start()
@@ -9,7 +9,7 @@
automation.initializeProfile(PROFILE_DIRECTORY)
browserEnv = automation.environment()
browserEnv["XPCOM_DEBUG_BREAK"] = "warn"
- browserEnv["MOZ_JAR_LOG_DIR"] = MOZ_JAR_LOG_DIR
+ browserEnv["MOZ_JAR_LOG_FILE"] = MOZ_JAR_LOG_FILE
- url = "http://localhost:%d/index.html" % PORT
+ url = "http://127.0.0.1:%d/index.html" % PORT
diff --git a/www/firefox/files/patch-clang33 b/www/firefox/files/patch-clang33
index 2d2b15d71d75..596312db5b4b 100644
--- a/www/firefox/files/patch-clang33
+++ b/www/firefox/files/patch-clang33
@@ -1,3 +1,37 @@
+--- js/src/Makefile.in~
++++ js/src/Makefile.in
+@@ -791,6 +791,13 @@ EXTRA_LIBS += -lposix4 -ldl -lnsl -lsock
+ endif
+ endif
+
++# clang 3.3 + -O2 makes jaeger crash in FixupArity
++ifdef CLANG_CXX
++ifndef MOZ_DEBUG
++Compiler.$(OBJ_SUFFIX): CXXFLAGS += -fno-inline-functions
++endif
++endif
++
+ # An AIX Optimization bug causes PR_dtoa() & JS_dtoa to produce wrong result.
+ # This suppresses optimization for this single compilation unit.
+ ifeq ($(OS_ARCH),AIX)
+--- js/src/jscompartment.h~
++++ js/src/jscompartment.h
+@@ -596,12 +596,12 @@ class js::AutoDebugModeGC
+ // The DEBUG_MODE_GC reason forces the collector to always throw
+ // everything away, as required for debug mode transitions.
+ if (needGC)
+- GC(rt, GC_NORMAL, gcreason::DEBUG_MODE_GC);
++ GC(rt, GC_NORMAL, js::gcreason::DEBUG_MODE_GC);
+ }
+
+- void scheduleGC(Zone *zone) {
++ void scheduleGC(JS::Zone *zone) {
+ JS_ASSERT(!rt->isHeapBusy());
+- PrepareZoneForGC(zone);
++ js::PrepareZoneForGC(zone);
+ needGC = true;
+ }
+ };
--- js/src/jspropertycacheinlines.h~
+++ js/src/jspropertycacheinlines.h
@@ -32,7 +32,7 @@ JS_ALWAYS_INLINE void
@@ -18,17 +52,44 @@
JS_ASSERT(this == &cx->propertyCache());
---- js/src/vm/ObjectImpl-inl.h.orig 2013-03-26 23:17:49.000000000 +0100
-+++ js/src/vm/ObjectImpl-inl.h 2013-04-15 13:24:59.885671177 +0200
-@@ -212,9 +212,9 @@
- JSCompartment *comp = compartment();
+--- js/src/vm/ObjectImpl-inl.h~
++++ js/src/vm/ObjectImpl-inl.h
+@@ -164,9 +164,9 @@ js::ObjectImpl::initializeSlotRange(uint
+ JSRuntime *rt = runtime();
uint32_t offset = start;
for (HeapSlot *sp = fixedStart; sp < fixedEnd; sp++)
-- sp->init(comp, this->asObjectPtr(), offset++, UndefinedValue());
-+ sp->init(comp, this->asObjectPtr(), offset++, js::UndefinedValue());
+- sp->init(rt, this->asObjectPtr(), HeapSlot::Slot, offset++, UndefinedValue());
++ sp->init(rt, this->asObjectPtr(), HeapSlot::Slot, offset++, js::UndefinedValue());
for (HeapSlot *sp = slotsStart; sp < slotsEnd; sp++)
-- sp->init(comp, this->asObjectPtr(), offset++, UndefinedValue());
-+ sp->init(comp, this->asObjectPtr(), offset++, js::UndefinedValue());
+- sp->init(rt, this->asObjectPtr(), HeapSlot::Slot, offset++, UndefinedValue());
++ sp->init(rt, this->asObjectPtr(), HeapSlot::Slot, offset++, js::UndefinedValue());
}
inline bool
+@@ -321,7 +321,7 @@ js::ObjectImpl::sizeOfThis() const
+ js::ObjectImpl::readBarrier(ObjectImpl *obj)
+ {
+ #ifdef JSGC_INCREMENTAL
+- Zone *zone = obj->zone();
++ JS::Zone *zone = obj->zone();
+ if (zone->needsBarrier()) {
+ MOZ_ASSERT(!zone->rt->isHeapBusy());
+ JSObject *tmp = obj->asObjectPtr();
+@@ -335,7 +335,7 @@ inline void
+ js::ObjectImpl::privateWriteBarrierPre(void **old)
+ {
+ #ifdef JSGC_INCREMENTAL
+- Zone *zone = this->zone();
++ JS::Zone *zone = this->zone();
+ if (zone->needsBarrier()) {
+ if (*old && getClass()->trace)
+ getClass()->trace(zone->barrierTracer(), this->asObjectPtr());
+@@ -362,7 +362,7 @@ js::ObjectImpl::writeBarrierPre(ObjectIm
+ if (uintptr_t(obj) < 32)
+ return;
+
+- Zone *zone = obj->zone();
++ JS::Zone *zone = obj->zone();
+ if (zone->needsBarrier()) {
+ MOZ_ASSERT(!zone->rt->isHeapBusy());
+ JSObject *tmp = obj->asObjectPtr();
diff --git a/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp b/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
index 1d76d119c5a2..eeb58e7baa20 100644
--- a/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
+++ b/www/firefox/files/patch-media-webrtc-trunk-src-system_wrappers-source-spreadsortlib-spreadsort.hpp
@@ -1,5 +1,5 @@
---- media/webrtc/trunk/src/system_wrappers/source/spreadsortlib/spreadsort.hpp~
-+++ media/webrtc/trunk/src/system_wrappers/source/spreadsortlib/spreadsort.hpp
+--- media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp~
++++ media/webrtc/trunk/webrtc/system_wrappers/source/spreadsortlib/spreadsort.hpp
@@ -21,6 +21,13 @@ Scott McMurray
#include "constants.hpp"
#include <cstring>