mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-30 01:15:52 +00:00
Update to 17.0.6 (this should also fix the build on head after the
clang 3.3 merge) PR: ports/179034 [1] Submitted by: Jan Beich <jbeich@tormail.org>, Nikolai Lifanov <lifanov@mail.lifanov.com> [1]
This commit is contained in:
parent
62fddef0e1
commit
96b39667d3
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=319872
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
PORTNAME= gnash
|
PORTNAME= gnash
|
||||||
PORTVERSION= 0.8.10
|
PORTVERSION= 0.8.10
|
||||||
PORTREVISION= 4
|
PORTREVISION= 5
|
||||||
CATEGORIES= graphics
|
CATEGORIES= graphics
|
||||||
MASTER_SITES= GNU/${PORTNAME}/${PORTVERSION}/
|
MASTER_SITES= GNU/${PORTNAME}/${PORTVERSION}/
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
PORTNAME= gecko-mediaplayer
|
PORTNAME= gecko-mediaplayer
|
||||||
PORTVERSION= 1.0.8
|
PORTVERSION= 1.0.8
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= www multimedia gnome
|
CATEGORIES= www multimedia gnome
|
||||||
MASTER_SITES= GOOGLE_CODE
|
MASTER_SITES= GOOGLE_CODE
|
||||||
|
|
||||||
|
@ -2,25 +2,26 @@
|
|||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
|
|
||||||
PORTNAME= libxul
|
PORTNAME= libxul
|
||||||
DISTVERSION= 10.0.12
|
DISTVERSION= 17.0.6
|
||||||
CATEGORIES?= www devel
|
CATEGORIES?= www devel
|
||||||
MASTER_SITES= ${MASTER_SITE_MOZILLA}
|
MASTER_SITES= MOZILLA/firefox/releases/${DISTVERSION}esr/source
|
||||||
MASTER_SITE_SUBDIR= firefox/releases/${DISTVERSION}esr/source
|
|
||||||
DISTNAME= firefox-${DISTVERSION}esr.source
|
DISTNAME= firefox-${DISTVERSION}esr.source
|
||||||
|
|
||||||
MAINTAINER?= gecko@FreeBSD.org
|
MAINTAINER?= gecko@FreeBSD.org
|
||||||
COMMENT?= Mozilla runtime package that can be used to bootstrap XUL+XPCOM apps
|
COMMENT?= Mozilla runtime package that can be used to bootstrap XUL+XPCOM apps
|
||||||
|
|
||||||
BUILD_DEPENDS= nspr>=4.8.8:${PORTSDIR}/devel/nspr \
|
BUILD_DEPENDS= nspr>=4.9.2:${PORTSDIR}/devel/nspr \
|
||||||
nss>=3.13.6_1:${PORTSDIR}/security/nss \
|
nss>=3.13.6_1:${PORTSDIR}/security/nss \
|
||||||
sqlite3>=3.7.7.1:${PORTSDIR}/databases/sqlite3 \
|
sqlite3>=3.7.13:${PORTSDIR}/databases/sqlite3 \
|
||||||
|
${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
|
||||||
cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
|
cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \
|
||||||
unzip:${PORTSDIR}/archivers/unzip
|
unzip:${PORTSDIR}/archivers/unzip
|
||||||
|
|
||||||
WRKSRC= ${WRKDIR}/mozilla-esr10
|
WRKSRC= ${WRKDIR}/mozilla-esr17
|
||||||
CONFLICTS= mozilla-[0-9]* libxul-1.9.*
|
CONFLICTS= libxul-1.9.*
|
||||||
|
|
||||||
USE_AUTOTOOLS= autoconf213:env
|
USE_AUTOTOOLS= autoconf213:env
|
||||||
|
USE_PYTHON_BUILD=-2.7
|
||||||
WANT_GNOME= yes
|
WANT_GNOME= yes
|
||||||
USE_QT4= # empty
|
USE_QT4= # empty
|
||||||
QT_NONSTANDARD= yes
|
QT_NONSTANDARD= yes
|
||||||
@ -45,8 +46,6 @@ PLIST_DIRSTRY= share/idl
|
|||||||
MOZ_PKGCONFIG_FILES= libxul-embedding libxul mozilla-js \
|
MOZ_PKGCONFIG_FILES= libxul-embedding libxul mozilla-js \
|
||||||
mozilla-plugin
|
mozilla-plugin
|
||||||
|
|
||||||
OPTIONS_DEFAULT=GIO
|
|
||||||
|
|
||||||
.include "${.CURDIR}/../../www/firefox/Makefile.options"
|
.include "${.CURDIR}/../../www/firefox/Makefile.options"
|
||||||
.include <bsd.port.pre.mk>
|
.include <bsd.port.pre.mk>
|
||||||
|
|
||||||
@ -54,10 +53,6 @@ OPTIONS_DEFAULT=GIO
|
|||||||
MOZ_PKGCONFIG_FILES+= mozilla-nss
|
MOZ_PKGCONFIG_FILES+= mozilla-nss
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
.if !empty(CXX:M*clang++*) || (${CXX:Mc++} && ${OSVERSION} > 1000023)
|
|
||||||
CXXFLAGS+= -Wno-return-type-c-linkage
|
|
||||||
.endif
|
|
||||||
|
|
||||||
post-patch:
|
post-patch:
|
||||||
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
|
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
|
||||||
${WRKSRC}/xulrunner/stub/nsXULStub.cpp
|
${WRKSRC}/xulrunner/stub/nsXULStub.cpp
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
SHA256 (firefox-10.0.12esr.source.tar.bz2) = 9f12cb7fd18fc51e995cd67b70a090f32fcd8dcf636be1b840281f2612d9db40
|
SHA256 (firefox-17.0.6esr.source.tar.bz2) = a8d05a2ce61c5b8c0ab93acb01191e282f7387d285ac59a9db2d9fd685cb6401
|
||||||
SIZE (firefox-10.0.12esr.source.tar.bz2) = 75510903
|
SIZE (firefox-17.0.6esr.source.tar.bz2) = 91112621
|
||||||
|
13
www/libxul/files/extra-bug780531
Normal file
13
www/libxul/files/extra-bug780531
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- configure.in~
|
||||||
|
+++ configure.in
|
||||||
|
@@ -5151,8 +5148,8 @@ fi
|
||||||
|
|
||||||
|
AC_SUBST(MOZ_WEBRTC)
|
||||||
|
|
||||||
|
-case "$target_cpu" in
|
||||||
|
-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)
|
@ -1,74 +1,65 @@
|
|||||||
--- config/autoconf.mk.in~
|
diff --git configure.in configure.in
|
||||||
+++ config/autoconf.mk.in
|
index 5980b76..11f5f77 100644
|
||||||
@@ -568,7 +568,13 @@ MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CF
|
--- configure.in
|
||||||
MOZ_LIBNOTIFY_LIBS = @MOZ_LIBNOTIFY_LIBS@
|
|
||||||
MOZ_ENABLE_LIBNOTIFY = @MOZ_ENABLE_LIBNOTIFY@
|
|
||||||
|
|
||||||
+MOZ_ALSA = @MOZ_ALSA@
|
|
||||||
MOZ_ALSA_LIBS = @MOZ_ALSA_LIBS@
|
|
||||||
+MOZ_ALSA_CFLAGS = @MOZ_ALSA_CFLAGS@
|
|
||||||
+
|
|
||||||
+MOZ_PULSEAUDIO = @MOZ_PULSEAUDIO@
|
|
||||||
+MOZ_PULSEAUDIO_LIBS = @MOZ_PULSEAUDIO_LIBS@
|
|
||||||
+MOZ_PULSEAUDIO_CFLAGS = @MOZ_PULSEAUDIO_CFLAGS@
|
|
||||||
|
|
||||||
GLIB_CFLAGS = @GLIB_CFLAGS@
|
|
||||||
GLIB_LIBS = @GLIB_LIBS@
|
|
||||||
--- configure.in~
|
|
||||||
+++ configure.in
|
+++ configure.in
|
||||||
@@ -5758,17 +5775,48 @@ dnl ====================================
|
@@ -5600,13 +5600,25 @@ dnl ========================================================
|
||||||
dnl = Check alsa availability on Linux if using sydneyaudio
|
dnl = Check alsa availability on Linux if using sydneyaudio
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
|
|
||||||
+MOZ_ARG_ENABLE_BOOL(alsa,
|
+MOZ_ARG_ENABLE_BOOL(alsa,
|
||||||
+[ --enable-alsa Enable Alsa support],
|
+[ --enable-alsa Enable Alsa support (default on Linux)],
|
||||||
+MOZ_ALSA=1,
|
+MOZ_ALSA=1,
|
||||||
+MOZ_ALSA= MOZ_ALSA_FORCE=$enableval)
|
+MOZ_ALSA= MOZ_ALSA_FORCE=$enableval)
|
||||||
+
|
+
|
||||||
dnl If using sydneyaudio with Linux, ensure that the alsa library is available
|
dnl If using sydneyaudio with Linux, ensure that the alsa library is available
|
||||||
-if test -n "$MOZ_SYDNEYAUDIO"; then
|
-if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then
|
||||||
+if test -n "$MOZ_SYDNEYAUDIO" -a "$MOZ_ALSA_FORCE" != "no"; then
|
+if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux" -a "$MOZ_ALSA_FORCE" != "no"; then
|
||||||
case "$target_os" in
|
+ MOZ_ALSA=1
|
||||||
linux*)
|
|
||||||
+ MOZ_ALSA=1
|
|
||||||
+ ;;
|
|
||||||
+ esac
|
|
||||||
+fi
|
+fi
|
||||||
+
|
+
|
||||||
+if test -n "$MOZ_ALSA"; then
|
+if test -n "$MOZ_ALSA"; then
|
||||||
PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
|
+ AC_DEFINE(MOZ_CUBEB)
|
||||||
|
PKG_CHECK_MODULES(MOZ_ALSA, alsa, ,
|
||||||
[echo "$MOZ_ALSA_PKG_ERRORS"
|
[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.)])])
|
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.)])])
|
||||||
- ;;
|
|
||||||
- esac
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
+AC_SUBST(MOZ_ALSA_CFLAGS)
|
|
||||||
+AC_SUBST(MOZ_ALSA)
|
+AC_SUBST(MOZ_ALSA)
|
||||||
+
|
|
||||||
+dnl ========================================================
|
|
||||||
+dnl = Enable PulseAudio
|
|
||||||
+dnl ========================================================
|
|
||||||
+
|
|
||||||
+MOZ_ARG_ENABLE_BOOL(pulseaudio,
|
|
||||||
+[ --enable-pulseaudio Enable PulseAudio support],
|
|
||||||
+MOZ_PULSEAUDIO=1,
|
|
||||||
+MOZ_PULSEAUDIO=)
|
|
||||||
+
|
|
||||||
+if test -n "$MOZ_PULSEAUDIO"; then
|
|
||||||
+ PKG_CHECK_MODULES(MOZ_PULSEAUDIO, libpulse, ,
|
|
||||||
+ [echo "$MOZ_PULSEAUDIO_PKG_ERRORS"
|
|
||||||
+ AC_MSG_ERROR([pulseaudio audio backend requires libpulse package])])
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
+AC_SUBST(MOZ_PULSEAUDIO_CFLAGS)
|
|
||||||
+AC_SUBST(MOZ_PULSEAUDIO_LIBS)
|
|
||||||
+AC_SUBST(MOZ_PULSEAUDIO)
|
|
||||||
+
|
+
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
dnl Permissions System
|
dnl = Enable PulseAudio
|
||||||
dnl ========================================================
|
dnl ========================================================
|
||||||
--- media/libsydneyaudio/src/Makefile.in~
|
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
|
+++ media/libsydneyaudio/src/Makefile.in
|
||||||
@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android)
|
@@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android)
|
||||||
CSRCS = \
|
CSRCS = \
|
||||||
@ -100,20 +91,24 @@
|
|||||||
ifeq ($(OS_ARCH),WINNT)
|
ifeq ($(OS_ARCH),WINNT)
|
||||||
OS_LIBS += winmm.lib
|
OS_LIBS += winmm.lib
|
||||||
endif
|
endif
|
||||||
--- toolkit/library/libxul-config.mk~
|
diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in
|
||||||
+++ toolkit/library/libxul-config.mk
|
index 43384e9..e46a6e3 100644
|
||||||
@@ -348,10 +348,12 @@ ifdef MOZ_NATIVE_LIBVPX
|
--- toolkit/library/Makefile.in
|
||||||
EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS)
|
+++ toolkit/library/Makefile.in
|
||||||
endif
|
@@ -370,14 +370,11 @@ endif
|
||||||
|
|
||||||
|
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib)
|
||||||
|
|
||||||
-ifdef MOZ_SYDNEYAUDIO
|
-ifdef MOZ_SYDNEYAUDIO
|
||||||
-ifeq ($(OS_ARCH),Linux)
|
-ifeq ($(OS_ARCH),Linux)
|
||||||
|
+ifneq (,$(MOZ_CUBEB)$(MOZ_SYDNEYAUDIO))
|
||||||
+ifdef MOZ_ALSA
|
+ifdef MOZ_ALSA
|
||||||
EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
|
EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS)
|
||||||
endif
|
endif
|
||||||
+
|
-endif
|
||||||
+ifdef MOZ_PULSEAUDIO
|
-
|
||||||
+EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
|
ifdef MOZ_PULSEAUDIO
|
||||||
|
-ifdef MOZ_CUBEB
|
||||||
|
EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef HAVE_CLOCK_MONOTONIC
|
|
||||||
|
@ -1,29 +0,0 @@
|
|||||||
commit 47ea30f
|
|
||||||
Author: Landry Breuil <landry@openbsd.org>
|
|
||||||
Date: Thu Feb 2 15:31:56 2012 +0900
|
|
||||||
|
|
||||||
Bug 653551 - Jaegermonkey Sparc back-end broken on sparc64. r=leon.sha
|
|
||||||
---
|
|
||||||
js/src/configure.in | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git js/src/configure.in js/src/configure.in
|
|
||||||
index 84390cf..d663c46 100644
|
|
||||||
--- js/src/configure.in
|
|
||||||
+++ js/src/configure.in
|
|
||||||
@@ -2806,13 +2806,15 @@ arm*-*)
|
|
||||||
AC_DEFINE(JS_NUNBOX32)
|
|
||||||
;;
|
|
||||||
sparc*-*)
|
|
||||||
+ if test ! "$HAVE_64BIT_OS" ; then
|
|
||||||
NANOJIT_ARCH=Sparc
|
|
||||||
ENABLE_METHODJIT=1
|
|
||||||
ENABLE_MONOIC=1
|
|
||||||
ENABLE_POLYIC=1
|
|
||||||
ENABLE_METHODJIT_TYPED_ARRAY=1
|
|
||||||
AC_DEFINE(JS_CPU_SPARC)
|
|
||||||
AC_DEFINE(JS_NUNBOX32)
|
|
||||||
+ fi
|
|
||||||
;;
|
|
||||||
mips*-*)
|
|
||||||
ENABLE_METHODJIT=1
|
|
@ -1,285 +0,0 @@
|
|||||||
From: Mike Hommey <mh@glandium.org>
|
|
||||||
Date: Sat, 24 Dec 2011 09:56:58 +0100
|
|
||||||
Subject: Bug 691898 - Use YARR interpreter instead of PCRE on platforms where
|
|
||||||
YARR JIT is not supported
|
|
||||||
|
|
||||||
---
|
|
||||||
js/src/Makefile.in | 21 +++++++++++++--------
|
|
||||||
js/src/vm/RegExpObject-inl.h | 28 ++++++----------------------
|
|
||||||
js/src/vm/RegExpObject.cpp | 36 ------------------------------------
|
|
||||||
js/src/vm/RegExpObject.h | 27 ++++++---------------------
|
|
||||||
js/src/yarr/wtfbridge.h | 2 --
|
|
||||||
5 files changed, 25 insertions(+), 89 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/js/src/Makefile.in b/js/src/Makefile.in
|
|
||||||
index fc48cbd..49f0bdc 100644
|
|
||||||
--- js/src/Makefile.in
|
|
||||||
+++ js/src/Makefile.in
|
|
||||||
@@ -416,15 +416,20 @@ CPPSRCS += checks.cc \
|
|
||||||
|
|
||||||
ifeq (,$(filter arm% sparc %86 x86_64,$(TARGET_CPU)))
|
|
||||||
|
|
||||||
-VPATH += $(srcdir)/yarr/pcre \
|
|
||||||
+VPATH += $(srcdir)/assembler \
|
|
||||||
+ $(srcdir)/assembler/wtf \
|
|
||||||
+ $(srcdir)/yarr \
|
|
||||||
$(NULL)
|
|
||||||
|
|
||||||
CPPSRCS += \
|
|
||||||
- pcre_compile.cpp \
|
|
||||||
- pcre_exec.cpp \
|
|
||||||
- pcre_tables.cpp \
|
|
||||||
- pcre_xclass.cpp \
|
|
||||||
- pcre_ucp_searchfuncs.cpp \
|
|
||||||
+ Assertions.cpp \
|
|
||||||
+ OSAllocatorOS2.cpp \
|
|
||||||
+ OSAllocatorPosix.cpp \
|
|
||||||
+ OSAllocatorWin.cpp \
|
|
||||||
+ PageBlock.cpp \
|
|
||||||
+ YarrInterpreter.cpp \
|
|
||||||
+ YarrPattern.cpp \
|
|
||||||
+ YarrSyntaxChecker.cpp \
|
|
||||||
$(NULL)
|
|
||||||
else
|
|
||||||
|
|
||||||
@@ -1015,10 +1020,10 @@ endif
|
|
||||||
# Needed to "configure" it correctly. Unfortunately these
|
|
||||||
# flags wind up being applied to all code in js/src, not just
|
|
||||||
# the code in js/src/assembler.
|
|
||||||
-CXXFLAGS += -DUSE_SYSTEM_MALLOC=1 -DENABLE_ASSEMBLER=1
|
|
||||||
+CXXFLAGS += -DUSE_SYSTEM_MALLOC=1
|
|
||||||
|
|
||||||
ifneq (,$(ENABLE_YARR_JIT)$(ENABLE_TRACEJIT)$(ENABLE_METHODJIT))
|
|
||||||
-CXXFLAGS += -DENABLE_JIT=1
|
|
||||||
+CXXFLAGS += -DENABLE_JIT=1 -DENABLE_ASSEMBLER=1
|
|
||||||
endif
|
|
||||||
|
|
||||||
INCLUDES += -I$(srcdir)/assembler -I$(srcdir)/yarr
|
|
||||||
diff --git a/js/src/vm/RegExpObject-inl.h b/js/src/vm/RegExpObject-inl.h
|
|
||||||
index 5f7817d..91108a7 100644
|
|
||||||
--- js/src/vm/RegExpObject-inl.h
|
|
||||||
+++ js/src/vm/RegExpObject-inl.h
|
|
||||||
@@ -327,6 +327,7 @@ RegExpPrivate::create(JSContext *cx, JSString *source, RegExpFlag flags, TokenSt
|
|
||||||
return RetType(self);
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if ENABLE_YARR_JIT
|
|
||||||
/* This function should be deleted once bad Android platforms phase out. See bug 604774. */
|
|
||||||
inline bool
|
|
||||||
RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx)
|
|
||||||
@@ -337,12 +338,12 @@ RegExpPrivateCode::isJITRuntimeEnabled(JSContext *cx)
|
|
||||||
return true;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
inline bool
|
|
||||||
RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts,
|
|
||||||
uintN *parenCount, RegExpFlag flags)
|
|
||||||
{
|
|
||||||
-#if ENABLE_YARR_JIT
|
|
||||||
/* Parse the pattern. */
|
|
||||||
ErrorCode yarrError;
|
|
||||||
YarrPattern yarrPattern(pattern, bool(flags & IgnoreCaseFlag), bool(flags & MultilineFlag),
|
|
||||||
@@ -359,7 +360,7 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *
|
|
||||||
* case we have to bytecode compile it.
|
|
||||||
*/
|
|
||||||
|
|
||||||
-#ifdef JS_METHODJIT
|
|
||||||
+#if ENABLE_YARR_JIT && defined(JS_METHODJIT)
|
|
||||||
if (isJITRuntimeEnabled(cx) && !yarrPattern.m_containsBackreferences) {
|
|
||||||
if (!cx->compartment->ensureJaegerCompartmentExists(cx))
|
|
||||||
return false;
|
|
||||||
@@ -371,21 +372,11 @@ RegExpPrivateCode::compile(JSContext *cx, JSLinearString &pattern, TokenStream *
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#if ENABLE_YARR_JIT
|
|
||||||
codeBlock.setFallBack(true);
|
|
||||||
+#endif
|
|
||||||
byteCode = byteCompile(yarrPattern, cx->compartment->regExpAllocator).get();
|
|
||||||
return true;
|
|
||||||
-#else /* !defined(ENABLE_YARR_JIT) */
|
|
||||||
- int error = 0;
|
|
||||||
- compiled = jsRegExpCompile(pattern.chars(), pattern.length(),
|
|
||||||
- ignoreCase() ? JSRegExpIgnoreCase : JSRegExpDoNotIgnoreCase,
|
|
||||||
- multiline() ? JSRegExpMultiline : JSRegExpSingleLine,
|
|
||||||
- parenCount, &error);
|
|
||||||
- if (error) {
|
|
||||||
- reportPCREError(cx, error);
|
|
||||||
- return false;
|
|
||||||
- }
|
|
||||||
- return true;
|
|
||||||
-#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool
|
|
||||||
@@ -431,19 +422,12 @@ RegExpPrivateCode::execute(JSContext *cx, const jschar *chars, size_t start, siz
|
|
||||||
else
|
|
||||||
result = JSC::Yarr::execute(codeBlock, chars, start, length, output);
|
|
||||||
#else
|
|
||||||
- result = jsRegExpExecute(cx, compiled, chars, length, start, output, outputCount);
|
|
||||||
+ result = JSC::Yarr::interpret(byteCode, chars, start, length, output);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (result == -1)
|
|
||||||
return Success_NotFound;
|
|
||||||
|
|
||||||
-#if !ENABLE_YARR_JIT
|
|
||||||
- if (result < 0) {
|
|
||||||
- reportPCREError(cx, result);
|
|
||||||
- return Error;
|
|
||||||
- }
|
|
||||||
-#endif
|
|
||||||
-
|
|
||||||
JS_ASSERT(result >= 0);
|
|
||||||
return Success;
|
|
||||||
}
|
|
||||||
diff --git a/js/src/vm/RegExpObject.cpp b/js/src/vm/RegExpObject.cpp
|
|
||||||
index f75c6a5..7631dd5 100644
|
|
||||||
--- js/src/vm/RegExpObject.cpp
|
|
||||||
+++ js/src/vm/RegExpObject.cpp
|
|
||||||
@@ -251,7 +251,6 @@ Class js::RegExpClass = {
|
|
||||||
NULL /* trace */
|
|
||||||
};
|
|
||||||
|
|
||||||
-#if ENABLE_YARR_JIT
|
|
||||||
void
|
|
||||||
RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode error)
|
|
||||||
{
|
|
||||||
@@ -283,41 +282,6 @@ RegExpPrivateCode::reportYarrError(JSContext *cx, TokenStream *ts, ErrorCode err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-#else /* !ENABLE_YARR_JIT */
|
|
||||||
-
|
|
||||||
-void
|
|
||||||
-RegExpPrivateCode::reportPCREError(JSContext *cx, int error)
|
|
||||||
-{
|
|
||||||
-#define REPORT(msg_) \
|
|
||||||
- JS_ReportErrorFlagsAndNumberUC(cx, JSREPORT_ERROR, js_GetErrorMessage, NULL, msg_); \
|
|
||||||
- return
|
|
||||||
- switch (error) {
|
|
||||||
- case -2: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
|
|
||||||
- case 0: JS_NOT_REACHED("Precondition violation: an error must have occurred.");
|
|
||||||
- case 1: REPORT(JSMSG_TRAILING_SLASH);
|
|
||||||
- case 2: REPORT(JSMSG_TRAILING_SLASH);
|
|
||||||
- case 3: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
|
|
||||||
- case 4: REPORT(JSMSG_BAD_QUANTIFIER);
|
|
||||||
- case 5: REPORT(JSMSG_BAD_QUANTIFIER);
|
|
||||||
- case 6: REPORT(JSMSG_BAD_CLASS_RANGE);
|
|
||||||
- case 7: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
|
|
||||||
- case 8: REPORT(JSMSG_BAD_CLASS_RANGE);
|
|
||||||
- case 9: REPORT(JSMSG_BAD_QUANTIFIER);
|
|
||||||
- case 10: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN);
|
|
||||||
- case 11: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
|
|
||||||
- case 12: REPORT(JSMSG_UNMATCHED_RIGHT_PAREN);
|
|
||||||
- case 13: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
|
|
||||||
- case 14: REPORT(JSMSG_MISSING_PAREN);
|
|
||||||
- case 15: REPORT(JSMSG_BAD_BACKREF);
|
|
||||||
- case 16: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
|
|
||||||
- case 17: REPORT(JSMSG_REGEXP_TOO_COMPLEX);
|
|
||||||
- default:
|
|
||||||
- JS_NOT_REACHED("Precondition violation: unknown PCRE error code.");
|
|
||||||
- }
|
|
||||||
-#undef REPORT
|
|
||||||
-}
|
|
||||||
-#endif /* ENABLE_YARR_JIT */
|
|
||||||
-
|
|
||||||
bool
|
|
||||||
js::ParseRegExpFlags(JSContext *cx, JSString *flagStr, RegExpFlag *flagsOut)
|
|
||||||
{
|
|
||||||
diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h
|
|
||||||
index 1449d56..279f3c0 100644
|
|
||||||
--- js/src/vm/RegExpObject.h
|
|
||||||
+++ js/src/vm/RegExpObject.h
|
|
||||||
@@ -49,8 +49,6 @@
|
|
||||||
#include "yarr/Yarr.h"
|
|
||||||
#if ENABLE_YARR_JIT
|
|
||||||
#include "yarr/YarrJIT.h"
|
|
||||||
-#else
|
|
||||||
-#include "yarr/pcre/pcre.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace js {
|
|
||||||
@@ -153,48 +151,39 @@ ResetRegExpObject(JSContext *cx, AlreadyIncRefed<RegExpPrivate> rep);
|
|
||||||
/* Abstracts away the gross |RegExpPrivate| backend details. */
|
|
||||||
class RegExpPrivateCode
|
|
||||||
{
|
|
||||||
-#if ENABLE_YARR_JIT
|
|
||||||
typedef JSC::Yarr::BytecodePattern BytecodePattern;
|
|
||||||
typedef JSC::Yarr::ErrorCode ErrorCode;
|
|
||||||
+ typedef JSC::Yarr::YarrPattern YarrPattern;
|
|
||||||
+#if ENABLE_YARR_JIT
|
|
||||||
typedef JSC::Yarr::JSGlobalData JSGlobalData;
|
|
||||||
typedef JSC::Yarr::YarrCodeBlock YarrCodeBlock;
|
|
||||||
- typedef JSC::Yarr::YarrPattern YarrPattern;
|
|
||||||
|
|
||||||
/* Note: Native code is valid only if |codeBlock.isFallBack() == false|. */
|
|
||||||
YarrCodeBlock codeBlock;
|
|
||||||
- BytecodePattern *byteCode;
|
|
||||||
-#else
|
|
||||||
- JSRegExp *compiled;
|
|
||||||
#endif
|
|
||||||
+ BytecodePattern *byteCode;
|
|
||||||
|
|
||||||
public:
|
|
||||||
RegExpPrivateCode()
|
|
||||||
:
|
|
||||||
#if ENABLE_YARR_JIT
|
|
||||||
codeBlock(),
|
|
||||||
- byteCode(NULL)
|
|
||||||
-#else
|
|
||||||
- compiled(NULL)
|
|
||||||
#endif
|
|
||||||
+ byteCode(NULL)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
~RegExpPrivateCode() {
|
|
||||||
#if ENABLE_YARR_JIT
|
|
||||||
codeBlock.release();
|
|
||||||
+#endif
|
|
||||||
if (byteCode)
|
|
||||||
Foreground::delete_<BytecodePattern>(byteCode);
|
|
||||||
-#else
|
|
||||||
- if (compiled)
|
|
||||||
- jsRegExpFree(compiled);
|
|
||||||
-#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#if ENABLE_YARR_JIT
|
|
||||||
static inline bool isJITRuntimeEnabled(JSContext *cx);
|
|
||||||
- void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
|
|
||||||
-#else
|
|
||||||
- void reportPCREError(JSContext *cx, int error);
|
|
||||||
#endif
|
|
||||||
+ void reportYarrError(JSContext *cx, TokenStream *ts, JSC::Yarr::ErrorCode error);
|
|
||||||
|
|
||||||
inline bool compile(JSContext *cx, JSLinearString &pattern, TokenStream *ts, uintN *parenCount,
|
|
||||||
RegExpFlag flags);
|
|
||||||
@@ -205,11 +194,7 @@ class RegExpPrivateCode
|
|
||||||
int *output, size_t outputCount);
|
|
||||||
|
|
||||||
static size_t getOutputSize(size_t pairCount) {
|
|
||||||
-#if ENABLE_YARR_JIT
|
|
||||||
return pairCount * 2;
|
|
||||||
-#else
|
|
||||||
- return pairCount * 3; /* Should be x2, but PCRE has... needs. */
|
|
||||||
-#endif
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
diff --git a/js/src/yarr/wtfbridge.h b/js/src/yarr/wtfbridge.h
|
|
||||||
index ac41d08..fb8eb86 100644
|
|
||||||
--- js/src/yarr/wtfbridge.h
|
|
||||||
+++ js/src/yarr/wtfbridge.h
|
|
||||||
@@ -49,9 +49,7 @@
|
|
||||||
#include "jsprvtd.h"
|
|
||||||
#include "vm/String.h"
|
|
||||||
#include "assembler/wtf/Platform.h"
|
|
||||||
-#if ENABLE_YARR_JIT
|
|
||||||
#include "assembler/jit/ExecutableAllocator.h"
|
|
||||||
-#endif
|
|
||||||
|
|
||||||
namespace JSC { namespace Yarr {
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
|||||||
commit 5e354b9
|
|
||||||
Author: Chris Coulson <chris.coulson@canonical.com>
|
|
||||||
Date: Thu Jan 5 11:19:50 2012 +1300
|
|
||||||
|
|
||||||
Bug 696030 - Use MonitorAutoLock rather than MonitorAutoEnter in nsGIOProtocolHandler r=karlt
|
|
||||||
|
|
||||||
--HG--
|
|
||||||
extra : rebase_source : 6f3d1a49a07affab679e41cd8cf968d62c072299
|
|
||||||
---
|
|
||||||
extensions/gio/nsGIOProtocolHandler.cpp | 4 ++--
|
|
||||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git extensions/gio/nsGIOProtocolHandler.cpp extensions/gio/nsGIOProtocolHandler.cpp
|
|
||||||
index 9347b6e..e8f153d 100644
|
|
||||||
--- extensions/gio/nsGIOProtocolHandler.cpp
|
|
||||||
+++ extensions/gio/nsGIOProtocolHandler.cpp
|
|
||||||
@@ -238,7 +238,7 @@ class nsGIOInputStream : public nsIInputStream
|
|
||||||
void
|
|
||||||
nsGIOInputStream::SetMountResult(MountOperationResult result, gint error_code)
|
|
||||||
{
|
|
||||||
- mozilla::MonitorAutoEnter mon(mMonitorMountInProgress);
|
|
||||||
+ mozilla::MonitorAutoLock mon(mMonitorMountInProgress);
|
|
||||||
mMountRes = result;
|
|
||||||
mMountErrorCode = error_code;
|
|
||||||
mon.Notify();
|
|
||||||
@@ -263,7 +263,7 @@ nsGIOInputStream::MountVolume() {
|
|
||||||
NULL,
|
|
||||||
mount_enclosing_volume_finished,
|
|
||||||
this);
|
|
||||||
- mozilla::MonitorAutoEnter mon(mMonitorMountInProgress);
|
|
||||||
+ mozilla::MonitorAutoLock mon(mMonitorMountInProgress);
|
|
||||||
/* Waiting for finish of mount operation thread */
|
|
||||||
while (mMountRes == MOUNT_OPERATION_IN_PROGRESS)
|
|
||||||
mon.Wait();
|
|
@ -1,73 +0,0 @@
|
|||||||
commit c104d9b
|
|
||||||
Author: Landry Breuil <landry@openbsd.org>
|
|
||||||
Date: Mon Jan 9 17:32:00 2012 -0600
|
|
||||||
|
|
||||||
Bug 714312 - Use <machine/endian.h> to get endianess on BSD systems, fixing the BSD build. r=ted
|
|
||||||
|
|
||||||
--HG--
|
|
||||||
extra : rebase_source : 8b418bdb2d713093d138ffed20bf1630c05f396b
|
|
||||||
---
|
|
||||||
js/src/configure.in | 5 +++++
|
|
||||||
js/src/js-config.h.in | 4 ++++
|
|
||||||
js/src/jscpucfg.h | 17 +++++++++++++++++
|
|
||||||
3 files changed, 26 insertions(+)
|
|
||||||
|
|
||||||
diff --git js/src/configure.in js/src/configure.in
|
|
||||||
index 164c896..361b29e 100644
|
|
||||||
--- js/src/configure.in
|
|
||||||
+++ js/src/configure.in
|
|
||||||
@@ -2934,6 +2934,11 @@ if test "$ac_cv_header_endian_h" = yes;
|
|
||||||
AC_DEFINE(JS_HAVE_ENDIAN_H)
|
|
||||||
fi
|
|
||||||
|
|
||||||
+AC_CHECK_HEADERS(machine/endian.h)
|
|
||||||
+if test "$ac_cv_header_machine_endian_h" = yes; then
|
|
||||||
+ AC_DEFINE(JS_HAVE_MACHINE_ENDIAN_H)
|
|
||||||
+fi
|
|
||||||
+
|
|
||||||
AC_CHECK_HEADERS(sys/isa_defs.h)
|
|
||||||
if test "$ac_cv_header_sys_isa_defs_h" = yes; then
|
|
||||||
AC_DEFINE(JS_HAVE_SYS_ISA_DEFS_H)
|
|
||||||
diff --git js/src/js-config.h.in js/src/js-config.h.in
|
|
||||||
index fb009fa..402262e 100644
|
|
||||||
--- js/src/js-config.h.in
|
|
||||||
+++ js/src/js-config.h.in
|
|
||||||
@@ -59,6 +59,10 @@
|
|
||||||
useable. See jscpucfg.h. */
|
|
||||||
#undef JS_HAVE_ENDIAN_H
|
|
||||||
|
|
||||||
+/* Define to 1 if the <machine/endian.h> header is present and
|
|
||||||
+ useable. See jscpucfg.h. */
|
|
||||||
+#undef JS_HAVE_MACHINE_ENDIAN_H
|
|
||||||
+
|
|
||||||
/* Define to 1 if the <sys/isa_defs.h> header is present and
|
|
||||||
useable. See jscpucfg.h. */
|
|
||||||
#undef JS_HAVE_SYS_ISA_DEFS_H
|
|
||||||
diff --git js/src/jscpucfg.h js/src/jscpucfg.h
|
|
||||||
index dd32bce..5fd8415 100644
|
|
||||||
--- js/src/jscpucfg.h
|
|
||||||
+++ js/src/jscpucfg.h
|
|
||||||
@@ -92,6 +92,23 @@
|
|
||||||
# error "endian.h does not define __BYTE_ORDER. Cannot determine endianness."
|
|
||||||
# endif
|
|
||||||
|
|
||||||
+/* BSDs */
|
|
||||||
+#elif defined(JS_HAVE_MACHINE_ENDIAN_H)
|
|
||||||
+# include <sys/types.h>
|
|
||||||
+# include <machine/endian.h>
|
|
||||||
+
|
|
||||||
+# if defined(_BYTE_ORDER)
|
|
||||||
+# if _BYTE_ORDER == _LITTLE_ENDIAN
|
|
||||||
+# define IS_LITTLE_ENDIAN 1
|
|
||||||
+# undef IS_BIG_ENDIAN
|
|
||||||
+# elif _BYTE_ORDER == _BIG_ENDIAN
|
|
||||||
+# undef IS_LITTLE_ENDIAN
|
|
||||||
+# define IS_BIG_ENDIAN 1
|
|
||||||
+# endif
|
|
||||||
+# else /* !defined(_BYTE_ORDER) */
|
|
||||||
+# error "machine/endian.h does not define _BYTE_ORDER. Cannot determine endianness."
|
|
||||||
+# endif
|
|
||||||
+
|
|
||||||
#elif defined(JS_HAVE_SYS_ISA_DEFS_H)
|
|
||||||
# include <sys/isa_defs.h>
|
|
||||||
|
|
61
www/libxul/files/patch-bug722975
Normal file
61
www/libxul/files/patch-bug722975
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
# HG changeset patch
|
||||||
|
# Parent 9d3c9b863c697634e434b687d456bb82fa794ecf
|
||||||
|
# User Uli Schlachter <psychon@znc.in>
|
||||||
|
Bug 722975 - --enable-system-cairo build is broken after Bug 715658 fixed
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp
|
||||||
|
--- gfx/thebes/gfxPlatform.cpp
|
||||||
|
+++ gfx/thebes/gfxPlatform.cpp
|
||||||
|
@@ -484,21 +484,19 @@ gfxPlatform::CreateDrawTargetForSurface(
|
||||||
|
|
||||||
|
cairo_user_data_key_t kSourceSurface;
|
||||||
|
|
||||||
|
void SourceBufferDestroy(void *srcBuffer)
|
||||||
|
{
|
||||||
|
static_cast<SourceSurface*>(srcBuffer)->Release();
|
||||||
|
}
|
||||||
|
|
||||||
|
-void SourceSnapshotDetached(cairo_surface_t *nullSurf)
|
||||||
|
+void SourceSnapshotDetached(void *nullSurf)
|
||||||
|
{
|
||||||
|
- gfxImageSurface* origSurf =
|
||||||
|
- static_cast<gfxImageSurface*>(cairo_surface_get_user_data(nullSurf, &kSourceSurface));
|
||||||
|
-
|
||||||
|
+ gfxImageSurface *origSurf = static_cast<gfxImageSurface*>(nullSurf);
|
||||||
|
origSurf->SetData(&kSourceSurface, NULL, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
RefPtr<SourceSurface>
|
||||||
|
gfxPlatform::GetSourceSurfaceForSurface(DrawTarget *aTarget, gfxASurface *aSurface)
|
||||||
|
{
|
||||||
|
void *userData = aSurface->GetData(&kSourceSurface);
|
||||||
|
|
||||||
|
@@ -588,24 +586,19 @@ gfxPlatform::GetSourceSurfaceForSurface(
|
||||||
|
}
|
||||||
|
|
||||||
|
srcBuffer = Factory::CreateWrappingDataSourceSurface(imgSurface->Data(),
|
||||||
|
imgSurface->Stride(),
|
||||||
|
size, format);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
- cairo_surface_t *nullSurf =
|
||||||
|
- cairo_null_surface_create(CAIRO_CONTENT_COLOR_ALPHA);
|
||||||
|
- cairo_surface_set_user_data(nullSurf,
|
||||||
|
- &kSourceSurface,
|
||||||
|
- imgSurface,
|
||||||
|
- NULL);
|
||||||
|
- cairo_surface_attach_snapshot(imgSurface->CairoSurface(), nullSurf, SourceSnapshotDetached);
|
||||||
|
- cairo_surface_destroy(nullSurf);
|
||||||
|
+ cairo_surface_set_mime_data(imgSurface->CairoSurface(), "mozilla/magic",
|
||||||
|
+ (const unsigned char *) "data", 4,
|
||||||
|
+ SourceSnapshotDetached, imgSurface.get());
|
||||||
|
}
|
||||||
|
|
||||||
|
srcBuffer->AddRef();
|
||||||
|
aSurface->SetData(&kSourceSurface, srcBuffer, SourceBufferDestroy);
|
||||||
|
|
||||||
|
return srcBuffer;
|
||||||
|
}
|
||||||
|
|
@ -1,53 +0,0 @@
|
|||||||
commit 18b9c9d
|
|
||||||
Author: Martin Stránský <stransky@redhat.com>
|
|
||||||
Date: Fri Feb 10 16:07:41 2012 +0100
|
|
||||||
|
|
||||||
Bug 725655 - gcc 4.7 build failures (missing headers). r=benjamin
|
|
||||||
---
|
|
||||||
ipc/chromium/src/base/file_util_linux.cc | 3 +++
|
|
||||||
ipc/chromium/src/base/message_pump_libevent.cc | 3 +++
|
|
||||||
ipc/chromium/src/base/time_posix.cc | 3 +++
|
|
||||||
3 files changed, 9 insertions(+)
|
|
||||||
|
|
||||||
diff --git ipc/chromium/src/base/file_util_linux.cc ipc/chromium/src/base/file_util_linux.cc
|
|
||||||
index cca706f..171e44f 100644
|
|
||||||
--- ipc/chromium/src/base/file_util_linux.cc
|
|
||||||
+++ ipc/chromium/src/base/file_util_linux.cc
|
|
||||||
@@ -5,6 +5,9 @@
|
|
||||||
#include "base/file_util.h"
|
|
||||||
|
|
||||||
#include <fcntl.h>
|
|
||||||
+#if defined(ANDROID) || defined(OS_POSIX)
|
|
||||||
+#include <unistd.h>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
diff --git ipc/chromium/src/base/message_pump_libevent.cc ipc/chromium/src/base/message_pump_libevent.cc
|
|
||||||
index 6194f79..9f31dbb 100644
|
|
||||||
--- ipc/chromium/src/base/message_pump_libevent.cc
|
|
||||||
+++ ipc/chromium/src/base/message_pump_libevent.cc
|
|
||||||
@@ -6,6 +6,9 @@
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
+#if defined(ANDROID) || defined(OS_POSIX)
|
|
||||||
+#include <unistd.h>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#include "eintr_wrapper.h"
|
|
||||||
#include "base/logging.h"
|
|
||||||
diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc
|
|
||||||
index 8d1a1d5..abf2a56 100644
|
|
||||||
--- ipc/chromium/src/base/time_posix.cc
|
|
||||||
+++ ipc/chromium/src/base/time_posix.cc
|
|
||||||
@@ -13,6 +13,9 @@
|
|
||||||
#else
|
|
||||||
#include <time.h>
|
|
||||||
#endif
|
|
||||||
+#if defined(ANDROID) || defined(OS_POSIX)
|
|
||||||
+#include <unistd.h>
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#include <limits>
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
|||||||
commit 4075972
|
|
||||||
Author: Mike Hommey <mh+mozilla@glandium.org>
|
|
||||||
Date: Thu Feb 23 11:00:46 2012 +0100
|
|
||||||
|
|
||||||
Bug 728968 - Detect clock_gettime when it's not in -lrt. r=khuey
|
|
||||||
---
|
|
||||||
configure.in | 29 ++++++++++++++++-------------
|
|
||||||
1 file changed, 16 insertions(+), 13 deletions(-)
|
|
||||||
|
|
||||||
diff --git configure.in configure.in
|
|
||||||
index 3ba7e2f..3d0614c 100644
|
|
||||||
--- configure.in
|
|
||||||
+++ configure.in
|
|
||||||
@@ -3728,20 +3728,23 @@ AC_CHECK_FUNCS(random strerror lchown fchmod snprintf statvfs memmove rint stat6
|
|
||||||
AC_CHECK_FUNCS(flockfile getpagesize)
|
|
||||||
AC_CHECK_FUNCS(localtime_r strtok_r)
|
|
||||||
|
|
||||||
-dnl check for clock_gettime(), the CLOCK_MONOTONIC clock, and -lrt
|
|
||||||
-_SAVE_LDFLAGS=$LDFLAGS
|
|
||||||
-LDFLAGS="$LDFLAGS -lrt"
|
|
||||||
-AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC) and -lrt,
|
|
||||||
- ac_cv_have_clock_monotonic,
|
|
||||||
- [AC_TRY_LINK([#include <time.h>],
|
|
||||||
- [ struct timespec ts;
|
|
||||||
- clock_gettime(CLOCK_MONOTONIC, &ts); ],
|
|
||||||
- ac_cv_have_clock_monotonic=yes,
|
|
||||||
- ac_cv_have_clock_monotonic=no)])
|
|
||||||
-LDFLAGS=$_SAVE_LDFLAGS
|
|
||||||
-if test "$ac_cv_have_clock_monotonic" = "yes"; then
|
|
||||||
+dnl check for clock_gettime(), the CLOCK_MONOTONIC clock
|
|
||||||
+AC_CACHE_CHECK(for clock_gettime(CLOCK_MONOTONIC),
|
|
||||||
+ ac_cv_clock_monotonic,
|
|
||||||
+ [for libs in "" -lrt; do
|
|
||||||
+ _SAVE_LDFLAGS="$LDFLAGS"
|
|
||||||
+ LDFLAGS="$LDFLAGS $libs"
|
|
||||||
+ AC_TRY_LINK([#include <time.h>],
|
|
||||||
+ [ struct timespec ts;
|
|
||||||
+ clock_gettime(CLOCK_MONOTONIC, &ts); ],
|
|
||||||
+ ac_cv_clock_monotonic=$libs
|
|
||||||
+ break,
|
|
||||||
+ ac_cv_clock_monotonic=no)
|
|
||||||
+ LDFLAGS="$_SAVE_LDFLAGS"
|
|
||||||
+ done])
|
|
||||||
+if test "$ac_cv_clock_monotonic" != "no"; then
|
|
||||||
HAVE_CLOCK_MONOTONIC=1
|
|
||||||
- REALTIME_LIBS=-lrt
|
|
||||||
+ REALTIME_LIBS=$ac_cv_clock_monotonic
|
|
||||||
AC_DEFINE(HAVE_CLOCK_MONOTONIC)
|
|
||||||
AC_SUBST(HAVE_CLOCK_MONOTONIC)
|
|
||||||
AC_SUBST(REALTIME_LIBS)
|
|
@ -1,18 +0,0 @@
|
|||||||
--- dom/plugins/ipc/PluginMessageUtils.cpp
|
|
||||||
+++ dom/plugins/ipc/PluginMessageUtils.cpp
|
|
||||||
@@ -114,6 +114,7 @@ MediateRace(const RPCChannel::Message& parent,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
+#if defined(OS_LINUX)
|
|
||||||
static string
|
|
||||||
ReplaceAll(const string& haystack, const string& needle, const string& with)
|
|
||||||
{
|
|
||||||
@@ -127,6 +128,7 @@ ReplaceAll(const string& haystack, const string& needle, const string& with)
|
|
||||||
|
|
||||||
return munged;
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
string
|
|
||||||
MungePluginDsoPath(const string& path)
|
|
13
www/libxul/files/patch-bug732340
Normal file
13
www/libxul/files/patch-bug732340
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
--- gfx/harfbuzz/src/hb-ot-layout.cc.orig 2012-06-24 22:14:46.463741874 -0400
|
||||||
|
+++ gfx/harfbuzz/src/hb-ot-layout.cc 2012-06-24 22:15:06.784770042 -0400
|
||||||
|
@@ -537,4 +537,10 @@ hb_ot_layout_position_finish (hb_face_t
|
||||||
|
GPOS::position_finish (buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
+#if !defined(__clang__) && defined(__GNUC__) && __GNUC_MINOR__ <= 3
|
||||||
|
+template int SortedArrayOf<Record<LangSys> >::search<unsigned int>(unsigned int const &) const;
|
||||||
|
+template int SortedArrayOf<Record<Script> >::search<unsigned int>(unsigned int const &) const;
|
||||||
|
+template int SortedArrayOf<IntType<unsigned short> >::search<unsigned int>(unsigned int const &) const;
|
||||||
|
+template int SortedArrayOf<RangeRecord>::search<unsigned int>(unsigned int const &) const;
|
||||||
|
+#endif
|
||||||
|
|
@ -1,90 +0,0 @@
|
|||||||
changeset: 91900:eee73897136b
|
|
||||||
user: Martin Stransky <stransky@redhat.com>
|
|
||||||
date: Tue Apr 17 19:57:40 2012 -0400
|
|
||||||
summary: Bug 741737 - Configure libvpx with pkgconfig. r=khuey, a=npotb
|
|
||||||
|
|
||||||
diff --git a/configure.in b/configure.in
|
|
||||||
--- configure.in
|
|
||||||
+++ configure.in
|
|
||||||
@@ -5588,12 +5588,10 @@ MOZ_ARG_DISABLE_BOOL(webm,
|
|
||||||
|
|
||||||
dnl system libvpx Support
|
|
||||||
dnl ========================================================
|
|
||||||
-MOZ_ARG_WITH_STRING(system-libvpx,
|
|
||||||
-[ --with-system-libvpx=[PFX]
|
|
||||||
- Use system libvpx [installed at prefix PFX]],
|
|
||||||
- LIBVPX_DIR=$withval)
|
|
||||||
+MOZ_ARG_WITH_BOOL(system-libvpx,
|
|
||||||
+[ --with-system-libvpx Use system libvpx (located with pkgconfig)],
|
|
||||||
+ MOZ_NATIVE_LIBVPX=1)
|
|
||||||
|
|
||||||
-MOZ_NATIVE_LIBVPX=
|
|
||||||
MOZ_LIBVPX_INCLUDES=
|
|
||||||
MOZ_LIBVPX_LIBS=
|
|
||||||
|
|
||||||
@@ -5606,53 +5604,18 @@ if test -n "$MOZ_WEBM"; then
|
|
||||||
AC_DEFINE(MOZ_VP8_ENCODER)
|
|
||||||
fi
|
|
||||||
|
|
||||||
- if test -n "$LIBVPX_DIR" -a "$LIBVPX_DIR" != no; then
|
|
||||||
- _SAVE_CFLAGS=$CFLAGS
|
|
||||||
- _SAVE_LDFLAGS=$LDFLAGS
|
|
||||||
- _SAVE_LIBS=$LIBS
|
|
||||||
- if test "${LIBVPX_DIR}" = "yes"; then
|
|
||||||
- LIBVPX_DIR=/usr
|
|
||||||
- fi
|
|
||||||
- CFLAGS="-I${LIBVPX_DIR}/include $CFLAGS"
|
|
||||||
- LDFLAGS="-L${LIBVPX_DIR}/lib $LDFLAGS"
|
|
||||||
- MOZ_NATIVE_LIBVPX_DEC_TEST=
|
|
||||||
- MOZ_CHECK_HEADER(vpx/vpx_decoder.h,
|
|
||||||
- [if test ! -f "${LIBVPX_DIR}/include/vpx/vpx_decoder.h"; then
|
|
||||||
- AC_MSG_ERROR([vpx/vpx_decoder.h found, but is not in ${LIBVPX_DIR}/include])
|
|
||||||
- fi],
|
|
||||||
- AC_MSG_ERROR([--with-system-libvpx requested but vpx/vpx_decoder.h not found]))
|
|
||||||
- AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver,
|
|
||||||
- [MOZ_NATIVE_LIBVPX_DEC_TEST=1],
|
|
||||||
- ([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found]))
|
|
||||||
- if test -n "$MOZ_NATIVE_LIBVPX_DEC_TEST" ; then
|
|
||||||
- AC_MSG_CHECKING([for libvpx version >= v0.9.7])
|
|
||||||
- dnl We need at least v0.9.7 to fix several crash bugs (for which we
|
|
||||||
- dnl had local patches prior to v0.9.7).
|
|
||||||
- dnl
|
|
||||||
- dnl This is a terrible test for the library version, but we don't
|
|
||||||
- dnl have a good one. There is no version number in a public header,
|
|
||||||
- dnl and testing the headers still doesn't guarantee we link against
|
|
||||||
- dnl the right version. While we could call vpx_codec_version() at
|
|
||||||
- dnl run-time, that would break cross-compiling. There are no
|
|
||||||
- dnl additional exported symbols between the v0.9.7 release and the
|
|
||||||
- dnl v0.9.6 one to check for.
|
|
||||||
- AC_TRY_COMPILE([
|
|
||||||
- #include <vpx/vpx_decoder.h>
|
|
||||||
- #if !defined(VPX_CODEC_USE_INPUT_PARTITION)
|
|
||||||
- #error "test failed."
|
|
||||||
- #endif
|
|
||||||
- ],
|
|
||||||
- [return 0;],
|
|
||||||
- [AC_MSG_RESULT([yes])
|
|
||||||
- MOZ_NATIVE_LIBVPX=1
|
|
||||||
- MOZ_LIBVPX_INCLUDES="-I${LIBVPX_DIR}/include"
|
|
||||||
- MOZ_LIBVPX_LIBS="-L${LIBVPX_DIR}/lib -lvpx"],
|
|
||||||
- [AC_MSG_RESULT([no])
|
|
||||||
- AC_MSG_ERROR([--with-system-libvpx requested but it is not v0.9.7 or later])])
|
|
||||||
- fi
|
|
||||||
- CFLAGS=$_SAVE_CFLAGS
|
|
||||||
- LDFLAGS=$_SAVE_LDFLAGS
|
|
||||||
- LIBS=$_SAVE_LIBS
|
|
||||||
+ if test -n "$MOZ_NATIVE_LIBVPX"; then
|
|
||||||
+ dnl ============================
|
|
||||||
+ dnl === libvpx Version check ===
|
|
||||||
+ dnl ============================
|
|
||||||
+ dnl Check to see if we have a system libvpx package.
|
|
||||||
+ PKG_CHECK_MODULES(LIBVPX, vpx >= 0.9.7)
|
|
||||||
+
|
|
||||||
+ MOZ_CHECK_HEADER([vpx/vpx_decoder.h], [],
|
|
||||||
+ [AC_MSG_ERROR([Couldn't find vpx/vpx_decoder.h which is required for build with system libvpx. Use --without-system-libvpx to build with in-tree libvpx.])])
|
|
||||||
+
|
|
||||||
+ AC_CHECK_LIB(vpx, vpx_codec_dec_init_ver, [],
|
|
||||||
+ [AC_MSG_ERROR([--with-system-libvpx requested but symbol vpx_codec_dec_init_ver not found])])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
@ -56,7 +56,7 @@ $NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $
|
|||||||
|
|
||||||
--- ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000
|
--- ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000
|
||||||
+++ ipc/chromium/Makefile.in
|
+++ ipc/chromium/Makefile.in
|
||||||
@@ -278,6 +278,34 @@ endif
|
@@ -278,6 +278,33 @@ endif
|
||||||
|
|
||||||
endif # } OS_LINUX
|
endif # } OS_LINUX
|
||||||
|
|
||||||
@ -64,7 +64,6 @@ $NetBSD: patch-ipc_chromium_Makefile.in,v 1.1 2012/03/06 12:34:09 ryoon Exp $
|
|||||||
+
|
+
|
||||||
+CPPSRCS += \
|
+CPPSRCS += \
|
||||||
+ atomicops_internals_x86_gcc.cc \
|
+ atomicops_internals_x86_gcc.cc \
|
||||||
+ file_util_linux.cc \
|
|
||||||
+ process_util_bsd.cc \
|
+ process_util_bsd.cc \
|
||||||
+ time_posix.cc \
|
+ time_posix.cc \
|
||||||
+ $(NULL)
|
+ $(NULL)
|
||||||
@ -381,37 +380,29 @@ diff --git ipc/chromium/src/base/dir_reader_posix.h ipc/chromium/src/base/dir_re
|
|||||||
index 9a34492..62b280c 100644
|
index 9a34492..62b280c 100644
|
||||||
--- ipc/chromium/src/base/dir_reader_posix.h
|
--- ipc/chromium/src/base/dir_reader_posix.h
|
||||||
+++ ipc/chromium/src/base/dir_reader_posix.h
|
+++ ipc/chromium/src/base/dir_reader_posix.h
|
||||||
@@ -18,6 +18,8 @@
|
@@ -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)
|
-#if defined(OS_LINUX) && !defined(OS_OPENBSD)
|
||||||
|
+#if defined(OS_LINUX)
|
||||||
#include "base/dir_reader_linux.h"
|
#include "base/dir_reader_linux.h"
|
||||||
+#elif defined(OS_BSD)
|
+#elif defined(OS_BSD)
|
||||||
+#include "base/dir_reader_bsd.h"
|
+#include "base/dir_reader_bsd.h"
|
||||||
#else
|
#else
|
||||||
#include "base/dir_reader_fallback.h"
|
#include "base/dir_reader_fallback.h"
|
||||||
#endif
|
#endif
|
||||||
@@ -26,6 +28,8 @@
|
|
||||||
|
|
||||||
#if defined(OS_LINUX)
|
namespace base {
|
||||||
|
|
||||||
|
-#if defined(OS_LINUX) && !defined(OS_OPENBSD)
|
||||||
|
+#if defined(OS_LINUX)
|
||||||
typedef DirReaderLinux DirReaderPosix;
|
typedef DirReaderLinux DirReaderPosix;
|
||||||
+#elif defined(OS_BSD)
|
+#elif defined(OS_BSD)
|
||||||
+typedef DirReaderBSD DirReaderPosix;
|
+typedef DirReaderBSD DirReaderPosix;
|
||||||
#else
|
#else
|
||||||
typedef DirReaderFallback DirReaderPosix;
|
typedef DirReaderFallback DirReaderPosix;
|
||||||
#endif
|
#endif
|
||||||
diff --git ipc/chromium/src/base/file_util_linux.cc ipc/chromium/src/base/file_util_linux.cc
|
|
||||||
index 171e44f..0c6dfcc 100644
|
|
||||||
--- ipc/chromium/src/base/file_util_linux.cc
|
|
||||||
+++ ipc/chromium/src/base/file_util_linux.cc
|
|
||||||
@@ -28,7 +28,7 @@ bool GetTempDir(FilePath* path) {
|
|
||||||
}
|
|
||||||
|
|
||||||
bool GetShmemTempDir(FilePath* path) {
|
|
||||||
-#ifdef ANDROID
|
|
||||||
+#if defined(ANDROID) || defined(OS_BSD)
|
|
||||||
return GetTempDir(path);
|
|
||||||
#else
|
|
||||||
*path = FilePath("/dev/shm");
|
|
||||||
$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $
|
$NetBSD: patch-ipc_chromium_src_base_file__util__posix.cc,v 1.2 2012/03/06 12:34:09 ryoon Exp $
|
||||||
|
|
||||||
--- ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000
|
--- ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000
|
||||||
@ -469,7 +460,7 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
|
|||||||
|
|
||||||
--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
|
--- ipc/chromium/src/base/platform_thread_posix.cc.orig 2012-03-13 01:36:53.000000000 +0000
|
||||||
+++ ipc/chromium/src/base/platform_thread_posix.cc
|
+++ ipc/chromium/src/base/platform_thread_posix.cc
|
||||||
@@ -9,9 +9,17 @@
|
@@ -9,16 +9,24 @@
|
||||||
|
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
#include <mach/mach.h>
|
#include <mach/mach.h>
|
||||||
@ -477,21 +468,31 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
|
|||||||
+#include <lwp.h>
|
+#include <lwp.h>
|
||||||
#elif defined(OS_LINUX)
|
#elif defined(OS_LINUX)
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#include <unistd.h>
|
-#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
|
||||||
+#elif defined(OS_DRAGONFLY)
|
#include <sys/prctl.h>
|
||||||
+#include <unistd.h>
|
-#elif !defined(__NetBSD__)
|
||||||
|
-#include <pthread_np.h>
|
||||||
+#elif defined(OS_FREEBSD)
|
+#elif defined(OS_FREEBSD)
|
||||||
+#include <sys/param.h>
|
+#include <sys/param.h>
|
||||||
+#include <sys/thr.h>
|
+#include <sys/thr.h>
|
||||||
+#include <pthread_np.h>
|
#endif
|
||||||
|
+
|
||||||
|
+#if !defined(OS_MACOSX)
|
||||||
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
+#if defined(OS_BSD) && !defined(OS_NETBSD)
|
||||||
|
+#include <pthread_np.h>
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
@@ -38,9 +45,20 @@
|
namespace base {
|
||||||
|
void InitThreading();
|
||||||
|
@@ -38,9 +45,20 @@ PlatformThreadId PlatformThread::CurrentId() {
|
||||||
// into the kernel.
|
// into the kernel.
|
||||||
#if defined(OS_MACOSX)
|
#if defined(OS_MACOSX)
|
||||||
return mach_thread_self();
|
return mach_thread_self();
|
||||||
-#elif defined (__OpenBSD__)
|
-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||||
+#elif defined(OS_NETBSD)
|
+#elif defined(OS_NETBSD)
|
||||||
+ return _lwp_self();
|
+ return _lwp_self();
|
||||||
+#elif defined(OS_DRAGONFLY)
|
+#elif defined(OS_DRAGONFLY)
|
||||||
@ -511,6 +512,18 @@ $NetBSD: patch-ipc_chromium_src_base_platform__thread__posix.cc,v 1.4 2012/04/01
|
|||||||
#elif defined(OS_LINUX)
|
#elif defined(OS_LINUX)
|
||||||
return syscall(__NR_gettid);
|
return syscall(__NR_gettid);
|
||||||
#endif
|
#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 $
|
$NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $
|
||||||
|
|
||||||
--- ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100
|
--- ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100
|
||||||
@ -552,7 +565,7 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
|
|||||||
|
|
||||||
--- ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000
|
--- ipc/chromium/src/base/process_util_bsd.cc.orig 2012-04-01 00:04:28.000000000 +0000
|
||||||
+++ ipc/chromium/src/base/process_util_bsd.cc
|
+++ ipc/chromium/src/base/process_util_bsd.cc
|
||||||
@@ -0,0 +1,318 @@
|
@@ -0,0 +1,367 @@
|
||||||
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
|
+// Copyright (c) 2008 The Chromium Authors. All rights reserved.
|
||||||
+// Use of this source code is governed by a BSD-style license that can be
|
+// Use of this source code is governed by a BSD-style license that can be
|
||||||
+// found in the LICENSE file.
|
+// found in the LICENSE file.
|
||||||
@ -587,6 +600,20 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
|
|||||||
+#define HAVE_POSIX_SPAWN 1
|
+#define HAVE_POSIX_SPAWN 1
|
||||||
+#endif
|
+#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
|
+#ifndef __dso_public
|
||||||
+# ifdef __exported
|
+# ifdef __exported
|
||||||
+# define __dso_public __exported
|
+# define __dso_public __exported
|
||||||
@ -635,6 +662,17 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
|
|||||||
+ const environment_map& env_vars_to_set,
|
+ const environment_map& env_vars_to_set,
|
||||||
+ bool wait, ProcessHandle* process_handle,
|
+ bool wait, ProcessHandle* process_handle,
|
||||||
+ ProcessArchitecture arch) {
|
+ 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;
|
+ bool retval = true;
|
||||||
+
|
+
|
||||||
+ char* argv_copy[argv.size() + 1];
|
+ char* argv_copy[argv.size() + 1];
|
||||||
@ -749,6 +787,17 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
|
|||||||
+ const environment_map& env_vars_to_set,
|
+ const environment_map& env_vars_to_set,
|
||||||
+ bool wait, ProcessHandle* process_handle,
|
+ bool wait, ProcessHandle* process_handle,
|
||||||
+ ProcessArchitecture arch) {
|
+ 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]);
|
+ scoped_array<char*> argv_cstr(new char*[argv.size() + 1]);
|
||||||
+ // Illegal to allocate memory after fork and before execvp
|
+ // Illegal to allocate memory after fork and before execvp
|
||||||
+ InjectiveMultimap fd_shuffle1, fd_shuffle2;
|
+ InjectiveMultimap fd_shuffle1, fd_shuffle2;
|
||||||
@ -771,19 +820,32 @@ $NetBSD: patch-ipc_chromium_src_base_process__util__bsd.cc,v 1.4 2012/04/01 15:1
|
|||||||
+
|
+
|
||||||
+ CloseSuperfluousFds(fd_shuffle2);
|
+ 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();
|
+ for (environment_map::const_iterator it = env_vars_to_set.begin();
|
||||||
+ it != env_vars_to_set.end(); ++it) {
|
+ it != env_vars_to_set.end(); ++it) {
|
||||||
+ if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/))
|
+ if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/))
|
||||||
+ _exit(127);
|
+ _exit(127);
|
||||||
+ }
|
+ }
|
||||||
+
|
+ execv(argv_cstr[0], argv_cstr.get());
|
||||||
+ for (size_t i = 0; i < argv.size(); i++)
|
|
||||||
+ argv_cstr[i] = const_cast<char*>(argv[i].c_str());
|
|
||||||
+ argv_cstr[argv.size()] = NULL;
|
|
||||||
+ execvp(argv_cstr[0], argv_cstr.get());
|
|
||||||
+ // if we get here, we're in serious trouble and should complain loudly
|
+ // if we get here, we're in serious trouble and should complain loudly
|
||||||
+ DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0];
|
+ DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0];
|
||||||
+ exit(127);
|
+ _exit(127);
|
||||||
+ } else {
|
+ } else {
|
||||||
+ gProcessLog.print("==> process %d launched child process %d\n",
|
+ gProcessLog.print("==> process %d launched child process %d\n",
|
||||||
+ GetCurrentProcId(), pid);
|
+ GetCurrentProcId(), pid);
|
||||||
@ -945,57 +1007,6 @@ $NetBSD: patch-ipc_chromium_src_base_sys__info__posix.cc,v 1.2 2011/11/27 13:09:
|
|||||||
#else
|
#else
|
||||||
long pages = sysconf(_SC_PHYS_PAGES);
|
long pages = sysconf(_SC_PHYS_PAGES);
|
||||||
long page_size = sysconf(_SC_PAGE_SIZE);
|
long page_size = sysconf(_SC_PAGE_SIZE);
|
||||||
$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prcpucfg.h,v 1.2 2012/03/06 12:34:09 ryoon Exp $
|
|
||||||
|
|
||||||
--- ipc/chromium/src/base/third_party/nspr/prcpucfg.h.orig 2011-12-20 23:28:19.000000000 +0000
|
|
||||||
+++ ipc/chromium/src/base/third_party/nspr/prcpucfg.h
|
|
||||||
@@ -34,7 +34,7 @@
|
|
||||||
#include "base/third_party/nspr/prcpucfg_win.h"
|
|
||||||
#elif defined(__APPLE__)
|
|
||||||
#include "base/third_party/nspr/prcpucfg_mac.h"
|
|
||||||
-#elif defined(__linux__) || defined(ANDROID)
|
|
||||||
+#elif defined(__linux__) || defined(ANDROID) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__)
|
|
||||||
#include "base/third_party/nspr/prcpucfg_linux.h"
|
|
||||||
#elif defined(__OpenBSD__)
|
|
||||||
#include "base/third_party/nspr/prcpucfg_openbsd.h"
|
|
||||||
$NetBSD: patch-ipc_chromium_src_base_third__party_nspr_prtime.cc,v 1.1 2012/03/06 12:34:09 ryoon Exp $
|
|
||||||
|
|
||||||
--- ipc/chromium/src/base/third_party/nspr/prtime.cc.orig 2011-12-20 23:28:19.000000000 +0000
|
|
||||||
+++ ipc/chromium/src/base/third_party/nspr/prtime.cc
|
|
||||||
@@ -212,7 +212,7 @@ PR_ImplodeTime(const PRExplodedTime *exp
|
|
||||||
LL_ADD(retVal, retVal, temp);
|
|
||||||
|
|
||||||
return retVal;
|
|
||||||
-#elif defined(OS_LINUX)
|
|
||||||
+#elif defined(OS_LINUX) || defined(OS_DRAGONFLY)
|
|
||||||
struct tm exp_tm = {0};
|
|
||||||
exp_tm.tm_sec = exploded->tm_sec;
|
|
||||||
exp_tm.tm_min = exploded->tm_min;
|
|
||||||
@@ -245,6 +245,24 @@ PR_ImplodeTime(const PRExplodedTime *exp
|
|
||||||
result *= kSecondsToMicroseconds;
|
|
||||||
result += exploded->tm_usec;
|
|
||||||
return result;
|
|
||||||
+#elif defined(OS_FREEBSD) || defined(OS_NETBSD)
|
|
||||||
+ struct tm exp_tm = {0};
|
|
||||||
+ exp_tm.tm_sec = exploded->tm_sec;
|
|
||||||
+ exp_tm.tm_min = exploded->tm_min;
|
|
||||||
+ exp_tm.tm_hour = exploded->tm_hour;
|
|
||||||
+ exp_tm.tm_mday = exploded->tm_mday;
|
|
||||||
+ exp_tm.tm_mon = exploded->tm_month;
|
|
||||||
+ exp_tm.tm_year = exploded->tm_year - 1900;
|
|
||||||
+
|
|
||||||
+ // time_t is 64bit
|
|
||||||
+ time_t absolute_time = timegm(&exp_tm);
|
|
||||||
+
|
|
||||||
+ PRTime result = static_cast<PRTime>(absolute_time);
|
|
||||||
+ result -= exploded->tm_params.tp_gmt_offset +
|
|
||||||
+ exploded->tm_params.tp_dst_offset;
|
|
||||||
+ result *= kSecondsToMicroseconds;
|
|
||||||
+ result += exploded->tm_usec;
|
|
||||||
+ return result;
|
|
||||||
#else
|
|
||||||
#error No PR_ImplodeTime implemented on your platform.
|
|
||||||
#endif
|
|
||||||
diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc
|
diff --git ipc/chromium/src/base/time_posix.cc ipc/chromium/src/base/time_posix.cc
|
||||||
index abf2a56..48791f6 100644
|
index abf2a56..48791f6 100644
|
||||||
--- ipc/chromium/src/base/time_posix.cc
|
--- ipc/chromium/src/base/time_posix.cc
|
||||||
@ -1140,11 +1151,11 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoo
|
|||||||
nsCString path;
|
nsCString path;
|
||||||
greDir->GetNativePath(path);
|
greDir->GetNativePath(path);
|
||||||
-# ifdef OS_LINUX
|
-# ifdef OS_LINUX
|
||||||
-# ifdef ANDROID
|
-# ifdef MOZ_WIDGET_ANDROID
|
||||||
+# if defined(OS_LINUX) || defined(OS_BSD)
|
+# if defined(OS_LINUX) || defined(OS_BSD)
|
||||||
+# if defined(ANDROID) || defined(OS_BSD)
|
+# if defined(MOZ_WIDGET_ANDROID) || defined(OS_BSD)
|
||||||
path += "/lib";
|
path += "/lib";
|
||||||
# endif // ANDROID
|
# endif // MOZ_WIDGET_ANDROID
|
||||||
const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH");
|
const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH");
|
||||||
@@ -557,7 +557,7 @@
|
@@ -557,7 +557,7 @@
|
||||||
childArgv.push_back(pidstring);
|
childArgv.push_back(pidstring);
|
||||||
@ -1161,7 +1172,7 @@ $NetBSD: patch-ipc_glue_GeckoChildProcessHost.cpp,v 1.2 2012/03/15 08:30:06 ryoo
|
|||||||
base::LaunchApp(childArgv, mFileMap,
|
base::LaunchApp(childArgv, mFileMap,
|
||||||
-#if defined(OS_LINUX) || defined(OS_MACOSX)
|
-#if defined(OS_LINUX) || defined(OS_MACOSX)
|
||||||
+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
|
+#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
|
||||||
newEnvVars,
|
newEnvVars, privs,
|
||||||
#endif
|
#endif
|
||||||
false, &process, arch);
|
false, &process, arch);
|
||||||
diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h
|
diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h
|
||||||
|
@ -1,88 +0,0 @@
|
|||||||
diff --git xpcom/reflect/xptcall/public/genstubs.pl xpcom/reflect/xptcall/public/genstubs.pl
|
|
||||||
index b8a87a5..918c4cf 100644
|
|
||||||
--- xpcom/reflect/xptcall/public/genstubs.pl
|
|
||||||
+++ xpcom/reflect/xptcall/public/genstubs.pl
|
|
||||||
@@ -44,7 +44,7 @@ print OUTFILE "* 0 is QueryInterface\n";
|
|
||||||
print OUTFILE "* 1 is AddRef\n";
|
|
||||||
print OUTFILE "* 2 is Release\n";
|
|
||||||
print OUTFILE "*/\n";
|
|
||||||
-print OUTFILE "#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))\n";
|
|
||||||
+print OUTFILE "#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))\n";
|
|
||||||
for($i = 0; $i < $entry_count; $i++) {
|
|
||||||
print OUTFILE "NS_IMETHOD Stub",$i+3,"();\n";
|
|
||||||
}
|
|
||||||
diff --git xpcom/reflect/xptcall/public/xptcstubsdecl.inc xpcom/reflect/xptcall/public/xptcstubsdecl.inc
|
|
||||||
index eb66761..807db26 100644
|
|
||||||
--- xpcom/reflect/xptcall/public/xptcstubsdecl.inc
|
|
||||||
+++ xpcom/reflect/xptcall/public/xptcstubsdecl.inc
|
|
||||||
@@ -8,7 +8,7 @@
|
|
||||||
* 1 is AddRef
|
|
||||||
* 2 is Release
|
|
||||||
*/
|
|
||||||
-#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
|
|
||||||
+#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
|
|
||||||
NS_IMETHOD Stub3();
|
|
||||||
NS_IMETHOD Stub4();
|
|
||||||
NS_IMETHOD Stub5();
|
|
||||||
diff --git xpcom/reflect/xptcall/src/md/unix/Makefile.in xpcom/reflect/xptcall/src/md/unix/Makefile.in
|
|
||||||
index ae6ed66..2783957 100644
|
|
||||||
--- xpcom/reflect/xptcall/src/md/unix/Makefile.in
|
|
||||||
+++ xpcom/reflect/xptcall/src/md/unix/Makefile.in
|
|
||||||
@@ -70,7 +70,7 @@ endif
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
# IA64 Linux
|
|
||||||
-ifneq (,$(filter Linux,$(OS_ARCH)))
|
|
||||||
+ifneq (,$(filter Linux FreeBSD,$(OS_ARCH)))
|
|
||||||
ifneq (,$(findstring ia64,$(OS_TEST)))
|
|
||||||
CPPSRCS := xptcinvoke_ipf64.cpp xptcstubs_ipf64.cpp
|
|
||||||
ASFILES := xptcstubs_asm_ipf64.s xptcinvoke_asm_ipf64.s
|
|
||||||
@@ -269,7 +269,7 @@ endif
|
|
||||||
#
|
|
||||||
# Linux/PPC
|
|
||||||
#
|
|
||||||
-ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc)
|
|
||||||
+ifneq (,$(filter Linuxpowerpc FreeBSDpowerpc,$(OS_ARCH)$(OS_TEST)))
|
|
||||||
CPPSRCS := xptcinvoke_ppc_linux.cpp xptcstubs_ppc_linux.cpp
|
|
||||||
ASFILES := xptcinvoke_asm_ppc_linux.s xptcstubs_asm_ppc_linux.s
|
|
||||||
AS := $(CC) -c -x assembler-with-cpp
|
|
||||||
@@ -278,7 +278,7 @@ endif
|
|
||||||
#
|
|
||||||
# Linux/PPC64
|
|
||||||
#
|
|
||||||
-ifeq ($(OS_ARCH)$(OS_TEST),Linuxpowerpc64)
|
|
||||||
+ifneq (,$(filter Linuxpowerpc64 FreeBSDpowerpc64,$(OS_ARCH)$(OS_TEST)))
|
|
||||||
CPPSRCS := xptcinvoke_ppc64_linux.cpp xptcstubs_ppc64_linux.cpp
|
|
||||||
ASFILES := xptcinvoke_asm_ppc64_linux.s xptcstubs_asm_ppc64_linux.s
|
|
||||||
AS := $(CC) -c -x assembler-with-cpp
|
|
||||||
@@ -350,7 +350,7 @@ endif
|
|
||||||
#
|
|
||||||
# OpenBSD/SPARC64
|
|
||||||
#
|
|
||||||
-ifeq ($(OS_ARCH)$(OS_TEST),OpenBSDsparc64)
|
|
||||||
+ifneq (,$(filter OpenBSDsparc64 FreeBSDsparc64,$(OS_ARCH)$(OS_TEST)))
|
|
||||||
CPPSRCS := xptcinvoke_sparc64_openbsd.cpp xptcstubs_sparc64_openbsd.cpp
|
|
||||||
ASFILES := xptcinvoke_asm_sparc64_openbsd.s xptcstubs_asm_sparc64_openbsd.s
|
|
||||||
endif
|
|
||||||
diff --git xpcom/reflect/xptcall/src/xptcprivate.h xpcom/reflect/xptcall/src/xptcprivate.h
|
|
||||||
index d903ced..e4ec832 100644
|
|
||||||
--- xpcom/reflect/xptcall/src/xptcprivate.h
|
|
||||||
+++ xpcom/reflect/xptcall/src/xptcprivate.h
|
|
||||||
@@ -14,7 +14,7 @@
|
|
||||||
|
|
||||||
class xptiInterfaceEntry;
|
|
||||||
|
|
||||||
-#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
|
|
||||||
+#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
|
|
||||||
#define STUB_ENTRY(n) NS_IMETHOD Stub##n() = 0;
|
|
||||||
#else
|
|
||||||
#define STUB_ENTRY(n) NS_IMETHOD Stub##n(PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64) = 0;
|
|
||||||
@@ -31,7 +31,7 @@ public:
|
|
||||||
#undef STUB_ENTRY
|
|
||||||
#undef SENTINEL_ENTRY
|
|
||||||
|
|
||||||
-#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__))
|
|
||||||
+#if !defined(__ia64) || (!defined(__hpux) && !defined(__linux__) && !defined(__FreeBSD__))
|
|
||||||
#define STUB_ENTRY(n) NS_IMETHOD Stub##n();
|
|
||||||
#else
|
|
||||||
#define STUB_ENTRY(n) NS_IMETHOD Stub##n(PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64,PRUint64);
|
|
@ -1,21 +0,0 @@
|
|||||||
--- memory/mozalloc/mozalloc.cpp~
|
|
||||||
+++ memory/mozalloc/mozalloc.cpp
|
|
||||||
@@ -52,6 +52,9 @@
|
|
||||||
#if defined(XP_UNIX)
|
|
||||||
# include <unistd.h> // for valloc on *BSD
|
|
||||||
#endif //if defined(XP_UNIX)
|
|
||||||
+#ifdef __FreeBSD__
|
|
||||||
+# include <malloc_np.h> // for malloc_usable_size
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
#if defined(MOZ_MEMORY)
|
|
||||||
// jemalloc.h doesn't redeclare symbols if they're provided by the OS
|
|
||||||
@@ -259,7 +262,7 @@ moz_malloc_usable_size(void *ptr)
|
|
||||||
|
|
||||||
#if defined(XP_MACOSX)
|
|
||||||
return malloc_size(ptr);
|
|
||||||
-#elif defined(MOZ_MEMORY)
|
|
||||||
+#elif defined(MOZ_MEMORY) || defined(__FreeBSD__)
|
|
||||||
return malloc_usable_size(ptr);
|
|
||||||
#elif defined(XP_WIN)
|
|
||||||
return _msize(ptr);
|
|
@ -1,11 +1,11 @@
|
|||||||
--- toolkit/xre/nsAppRunner.cpp~
|
--- toolkit/xre/nsAppRunner.cpp~
|
||||||
+++ toolkit/xre/nsAppRunner.cpp
|
+++ toolkit/xre/nsAppRunner.cpp
|
||||||
@@ -3133,7 +3133,7 @@ XRE_main(int argc, char* argv[], const n
|
@@ -3833,7 +3833,7 @@ XREMain::XRE_main(int argc, char* argv[]
|
||||||
gQtOnlyArgv[gQtOnlyArgc] = nsnull;
|
ScopedLogging log;
|
||||||
#endif
|
|
||||||
#if defined(MOZ_WIDGET_GTK2)
|
#if defined(MOZ_WIDGET_GTK)
|
||||||
-#ifdef MOZ_MEMORY
|
-#ifdef MOZ_MEMORY
|
||||||
+#if defined(MOZ_MEMORY) || defined(__FreeBSD__) || defined(__NetBSD__)
|
+#if defined(MOZ_MEMORY) || defined(__FreeBSD__) || defined(__NetBSD__)
|
||||||
// Disable the slice allocator, since jemalloc already uses similar layout
|
// Disable the slice allocator, since jemalloc already uses similar layout
|
||||||
// algorithms, and using a sub-allocator tends to increase fragmentation.
|
// algorithms, and using a sub-allocator tends to increase fragmentation.
|
||||||
// This must be done before g_thread_init() is called.
|
// This must be done before g_thread_init() is called.
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
--- gfx/ycbcr/Makefile.in
|
|
||||||
+++ gfx/ycbcr/Makefile.in
|
|
||||||
@@ -54,23 +54,13 @@ CPPSRCS += yuv_row_win.cpp \
|
|
||||||
$(NULL)
|
|
||||||
endif
|
|
||||||
else
|
|
||||||
-ifeq ($(OS_ARCH),Linux)
|
|
||||||
-CPPSRCS += yuv_row_posix.cpp \
|
|
||||||
- $(NULL)
|
|
||||||
-else
|
|
||||||
-ifeq ($(OS_ARCH),SunOS)
|
|
||||||
-CPPSRCS += yuv_row_posix.cpp \
|
|
||||||
- $(NULL)
|
|
||||||
-else
|
|
||||||
-ifeq ($(OS_ARCH),Darwin)
|
|
||||||
+ifneq (,$(filter Linux SunOS Darwin DragonFly FreeBSD NetBSD OpenBSD, $(OS_ARCH)))
|
|
||||||
CPPSRCS += yuv_row_posix.cpp \
|
|
||||||
$(NULL)
|
|
||||||
else
|
|
||||||
CPPSRCS += yuv_row_other.cpp \
|
|
||||||
$(NULL)
|
|
||||||
-endif # Darwin
|
|
||||||
-endif # SunOS
|
|
||||||
-endif # linux
|
|
||||||
+endif # posix
|
|
||||||
endif # windows
|
|
||||||
|
|
||||||
ifeq (arm,$(findstring arm,$(OS_TEST)))
|
|
@ -1,10 +0,0 @@
|
|||||||
--- xpcom/base/nsStackWalk.cpp.orig 2010-12-15 02:03:41.000000000 +0100
|
|
||||||
+++ xpcom/base/nsStackWalk.cpp 2010-12-15 11:28:20.000000000 +0100
|
|
||||||
@@ -1123,6 +1123,7 @@ NS_StackWalk(NS_WalkStackCallback aCallb
|
|
||||||
|
|
||||||
#elif defined(HAVE__UNWIND_BACKTRACE)
|
|
||||||
|
|
||||||
+#define _GNU_SOURCE
|
|
||||||
// libgcc_s.so symbols _Unwind_Backtrace@@GCC_3.3 and _Unwind_GetIP@@GCC_3.0
|
|
||||||
#include <unwind.h>
|
|
||||||
|
|
@ -1,20 +1,14 @@
|
|||||||
--- widget/src/qt/nsNativeThemeQt.cpp~
|
--- gfx/skia/Makefile.in~
|
||||||
+++ widget/src/qt/nsNativeThemeQt.cpp
|
+++ gfx/skia/Makefile.in
|
||||||
@@ -25,7 +25,6 @@
|
@@ -339,10 +339,9 @@ CPPSRCS += \
|
||||||
#include "nsThemeConstants.h"
|
SkMMapStream.cpp \
|
||||||
#include "nsIServiceManager.h"
|
SkOSFile.cpp \
|
||||||
#include "nsIDOMHTMLInputElement.h"
|
$(NULL)
|
||||||
-#include <malloc.h>
|
-ifeq (Linux,$(OS_TARGET))
|
||||||
|
+ifneq (,$(or $(MOZ_X11),$(filter Linux,$(OS_TARGET))))
|
||||||
|
CPPSRCS += \
|
||||||
#include "gfxASurface.h"
|
SkFontHost_linux.cpp \
|
||||||
--- widget/src/qt/nsSound.cpp~
|
- SkFontHost_tables.cpp \
|
||||||
+++ widget/src/qt/nsSound.cpp
|
SkTime_Unix.cpp \
|
||||||
@@ -40,6 +40,7 @@
|
$(NULL)
|
||||||
#include <QSound>
|
endif
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
+#include <unistd.h>
|
|
||||||
|
|
||||||
#include "nscore.h"
|
|
||||||
#include "plstr.h"
|
|
||||||
|
52
www/libxul/files/patch-bug784631
Normal file
52
www/libxul/files/patch-bug784631
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
commit 66b3921
|
||||||
|
Author: Terrence Cole <terrence@mozilla.com>
|
||||||
|
Date: Tue Sep 11 12:31:04 2012 -0700
|
||||||
|
|
||||||
|
Bug 784631 - Fix some clang build errors in SpiderMonkey; r=Waldo f=espindola
|
||||||
|
|
||||||
|
Computed gotos are not in the C++ standard: clang and gcc differ on semantics.
|
||||||
|
---
|
||||||
|
js/src/jsinterp.cpp | 3 ++-
|
||||||
|
js/src/jsutil.h | 8 ++++----
|
||||||
|
2 files changed, 6 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git js/src/jsinterp.cpp js/src/jsinterp.cpp
|
||||||
|
index 0094c72..27a64a7 100644
|
||||||
|
--- js/src/jsinterp.cpp
|
||||||
|
+++ js/src/jsinterp.cpp
|
||||||
|
@@ -1231,6 +1231,7 @@ js::Interpret(JSContext *cx, StackFrame *entryFrame, InterpMode interpMode)
|
||||||
|
RootedPropertyName rootName0(cx);
|
||||||
|
RootedId rootId0(cx);
|
||||||
|
RootedShape rootShape0(cx);
|
||||||
|
+ DebugOnly<uint32_t> blockDepth;
|
||||||
|
|
||||||
|
if (!entryFrame)
|
||||||
|
entryFrame = regs.fp();
|
||||||
|
@@ -3650,7 +3651,7 @@ BEGIN_CASE(JSOP_LEAVEBLOCK)
|
||||||
|
BEGIN_CASE(JSOP_LEAVEFORLETIN)
|
||||||
|
BEGIN_CASE(JSOP_LEAVEBLOCKEXPR)
|
||||||
|
{
|
||||||
|
- DebugOnly<uint32_t> blockDepth = regs.fp()->blockChain().stackDepth();
|
||||||
|
+ blockDepth = regs.fp()->blockChain().stackDepth();
|
||||||
|
|
||||||
|
regs.fp()->popBlock(cx);
|
||||||
|
|
||||||
|
diff --git js/src/jsutil.h js/src/jsutil.h
|
||||||
|
index 8838b6f..016a877 100644
|
||||||
|
--- js/src/jsutil.h
|
||||||
|
+++ js/src/jsutil.h
|
||||||
|
@@ -432,10 +432,10 @@ typedef size_t jsbitmap;
|
||||||
|
#if defined(__clang__)
|
||||||
|
# define JS_SILENCE_UNUSED_VALUE_IN_EXPR(expr) \
|
||||||
|
JS_BEGIN_MACRO \
|
||||||
|
- _Pragma("clang diagnostic push") \
|
||||||
|
- _Pragma("clang diagnostic ignored \"-Wunused-value\"") \
|
||||||
|
- expr; \
|
||||||
|
- _Pragma("clang diagnostic pop") \
|
||||||
|
+ _Pragma("(clang diagnostic push)") \
|
||||||
|
+ _Pragma("(clang diagnostic ignored \"-Wunused-value\")") \
|
||||||
|
+ {expr;} \
|
||||||
|
+ _Pragma("(clang diagnostic pop)") \
|
||||||
|
JS_END_MACRO
|
||||||
|
#elif (__GNUC__ >= 5) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
|
||||||
|
# define JS_SILENCE_UNUSED_VALUE_IN_EXPR(expr) \
|
@ -1,22 +0,0 @@
|
|||||||
--- intl/locale/src/unix/nsDateTimeFormatUnix.cpp~
|
|
||||||
+++ intl/locale/src/unix/nsDateTimeFormatUnix.cpp
|
|
||||||
@@ -100,7 +100,7 @@ void nsDateTimeFormatUnix::LocalePreferr
|
|
||||||
struct tm *tmc;
|
|
||||||
int i;
|
|
||||||
|
|
||||||
- tt = time((time_t)NULL);
|
|
||||||
+ tt = time(NULL);
|
|
||||||
tmc = localtime(&tt);
|
|
||||||
|
|
||||||
tmc->tm_hour=22; // put the test sample hour to 22:00 which is 10PM
|
|
||||||
--- xpcom/glue/nsBaseHashtable.h~
|
|
||||||
+++ xpcom/glue/nsBaseHashtable.h
|
|
||||||
@@ -147,7 +147,7 @@ public:
|
|
||||||
{
|
|
||||||
EntryType* ent = this->GetEntry(aKey);
|
|
||||||
if (!ent)
|
|
||||||
- return NULL;
|
|
||||||
+ return 0;
|
|
||||||
|
|
||||||
return ent->mData;
|
|
||||||
}
|
|
36
www/libxul/files/patch-bug786995
Normal file
36
www/libxul/files/patch-bug786995
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Bug 786995 - configure should check for SSSE3 support in the whole toolchain
|
||||||
|
|
||||||
|
--- configure.in.orig 2012-09-02 00:37:29.000000000 +0200
|
||||||
|
+++ 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
|
||||||
|
--- gfx/skia/Makefile.in.orig 2012-09-02 00:39:00.000000000 +0200
|
||||||
|
+++ 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
|
12
www/libxul/files/patch-bug787904
Normal file
12
www/libxul/files/patch-bug787904
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--- js/src/gc/Heap.h
|
||||||
|
+++ 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;
|
@ -1,16 +1,5 @@
|
|||||||
# Bug 788039 - With no prefix search libevent via pkg-config.
|
# Bug 788039 - With no prefix search libevent via pkg-config.
|
||||||
|
|
||||||
--- config/autoconf.mk.in~
|
|
||||||
+++ config/autoconf.mk.in
|
|
||||||
@@ -227,7 +227,7 @@ MOZ_HUNSPELL_CFLAGS = @MOZ_HUNSPELL_CFLA
|
|
||||||
|
|
||||||
MOZ_NATIVE_LIBEVENT = @MOZ_NATIVE_LIBEVENT@
|
|
||||||
MOZ_LIBEVENT_LIBS = @MOZ_LIBEVENT_LIBS@
|
|
||||||
-MOZ_LIBEVENT_INCLUDES = @MOZ_LIBEVENT_INCLUDES@
|
|
||||||
+MOZ_LIBEVENT_CFLAGS = @MOZ_LIBEVENT_CFLAGS@
|
|
||||||
|
|
||||||
MOZ_NATIVE_LIBVPX = @MOZ_NATIVE_LIBVPX@
|
|
||||||
MOZ_LIBVPX_LIBS = @MOZ_LIBVPX_LIBS@
|
|
||||||
--- configure.in~
|
--- configure.in~
|
||||||
+++ configure.in
|
+++ configure.in
|
||||||
@@ -3854,7 +3854,7 @@ fi
|
@@ -3854,7 +3854,7 @@ fi
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
-//A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
|
-//A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
|
||||||
-#ifdef __FreeBSD__
|
-#ifdef __FreeBSD__
|
||||||
-#include <ieeefp.h>
|
-#include <ieeefp.h>
|
||||||
-#ifdef __alpha__
|
-#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;
|
-static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP;
|
||||||
-#else
|
-#else
|
||||||
-static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML;
|
-static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML;
|
||||||
|
299
www/libxul/files/patch-bug788955
Normal file
299
www/libxul/files/patch-bug788955
Normal file
@ -0,0 +1,299 @@
|
|||||||
|
diff --git Makefile.in Makefile.in
|
||||||
|
index e341462..f75bd55 100644
|
||||||
|
--- Makefile.in
|
||||||
|
+++ Makefile.in
|
||||||
|
@@ -48,8 +48,10 @@ endif
|
||||||
|
ifdef MOZ_MEMORY
|
||||||
|
tier_base_dirs += memory/mozjemalloc
|
||||||
|
ifdef MOZ_JEMALLOC
|
||||||
|
+ifndef MOZ_NATIVE_JEMALLOC
|
||||||
|
tier_base_dirs += memory/jemalloc
|
||||||
|
endif
|
||||||
|
+endif
|
||||||
|
tier_base_dirs += memory/build
|
||||||
|
endif
|
||||||
|
ifndef MOZ_NATIVE_ZLIB
|
||||||
|
diff --git allmakefiles.sh allmakefiles.sh
|
||||||
|
index 6a9be4b..d2e49e3 100755
|
||||||
|
--- allmakefiles.sh
|
||||||
|
+++ allmakefiles.sh
|
||||||
|
@@ -59,7 +59,7 @@ if [ ! "$LIBXUL_SDK" ]; then
|
||||||
|
mozglue/Makefile
|
||||||
|
mozglue/build/Makefile
|
||||||
|
"
|
||||||
|
- if [ "$MOZ_JEMALLOC" ]; then
|
||||||
|
+ if [ "$MOZ_JEMALLOC" -a -z "$MOZ_NATIVE_JEMALLOC" ]; then
|
||||||
|
add_makefiles "
|
||||||
|
memory/jemalloc/Makefile
|
||||||
|
"
|
||||||
|
diff --git configure.in configure.in
|
||||||
|
index bb05782..2f32516 100644
|
||||||
|
--- configure.in
|
||||||
|
+++ configure.in
|
||||||
|
@@ -3711,21 +3711,22 @@ fi
|
||||||
|
|
||||||
|
dnl Check for the existence of various allocation headers/functions
|
||||||
|
|
||||||
|
+MALLOC_HEADERS="malloc.h malloc_np.h malloc/malloc.h sys/malloc.h"
|
||||||
|
MALLOC_H=
|
||||||
|
-MOZ_CHECK_HEADER(malloc.h, [MALLOC_H=malloc.h])
|
||||||
|
-if test "$MALLOC_H" = ""; then
|
||||||
|
- MOZ_CHECK_HEADER(malloc/malloc.h, [MALLOC_H=malloc/malloc.h])
|
||||||
|
- if test "$MALLOC_H" = ""; then
|
||||||
|
- MOZ_CHECK_HEADER(sys/malloc.h, [MALLOC_H=sys/malloc.h])
|
||||||
|
+
|
||||||
|
+for file in $MALLOC_HEADERS; do
|
||||||
|
+ MOZ_CHECK_HEADER($file, [MALLOC_H=$file])
|
||||||
|
+ if test "$MALLOC_H" != ""; then
|
||||||
|
+ AC_DEFINE_UNQUOTED(MALLOC_H, <$MALLOC_H>)
|
||||||
|
+ break
|
||||||
|
fi
|
||||||
|
-fi
|
||||||
|
-if test "$MALLOC_H" != ""; then
|
||||||
|
- AC_DEFINE_UNQUOTED(MALLOC_H, <$MALLOC_H>)
|
||||||
|
-fi
|
||||||
|
+done
|
||||||
|
|
||||||
|
MOZ_ALLOCATING_FUNCS="strndup posix_memalign memalign valloc"
|
||||||
|
AC_CHECK_FUNCS(strndup posix_memalign memalign valloc)
|
||||||
|
|
||||||
|
+AC_CHECK_FUNCS(malloc_usable_size)
|
||||||
|
+
|
||||||
|
dnl See if compiler supports some gcc-style attributes
|
||||||
|
|
||||||
|
AC_CACHE_CHECK(for __attribute__((always_inline)),
|
||||||
|
@@ -6939,6 +6940,18 @@ else
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$MOZ_MEMORY"; then
|
||||||
|
+ if test -n "$MOZ_JEMALLOC"; then
|
||||||
|
+ MOZ_NATIVE_JEMALLOC=1
|
||||||
|
+ AC_CHECK_FUNCS(mallctl nallocm,,
|
||||||
|
+ [MOZ_NATIVE_JEMALLOC=
|
||||||
|
+ break])
|
||||||
|
+ if test -n "$MOZ_NATIVE_JEMALLOC"; then
|
||||||
|
+ MOZ_MEMORY=1
|
||||||
|
+ AC_DEFINE(MOZ_MEMORY)
|
||||||
|
+ AC_DEFINE(MOZ_JEMALLOC)
|
||||||
|
+ AC_DEFINE(MOZ_NATIVE_JEMALLOC)
|
||||||
|
+ fi
|
||||||
|
+ fi
|
||||||
|
case "${target}" in
|
||||||
|
*-mingw*)
|
||||||
|
if test -z "$WIN32_REDIST_DIR" -a -z "$MOZ_DEBUG"; then
|
||||||
|
@@ -7033,6 +7046,7 @@ else
|
||||||
|
fi # MOZ_MEMORY
|
||||||
|
AC_SUBST(MOZ_MEMORY)
|
||||||
|
AC_SUBST(MOZ_JEMALLOC)
|
||||||
|
+AC_SUBST(MOZ_NATIVE_JEMALLOC)
|
||||||
|
AC_SUBST(MOZ_GLUE_LDFLAGS)
|
||||||
|
AC_SUBST(MOZ_GLUE_PROGRAM_LDFLAGS)
|
||||||
|
AC_SUBST(WIN32_CRT_LIBS)
|
||||||
|
@@ -8820,10 +8834,22 @@ fi
|
||||||
|
|
||||||
|
# Run jemalloc configure script
|
||||||
|
|
||||||
|
-if test "$MOZ_JEMALLOC" -a "$MOZ_MEMORY"; then
|
||||||
|
+if test -z "$MOZ_NATIVE_JEMALLOC" -a "$MOZ_JEMALLOC" -a "$MOZ_MEMORY" ; then
|
||||||
|
ac_configure_args="$_SUBDIR_CONFIG_ARGS --build=$build --host=$target --enable-stats --with-jemalloc-prefix=je_"
|
||||||
|
- if test "$OS_ARCH" = "Linux"; then
|
||||||
|
- MANGLE="malloc calloc valloc free realloc memalign posix_memalign malloc_usable_size"
|
||||||
|
+ case "$OS_ARCH" in
|
||||||
|
+ Linux|DragonFly|FreeBSD|NetBSD|OpenBSD)
|
||||||
|
+ MANGLE="malloc calloc valloc free realloc posix_memalign"
|
||||||
|
+ case "$OS_ARCH" in
|
||||||
|
+ Linux)
|
||||||
|
+ MANGLE="$MANGLE memalign malloc_usable_size"
|
||||||
|
+ ;;
|
||||||
|
+ FreeBSD)
|
||||||
|
+ MANGLE="$MANGLE malloc_usable_size"
|
||||||
|
+ ;;
|
||||||
|
+ esac
|
||||||
|
+ ;;
|
||||||
|
+ esac
|
||||||
|
+ if test -n "$MANGLE"; then
|
||||||
|
MANGLED=
|
||||||
|
JEMALLOC_WRAPPER=
|
||||||
|
if test -n "$_WRAP_MALLOC"; then
|
||||||
|
diff --git memory/build/Makefile.in memory/build/Makefile.in
|
||||||
|
index dca0f48..af93ee0 100644
|
||||||
|
--- memory/build/Makefile.in
|
||||||
|
+++ memory/build/Makefile.in
|
||||||
|
@@ -22,7 +22,9 @@ CSRCS = extraMallocFuncs.c
|
||||||
|
|
||||||
|
ifdef MOZ_JEMALLOC
|
||||||
|
CSRCS += mozjemalloc_compat.c
|
||||||
|
+ifndef MOZ_NATIVE_JEMALLOC
|
||||||
|
SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/jemalloc)
|
||||||
|
+endif
|
||||||
|
else
|
||||||
|
SHARED_LIBRARY_LIBS += $(call EXPAND_LIBNAME_PATH,jemalloc,$(DEPTH)/memory/mozjemalloc)
|
||||||
|
endif
|
||||||
|
diff --git memory/build/extraMallocFuncs.c memory/build/extraMallocFuncs.c
|
||||||
|
index 9d87629..03c8320 100644
|
||||||
|
--- memory/build/extraMallocFuncs.c
|
||||||
|
+++ memory/build/extraMallocFuncs.c
|
||||||
|
@@ -94,8 +94,16 @@ wrap(wcsdup)(const wchar_t *src)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MOZ_JEMALLOC
|
||||||
|
+
|
||||||
|
+#undef wrap
|
||||||
|
+#if defined(MOZ_NATIVE_JEMALLOC)
|
||||||
|
+#define wrap(a) a
|
||||||
|
+#else
|
||||||
|
+#define wrap(a) je_ ## a
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/* Override some jemalloc defaults */
|
||||||
|
-const char *je_malloc_conf = "narenas:1,lg_chunk:20";
|
||||||
|
+MOZ_EXPORT_DATA(const char *) wrap(malloc_conf) = "narenas:1,lg_chunk:20";
|
||||||
|
|
||||||
|
#ifdef ANDROID
|
||||||
|
#include <android/log.h>
|
||||||
|
diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c
|
||||||
|
index 10a845a..94ad96e 100644
|
||||||
|
--- memory/build/mozjemalloc_compat.c
|
||||||
|
+++ memory/build/mozjemalloc_compat.c
|
||||||
|
@@ -5,14 +5,21 @@
|
||||||
|
#include "mozilla/Types.h"
|
||||||
|
#include "jemalloc_types.h"
|
||||||
|
|
||||||
|
-extern int je_mallctl(const char*, void*, size_t*, void*, size_t);
|
||||||
|
+#if defined(MOZ_NATIVE_JEMALLOC)
|
||||||
|
+#define wrap(a) a
|
||||||
|
+#else
|
||||||
|
+#define wrap(a) je_ ## a
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
-MOZ_EXPORT_API (void)
|
||||||
|
+extern MOZ_IMPORT_API(int)
|
||||||
|
+wrap(mallctl)(const char*, void*, size_t*, void*, size_t);
|
||||||
|
+
|
||||||
|
+MOZ_EXPORT_API(void)
|
||||||
|
jemalloc_stats(jemalloc_stats_t *stats)
|
||||||
|
{
|
||||||
|
size_t size = sizeof(stats->mapped);
|
||||||
|
- je_mallctl("stats.mapped", &stats->mapped, &size, NULL, 0);
|
||||||
|
- je_mallctl("stats.allocated", &stats->allocated, &size, NULL, 0);
|
||||||
|
+ wrap(mallctl)("stats.mapped", &stats->mapped, &size, NULL, 0);
|
||||||
|
+ wrap(mallctl)("stats.allocated", &stats->allocated, &size, NULL, 0);
|
||||||
|
stats->committed = -1;
|
||||||
|
stats->dirty = -1;
|
||||||
|
}
|
||||||
|
diff --git memory/jemalloc/src/src/mutex.c memory/jemalloc/src/src/mutex.c
|
||||||
|
index 37a843e..55e18c2 100644
|
||||||
|
--- memory/jemalloc/src/src/mutex.c
|
||||||
|
+++ memory/jemalloc/src/src/mutex.c
|
||||||
|
@@ -64,7 +64,7 @@ pthread_create(pthread_t *__restrict thread,
|
||||||
|
/******************************************************************************/
|
||||||
|
|
||||||
|
#ifdef JEMALLOC_MUTEX_INIT_CB
|
||||||
|
-int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
|
||||||
|
+JEMALLOC_EXPORT int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex,
|
||||||
|
void *(calloc_cb)(size_t, size_t));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
diff --git memory/mozalloc/mozalloc.cpp memory/mozalloc/mozalloc.cpp
|
||||||
|
index 5b61050b..5b3399a 100644
|
||||||
|
--- memory/mozalloc/mozalloc.cpp
|
||||||
|
+++ memory/mozalloc/mozalloc.cpp
|
||||||
|
@@ -12,16 +12,13 @@
|
||||||
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
#if defined(MALLOC_H)
|
||||||
|
-# include MALLOC_H // for memalign, valloc where available
|
||||||
|
+# include MALLOC_H // for memalign, valloc, malloc_size, malloc_usable_size
|
||||||
|
#endif // if defined(MALLOC_H)
|
||||||
|
#include <stddef.h> // for size_t
|
||||||
|
#include <stdlib.h> // for malloc, free
|
||||||
|
#if defined(XP_UNIX)
|
||||||
|
# include <unistd.h> // for valloc on *BSD
|
||||||
|
#endif //if defined(XP_UNIX)
|
||||||
|
-#if defined(__FreeBSD__)
|
||||||
|
-# include <malloc_np.h> // for malloc_usable_size
|
||||||
|
-#endif // if defined(__FreeBSD__)
|
||||||
|
|
||||||
|
#if defined(XP_WIN) || (defined(XP_OS2) && defined(__declspec))
|
||||||
|
# define MOZALLOC_EXPORT __declspec(dllexport)
|
||||||
|
@@ -213,8 +210,7 @@ moz_malloc_usable_size(void *ptr)
|
||||||
|
|
||||||
|
#if defined(XP_MACOSX)
|
||||||
|
return malloc_size(ptr);
|
||||||
|
-#elif defined(MOZ_MEMORY) || (defined(XP_LINUX) && !defined(ANDROID)) || defined(__FreeBSD__)
|
||||||
|
- // Android bionic libc doesn't have malloc_usable_size.
|
||||||
|
+#elif defined(HAVE_MALLOC_USABLE_SIZE) || defined(MOZ_MEMORY)
|
||||||
|
return malloc_usable_size(ptr);
|
||||||
|
#elif defined(XP_WIN)
|
||||||
|
return _msize(ptr);
|
||||||
|
diff --git memory/mozjemalloc/jemalloc.h memory/mozjemalloc/jemalloc.h
|
||||||
|
index f0e0878..2486e83 100644
|
||||||
|
--- memory/mozjemalloc/jemalloc.h
|
||||||
|
+++ memory/mozjemalloc/jemalloc.h
|
||||||
|
@@ -37,22 +37,29 @@
|
||||||
|
#endif
|
||||||
|
#include "jemalloc_types.h"
|
||||||
|
|
||||||
|
+#if defined(MOZ_NATIVE_JEMALLOC)
|
||||||
|
+#define wrap(a) a
|
||||||
|
+#else
|
||||||
|
+#define wrap(a) je_ ## a
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#if defined(MOZ_MEMORY_LINUX)
|
||||||
|
+#if defined(MOZ_NATIVE_JEMALLOC) \
|
||||||
|
+ || defined(MOZ_MEMORY_LINUX) || defined(MOZ_MEMORY_BSD)
|
||||||
|
__attribute__((weak))
|
||||||
|
#endif
|
||||||
|
void jemalloc_stats(jemalloc_stats_t *stats);
|
||||||
|
|
||||||
|
/* Computes the usable size in advance. */
|
||||||
|
#if !defined(MOZ_MEMORY_DARWIN)
|
||||||
|
-#if defined(MOZ_MEMORY_LINUX)
|
||||||
|
+#if defined(MOZ_MEMORY_LINUX) || defined(MOZ_MEMORY_BSD)
|
||||||
|
__attribute__((weak))
|
||||||
|
#endif
|
||||||
|
#if defined(MOZ_JEMALLOC)
|
||||||
|
-int je_nallocm(size_t *rsize, size_t size, int flags);
|
||||||
|
+MOZ_IMPORT_API(int) wrap(nallocm)(size_t *rsize, size_t size, int flags);
|
||||||
|
#else
|
||||||
|
size_t je_malloc_good_size(size_t size);
|
||||||
|
#endif
|
||||||
|
@@ -62,11 +69,11 @@ static inline size_t je_malloc_usable_size_in_advance(size_t size) {
|
||||||
|
#if defined(MOZ_MEMORY_DARWIN)
|
||||||
|
return malloc_good_size(size);
|
||||||
|
#elif defined(MOZ_JEMALLOC)
|
||||||
|
- if (je_nallocm) {
|
||||||
|
+ if (wrap(nallocm)) {
|
||||||
|
size_t ret;
|
||||||
|
if (size == 0)
|
||||||
|
size = 1;
|
||||||
|
- if (!je_nallocm(&ret, size, 0))
|
||||||
|
+ if (!wrap(nallocm)(&ret, size, 0))
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
return size;
|
||||||
|
@@ -113,4 +120,6 @@ void jemalloc_purge_freed_pages();
|
||||||
|
} /* extern "C" */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#undef wrap
|
||||||
|
+
|
||||||
|
#endif /* _JEMALLOC_H_ */
|
||||||
|
diff --git mozglue/build/Makefile.in mozglue/build/Makefile.in
|
||||||
|
index c333647..15ba505 100644
|
||||||
|
--- mozglue/build/Makefile.in
|
||||||
|
+++ mozglue/build/Makefile.in
|
||||||
|
@@ -23,7 +23,7 @@ FORCE_STATIC_LIB = 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
# Keep jemalloc separated when mozglue is statically linked
|
||||||
|
-ifeq (1_1,$(MOZ_MEMORY)_$(FORCE_SHARED_LIB))
|
||||||
|
+ifeq (1_1,$(MOZ_MEMORY)_$(or $(MOZ_NATIVE_JEMALLOC),$(FORCE_SHARED_LIB)))
|
||||||
|
SHARED_LIBRARY_LIBS = $(call EXPAND_LIBNAME_PATH,memory,$(DEPTH)/memory/build)
|
||||||
|
else
|
||||||
|
# Temporary, until bug 662814 lands
|
11
www/libxul/files/patch-bug789656
Normal file
11
www/libxul/files/patch-bug789656
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- media/libopus/Makefile.in~
|
||||||
|
+++ 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)
|
@ -1,6 +1,6 @@
|
|||||||
--- toolkit/components/startup/nsAppStartup.cpp
|
--- toolkit/components/startup/nsAppStartup.cpp
|
||||||
+++ toolkit/components/startup/nsAppStartup.cpp
|
+++ toolkit/components/startup/nsAppStartup.cpp
|
||||||
@@ -50,17 +50,40 @@
|
@@ -50,18 +50,41 @@
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -19,6 +19,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "mozilla/Telemetry.h"
|
#include "mozilla/Telemetry.h"
|
||||||
|
#include "mozilla/StartupTimeline.h"
|
||||||
|
|
||||||
+#if defined(__NetBSD__)
|
+#if defined(__NetBSD__)
|
||||||
+#undef KERN_PROC
|
+#undef KERN_PROC
|
||||||
@ -44,7 +45,7 @@
|
|||||||
+
|
+
|
||||||
static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
|
static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID);
|
||||||
|
|
||||||
using namespace mozilla;
|
#define kPrefLastSuccess "toolkit.startup.last_success"
|
||||||
@@ -836,42 +859,30 @@ CalculateProcessCreationTimestamp()
|
@@ -836,42 +859,30 @@ CalculateProcessCreationTimestamp()
|
||||||
#endif
|
#endif
|
||||||
return timestamp;
|
return timestamp;
|
||||||
|
@ -2,17 +2,17 @@ diff --git xpcom/base/nsMemoryReporterManager.cpp xpcom/base/nsMemoryReporterMan
|
|||||||
index a9aff58..674e757 100644
|
index a9aff58..674e757 100644
|
||||||
--- xpcom/base/nsMemoryReporterManager.cpp
|
--- xpcom/base/nsMemoryReporterManager.cpp
|
||||||
+++ xpcom/base/nsMemoryReporterManager.cpp
|
+++ xpcom/base/nsMemoryReporterManager.cpp
|
||||||
@@ -64,7 +64,7 @@ extern void jemalloc_stats(jemalloc_stat
|
@@ -32,7 +32,7 @@ using namespace mozilla;
|
||||||
# endif // XP_LINUX
|
# include "jemalloc.h"
|
||||||
#endif // MOZ_MEMORY
|
#endif // MOZ_MEMORY
|
||||||
|
|
||||||
-#if defined(XP_LINUX) || defined(XP_MACOSX)
|
-#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(SOLARIS)
|
||||||
+#ifdef XP_UNIX
|
+#ifdef XP_UNIX
|
||||||
|
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
@@ -122,6 +122,78 @@ static PRInt64 GetResident()
|
@@ -95,6 +95,81 @@ static nsresult GetResident(PRInt64 *n)
|
||||||
return GetProcSelfStatmField(1);
|
return GetProcSelfStatmField(1, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
+#elif defined(__DragonFly__) || defined(__FreeBSD__) \
|
+#elif defined(__DragonFly__) || defined(__FreeBSD__) \
|
||||||
@ -69,56 +69,27 @@ index a9aff58..674e757 100644
|
|||||||
+ return NS_OK;
|
+ return NS_OK;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static PRInt64 GetVsize()
|
+#define HAVE_VSIZE_AND_RESIDENT_REPORTERS 1
|
||||||
|
+static nsresult GetVsize(PRInt64 *n)
|
||||||
+{
|
+{
|
||||||
+ KINFO_PROC proc;
|
+ KINFO_PROC proc;
|
||||||
+ if (NS_SUCCEEDED(GetKinfoProcSelf(&proc)))
|
+ nsresult rv = GetKinfoProcSelf(&proc);
|
||||||
+ return KP_SIZE(proc);
|
+ if (NS_SUCCEEDED(rv))
|
||||||
|
+ *n = KP_SIZE(proc);
|
||||||
+
|
+
|
||||||
+ return -1;
|
+ return rv;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static PRInt64 GetResident()
|
+static nsresult GetResident(PRInt64 *n)
|
||||||
+{
|
+{
|
||||||
+ KINFO_PROC proc;
|
+ KINFO_PROC proc;
|
||||||
+ if (NS_SUCCEEDED(GetKinfoProcSelf(&proc)))
|
+ nsresult rv = GetKinfoProcSelf(&proc);
|
||||||
+ return KP_RSS(proc);
|
+ if (NS_SUCCEEDED(rv))
|
||||||
|
+ *n = KP_RSS(proc);
|
||||||
+
|
+
|
||||||
+ return -1;
|
+ return rv;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
#elif defined(XP_MACOSX)
|
#elif defined(SOLARIS)
|
||||||
|
|
||||||
#include <mach/mach_init.h>
|
#include <procfs.h>
|
||||||
@@ -224,7 +297,7 @@ static PRInt64 GetResident()
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(XP_WIN)
|
|
||||||
+#if defined(XP_UNIX) || defined(XP_WIN)
|
|
||||||
NS_MEMORY_REPORTER_IMPLEMENT(Vsize,
|
|
||||||
"vsize",
|
|
||||||
KIND_OTHER,
|
|
||||||
@@ -239,7 +312,7 @@ NS_MEMORY_REPORTER_IMPLEMENT(Vsize,
|
|
||||||
"measure of the memory resources used by the process.")
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#if defined(XP_LINUX) || defined(XP_MACOSX)
|
|
||||||
+#if defined(XP_UNIX)
|
|
||||||
NS_MEMORY_REPORTER_IMPLEMENT(PageFaultsSoft,
|
|
||||||
"page-faults-soft",
|
|
||||||
KIND_OTHER,
|
|
||||||
@@ -457,11 +530,11 @@ nsMemoryReporterManager::Init()
|
|
||||||
REGISTER(HeapUnallocated);
|
|
||||||
REGISTER(Resident);
|
|
||||||
|
|
||||||
-#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(XP_WIN)
|
|
||||||
+#if defined(XP_UNIX) || defined(XP_WIN)
|
|
||||||
REGISTER(Vsize);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-#if defined(XP_LINUX) || defined(XP_MACOSX)
|
|
||||||
+#if defined(XP_UNIX)
|
|
||||||
REGISTER(PageFaultsSoft);
|
|
||||||
REGISTER(PageFaultsHard);
|
|
||||||
#endif
|
|
||||||
|
116
www/libxul/files/patch-bug799441
Normal file
116
www/libxul/files/patch-bug799441
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
commit b9accdd
|
||||||
|
Author: Mike Hommey <mh+mozilla@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
|
||||||
|
--- configure.in
|
||||||
|
+++ 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
|
||||||
|
--- extensions/gio/Makefile.in
|
||||||
|
+++ 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
|
||||||
|
--- toolkit/library/Makefile.in
|
||||||
|
+++ 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
|
||||||
|
--- toolkit/library/nsStaticXULComponents.cpp
|
||||||
|
+++ 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
|
||||||
|
--- toolkit/toolkit-tiers.mk
|
||||||
|
+++ 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.
|
29
www/libxul/files/patch-bug806139
Normal file
29
www/libxul/files/patch-bug806139
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
--- content/html/content/public/nsHTMLMediaElement.h~
|
||||||
|
+++ content/html/content/public/nsHTMLMediaElement.h
|
||||||
|
@@ -311,7 +311,7 @@ public:
|
||||||
|
static bool IsH264Enabled();
|
||||||
|
static bool IsH264Type(const nsACString& aType);
|
||||||
|
static const char gH264Types[3][16];
|
||||||
|
- static char const *const gH264Codecs[7];
|
||||||
|
+ static char const *const gH264Codecs[9];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef MOZ_MEDIA_PLUGINS
|
||||||
|
--- content/html/content/src/nsHTMLMediaElement.cpp~
|
||||||
|
+++ content/html/content/src/nsHTMLMediaElement.cpp
|
||||||
|
@@ -2114,12 +2114,14 @@ const char nsHTMLMediaElement::gH264Type
|
||||||
|
"video/quicktime",
|
||||||
|
};
|
||||||
|
|
||||||
|
-char const *const nsHTMLMediaElement::gH264Codecs[7] = {
|
||||||
|
+char const *const nsHTMLMediaElement::gH264Codecs[9] = {
|
||||||
|
"avc1.42E01E",
|
||||||
|
"avc1.42001E",
|
||||||
|
"avc1.58A01E",
|
||||||
|
"avc1.4D401E",
|
||||||
|
"avc1.64001E",
|
||||||
|
+ "avc1.64001F",
|
||||||
|
+ "mp4v.20.3",
|
||||||
|
"mp4a.40.2",
|
||||||
|
nullptr
|
||||||
|
};
|
68
www/libxul/files/patch-bug810716
Normal file
68
www/libxul/files/patch-bug810716
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
diff --git configure.in configure.in
|
||||||
|
index 2084be9..eb6eeb2 100644
|
||||||
|
--- configure.in
|
||||||
|
+++ configure.in
|
||||||
|
@@ -3369,14 +3369,19 @@ fi
|
||||||
|
AC_CACHE_CHECK(
|
||||||
|
[for res_ninit()],
|
||||||
|
ac_cv_func_res_ninit,
|
||||||
|
- [AC_TRY_LINK([
|
||||||
|
+ [AC_TRY_RUN([
|
||||||
|
#ifdef linux
|
||||||
|
#define _BSD_SOURCE 1
|
||||||
|
#endif
|
||||||
|
+ #include <sys/types.h>
|
||||||
|
+ #include <netinet/in.h>
|
||||||
|
+ #include <arpa/nameser.h>
|
||||||
|
#include <resolv.h>
|
||||||
|
- ],
|
||||||
|
- [int foo = res_ninit(&_res);],
|
||||||
|
+ int main(int argc, char **argv){
|
||||||
|
+ int foo = res_ninit(&_res);
|
||||||
|
+ }],
|
||||||
|
[ac_cv_func_res_ninit=yes],
|
||||||
|
+ [ac_cv_func_res_ninit=no],
|
||||||
|
[ac_cv_func_res_ninit=no])
|
||||||
|
])
|
||||||
|
|
||||||
|
diff --git extensions/auth/nsAuthGSSAPI.cpp extensions/auth/nsAuthGSSAPI.cpp
|
||||||
|
index e828beb..6444246 100644
|
||||||
|
--- extensions/auth/nsAuthGSSAPI.cpp
|
||||||
|
+++ extensions/auth/nsAuthGSSAPI.cpp
|
||||||
|
@@ -39,6 +39,9 @@ typedef KLStatus (*KLCacheHasValidTickets_type)(
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_RES_NINIT)
|
||||||
|
+#include <sys/types.h>
|
||||||
|
+#include <netinet/in.h>
|
||||||
|
+#include <arpa/nameser.h>
|
||||||
|
#include <resolv.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
diff --git js/src/configure.in js/src/configure.in
|
||||||
|
index e25f569..b9722f9 100644
|
||||||
|
--- js/src/configure.in
|
||||||
|
+++ js/src/configure.in
|
||||||
|
@@ -2797,14 +2797,19 @@ fi
|
||||||
|
AC_CACHE_CHECK(
|
||||||
|
[for res_ninit()],
|
||||||
|
ac_cv_func_res_ninit,
|
||||||
|
- [AC_TRY_LINK([
|
||||||
|
+ [AC_TRY_RUN([
|
||||||
|
#ifdef linux
|
||||||
|
#define _BSD_SOURCE 1
|
||||||
|
#endif
|
||||||
|
+ #include <sys/types.h>
|
||||||
|
+ #include <netinet/in.h>
|
||||||
|
+ #include <arpa/nameser.h>
|
||||||
|
#include <resolv.h>
|
||||||
|
- ],
|
||||||
|
- [int foo = res_ninit(&_res);],
|
||||||
|
+ int main(int argc, char **argv){
|
||||||
|
+ int foo = res_ninit(&_res);
|
||||||
|
+ }],
|
||||||
|
[ac_cv_func_res_ninit=yes],
|
||||||
|
+ [ac_cv_func_res_ninit=no],
|
||||||
|
[ac_cv_func_res_ninit=no])
|
||||||
|
])
|
||||||
|
|
36
www/libxul/files/patch-bug828003
Normal file
36
www/libxul/files/patch-bug828003
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
--- 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 PRUptrdiff uintptr_t;
|
||||||
|
-#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#else // MOZ_QCMS
|
22
www/libxul/files/patch-bug854936
Normal file
22
www/libxul/files/patch-bug854936
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--- xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp~
|
||||||
|
+++ xpcom/reflect/xptcall/src/md/unix/xptcinvoke_gcc_x86_unix.cpp
|
||||||
|
@@ -9,7 +9,7 @@
|
||||||
|
#include "xptc_gcc_x86_unix.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
-static void ATTRIBUTE_USED __attribute__ ((regparm(3)))
|
||||||
|
+void ATTRIBUTE_USED __attribute__ ((regparm(3)))
|
||||||
|
invoke_copy_to_stack(uint32_t paramCount, nsXPTCVariant* s, uint32_t* d)
|
||||||
|
{
|
||||||
|
for(uint32_t i = paramCount; i >0; i--, d++, s++)
|
||||||
|
--- xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp~
|
||||||
|
+++ xpcom/reflect/xptcall/src/md/unix/xptcstubs_gcc_x86_unix.cpp
|
||||||
|
@@ -10,7 +10,7 @@
|
||||||
|
#include "xptc_gcc_x86_unix.h"
|
||||||
|
|
||||||
|
extern "C" {
|
||||||
|
-static nsresult ATTRIBUTE_USED
|
||||||
|
+nsresult ATTRIBUTE_USED
|
||||||
|
__attribute__ ((regparm (3)))
|
||||||
|
PrepareAndDispatch(uint32_t methodIndex, nsXPTCStubBase* self, uint32_t* args)
|
||||||
|
{
|
38
www/libxul/files/patch-clang32-libc++-visibility-hack
Normal file
38
www/libxul/files/patch-clang32-libc++-visibility-hack
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
--- configure.in~
|
||||||
|
+++ configure.in
|
||||||
|
@@ -2855,6 +2855,7 @@ EOF
|
||||||
|
#pragma GCC visibility push(hidden)
|
||||||
|
#pragma GCC visibility push(default)
|
||||||
|
#include <string.h>
|
||||||
|
+#include <iterator>
|
||||||
|
#pragma GCC visibility pop
|
||||||
|
|
||||||
|
__attribute__ ((visibility ("default"))) void Func() {
|
||||||
|
@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() {
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
ac_cv_have_visibility_builtin_bug=no
|
||||||
|
- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
|
||||||
|
+ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
|
||||||
|
ac_cv_have_visibility_builtin_bug=yes
|
||||||
|
else
|
||||||
|
if test `grep -c "@PLT" conftest.S` = 0; then
|
||||||
|
--- js/src/configure.in~
|
||||||
|
+++ js/src/configure.in
|
||||||
|
@@ -2855,6 +2855,7 @@ EOF
|
||||||
|
#pragma GCC visibility push(hidden)
|
||||||
|
#pragma GCC visibility push(default)
|
||||||
|
#include <string.h>
|
||||||
|
+#include <iterator>
|
||||||
|
#pragma GCC visibility pop
|
||||||
|
|
||||||
|
__attribute__ ((visibility ("default"))) void Func() {
|
||||||
|
@@ -2863,7 +2864,7 @@ __attribute__ ((visibility ("default"))) void Func() {
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
ac_cv_have_visibility_builtin_bug=no
|
||||||
|
- if ! ${CC-cc} ${CFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
|
||||||
|
+ if ! ${CXX-c++} ${CXXFLAGS} ${DSO_PIC_CFLAGS} ${DSO_LDOPTS} -O2 -S -o conftest.S conftest.c > /dev/null 2>&1 ; then
|
||||||
|
ac_cv_have_visibility_builtin_bug=yes
|
||||||
|
else
|
||||||
|
if test `grep -c "@PLT" conftest.S` = 0; then
|
@ -1,20 +0,0 @@
|
|||||||
--- configure.in~
|
|
||||||
+++ configure.in
|
|
||||||
@@ -3230,6 +3230,7 @@ EOF
|
|
||||||
ac_cv_have_visibility_class_bug,
|
|
||||||
[cat > conftest.c <<EOF
|
|
||||||
#pragma GCC visibility push(hidden)
|
|
||||||
+struct TestStruct;
|
|
||||||
struct __attribute__ ((visibility ("default"))) TestStruct {
|
|
||||||
static void Init();
|
|
||||||
};
|
|
||||||
--- js/src/configure.in~
|
|
||||||
+++ js/src/configure.in
|
|
||||||
@@ -3230,6 +3230,7 @@ EOF
|
|
||||||
ac_cv_have_visibility_class_bug,
|
|
||||||
[cat > conftest.c <<EOF
|
|
||||||
#pragma GCC visibility push(hidden)
|
|
||||||
+struct TestStruct;
|
|
||||||
struct __attribute__ ((visibility ("default"))) TestStruct {
|
|
||||||
static void Init();
|
|
||||||
};
|
|
25
www/libxul/files/patch-clang33
Normal file
25
www/libxul/files/patch-clang33
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
--- js/src/jspropertycacheinlines.h~
|
||||||
|
+++ js/src/jspropertycacheinlines.h
|
||||||
|
@@ -31,7 +31,7 @@ JS_ALWAYS_INLINE void
|
||||||
|
js::PropertyCache::test(JSContext *cx, jsbytecode *pc, JSObject *&obj,
|
||||||
|
JSObject *&pobj, PropertyCacheEntry *&entry, PropertyName *&name)
|
||||||
|
{
|
||||||
|
- AssertRootingUnnecessary assert(cx);
|
||||||
|
+ js::AssertRootingUnnecessary assert(cx);
|
||||||
|
|
||||||
|
JS_ASSERT(this == &JS_PROPERTY_CACHE(cx));
|
||||||
|
|
||||||
|
--- js/src/vm/ObjectImpl-inl.h~
|
||||||
|
+++ js/src/vm/ObjectImpl-inl.h
|
||||||
|
@@ -176,9 +176,9 @@ js::ObjectImpl::initializeSlotRange(uint
|
||||||
|
JSCompartment *comp = compartment();
|
||||||
|
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());
|
||||||
|
for (HeapSlot *sp = slotsStart; sp < slotsEnd; sp++)
|
||||||
|
- sp->init(comp, this->asObjectPtr(), offset++, UndefinedValue());
|
||||||
|
+ sp->init(comp, this->asObjectPtr(), offset++, js::UndefinedValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
inline bool
|
16
www/libxul/files/patch-config-baseconfig.mk
Normal file
16
www/libxul/files/patch-config-baseconfig.mk
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
--- config/baseconfig.mk~
|
||||||
|
+++ config/baseconfig.mk
|
||||||
|
@@ -1,9 +1,9 @@
|
||||||
|
INCLUDED_AUTOCONF_MK = 1
|
||||||
|
|
||||||
|
-includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||||
|
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||||
|
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
||||||
|
-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
|
||||||
|
+includedir := $(includedir)/%%MOZILLA%%
|
||||||
|
+idldir = $(datadir)/idl/%%MOZILLA%%
|
||||||
|
+installdir = $(libdir)/%%MOZILLA%%
|
||||||
|
+sdkdir = $(libdir)/%%MOZILLA%%
|
||||||
|
DIST = $(DEPTH)/dist
|
||||||
|
|
||||||
|
# We do magic with OBJ_SUFFIX in config.mk, the following ensures we don't
|
@ -1,21 +0,0 @@
|
|||||||
--- config/autoconf.mk.in.orig 2009-04-24 03:46:37.000000000 +0200
|
|
||||||
+++ config/autoconf.mk.in 2009-05-11 15:03:26.000000000 +0200
|
|
||||||
@@ -57,14 +57,14 @@
|
|
||||||
prefix = @prefix@
|
|
||||||
exec_prefix = @exec_prefix@
|
|
||||||
bindir = @bindir@
|
|
||||||
-includedir = @includedir@/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
|
||||||
+includedir = @includedir@/%%MOZILLA%%
|
|
||||||
libdir = @libdir@
|
|
||||||
datadir = @datadir@
|
|
||||||
mandir = @mandir@
|
|
||||||
-idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
|
||||||
+idldir = $(datadir)/idl/%%MOZILLA%%
|
|
||||||
|
|
||||||
-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION)
|
|
||||||
-sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION)
|
|
||||||
+installdir = $(libdir)/%%MOZILLA%%
|
|
||||||
+sdkdir = $(libdir)/%%MOZILLA%%
|
|
||||||
|
|
||||||
DIST = $(DEPTH)/dist
|
|
||||||
LIBXUL_SDK = @LIBXUL_SDK@
|
|
@ -1,10 +0,0 @@
|
|||||||
--- dom/ipc/ContentChild.cpp~
|
|
||||||
+++ dom/ipc/ContentChild.cpp
|
|
||||||
@@ -42,6 +42,7 @@
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef MOZ_WIDGET_QT
|
|
||||||
+#include <unistd.h>
|
|
||||||
#include "nsQAppInstance.h"
|
|
||||||
#endif
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
|||||||
+ // load system hunspell dictionaries
|
+ // load system hunspell dictionaries
|
||||||
+ nsIFile* hunDir;
|
+ nsIFile* hunDir;
|
||||||
+ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
|
+ NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"),
|
||||||
+ true, (nsILocalFile**)&hunDir);
|
+ true, &hunDir);
|
||||||
+ LoadDictionariesFromDir(hunDir);
|
+ LoadDictionariesFromDir(hunDir);
|
||||||
+
|
+
|
||||||
// find dictionaries from extensions requiring restart
|
// find dictionaries from extensions requiring restart
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
--- gfx/qcms/qcmstypes.h.orig 2010-11-22 12:01:36.000000000 +0100
|
|
||||||
+++ gfx/qcms/qcmstypes.h 2010-11-22 12:02:42.000000000 +0100
|
|
||||||
@@ -25,7 +25,7 @@
|
|
||||||
#ifdef __OS2__
|
|
||||||
/* OS/2's stdlib typdefs uintptr_t. So we'll just include that so we don't collide */
|
|
||||||
#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;
|
|
||||||
#endif
|
|
||||||
#endif
|
|
@ -1,10 +0,0 @@
|
|||||||
--- toolkit/xre/nsEmbedFunctions.cpp~
|
|
||||||
+++ toolkit/xre/nsEmbedFunctions.cpp
|
|
||||||
@@ -36,6 +36,7 @@
|
|
||||||
* ***** END LICENSE BLOCK ***** */
|
|
||||||
|
|
||||||
#if defined(MOZ_WIDGET_QT)
|
|
||||||
+#include <unistd.h>
|
|
||||||
#include "nsQAppInstance.h"
|
|
||||||
#endif
|
|
||||||
|
|
70
www/libxul/files/patch-z-bug762445
Normal file
70
www/libxul/files/patch-z-bug762445
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
commit b44dc8e
|
||||||
|
Author: Jan Beich <jbeich@tormail.org>
|
||||||
|
Date: Fri Oct 12 18:49:59 2012 +0000
|
||||||
|
|
||||||
|
Bug 762445 - Add jemalloc3 glue for heap-committed, heap-dirty in about:memory.
|
||||||
|
---
|
||||||
|
memory/build/mozjemalloc_compat.c | 34 ++++++++++++++++++++++++++++------
|
||||||
|
1 file changed, 28 insertions(+), 6 deletions(-)
|
||||||
|
|
||||||
|
diff --git memory/build/mozjemalloc_compat.c memory/build/mozjemalloc_compat.c
|
||||||
|
index 94ad96e..7adfef5 100644
|
||||||
|
--- memory/build/mozjemalloc_compat.c
|
||||||
|
+++ memory/build/mozjemalloc_compat.c
|
||||||
|
@@ -11,15 +11,50 @@
|
||||||
|
#define wrap(a) je_ ## a
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-extern MOZ_IMPORT_API(int)
|
||||||
|
+/*
|
||||||
|
+ * CTL_* macros are from memory/jemalloc/src/src/stats.c with changes:
|
||||||
|
+ * - drop `t' argument to avoid redundancy in calculating type size
|
||||||
|
+ * - require `i' argument for arena number explicitly
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+#define CTL_GET(n, v) do { \
|
||||||
|
+ size_t sz = sizeof(v); \
|
||||||
|
+ wrap(mallctl)(n, &v, &sz, NULL, 0); \
|
||||||
|
+} while (0)
|
||||||
|
+
|
||||||
|
+#define CTL_I_GET(n, v, i) do { \
|
||||||
|
+ size_t mib[6]; \
|
||||||
|
+ size_t miblen = sizeof(mib) / sizeof(mib[0]); \
|
||||||
|
+ size_t sz = sizeof(v); \
|
||||||
|
+ wrap(mallctlnametomib)(n, mib, &miblen); \
|
||||||
|
+ mib[2] = i; \
|
||||||
|
+ wrap(mallctlbymib)(mib, miblen, &v, &sz, NULL, 0); \
|
||||||
|
+} while (0)
|
||||||
|
+
|
||||||
|
+MOZ_IMPORT_API(int)
|
||||||
|
wrap(mallctl)(const char*, void*, size_t*, void*, size_t);
|
||||||
|
+MOZ_IMPORT_API(int)
|
||||||
|
+wrap(mallctlnametomib)(const char *name, size_t *mibp, size_t *miblenp);
|
||||||
|
+MOZ_IMPORT_API(int)
|
||||||
|
+wrap(mallctlbymib)(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp, void *newp, size_t newlen);
|
||||||
|
|
||||||
|
MOZ_EXPORT_API(void)
|
||||||
|
jemalloc_stats(jemalloc_stats_t *stats)
|
||||||
|
{
|
||||||
|
- size_t size = sizeof(stats->mapped);
|
||||||
|
- wrap(mallctl)("stats.mapped", &stats->mapped, &size, NULL, 0);
|
||||||
|
- wrap(mallctl)("stats.allocated", &stats->allocated, &size, NULL, 0);
|
||||||
|
- stats->committed = -1;
|
||||||
|
- stats->dirty = -1;
|
||||||
|
+ unsigned narenas;
|
||||||
|
+ size_t active, allocated, mapped, page, pdirty;
|
||||||
|
+
|
||||||
|
+ CTL_GET("arenas.narenas", narenas);
|
||||||
|
+ CTL_GET("arenas.page", page);
|
||||||
|
+ CTL_GET("stats.active", active);
|
||||||
|
+ CTL_GET("stats.allocated", allocated);
|
||||||
|
+ CTL_GET("stats.mapped", mapped);
|
||||||
|
+
|
||||||
|
+ /* get the summation for all arenas, i == narenas */
|
||||||
|
+ CTL_I_GET("stats.arenas.0.pdirty", pdirty, narenas);
|
||||||
|
+
|
||||||
|
+ stats->allocated = allocated;
|
||||||
|
+ stats->mapped = mapped;
|
||||||
|
+ stats->dirty = pdirty * page;
|
||||||
|
+ stats->committed = active + stats->dirty;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user