Date: Tue, 28 May 2013 00:52:15 +0000 (UTC) From: Nikolai Lifanov <lifanov@mail.lifanov.com> To: FreeBSD-gnats-submit@freebsd.org Subject: ports/179034: [patch] libxul fix with clang 3.3 and update to 17.0.2 Message-ID: <20130528005216.024891A26C3@mail.lifanov.com> Resent-Message-ID: <201305280100.r4S100nr090791@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 179034 >Category: ports >Synopsis: [patch] libxul fix with clang 3.3 and update to 17.0.2 >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue May 28 01:00:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Nikolai Lifanov >Release: FreeBSD 9.1-RELEASE amd64 >Organization: >Environment: System: FreeBSD mail.lifanov.com 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243825: Tue Dec 4 09:23:10 UTC 2012 root@farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Since import of clang 3.3 snapshot to CURRENT, www/libxul was broken on amd64. >How-To-Repeat: Be on a CURRENT system running a clang 3.3 snapshot. make -C /usr/ports/www/libxul >Fix: While attempting to fix this patch-by-patch, I realized that this is time-intensive, so I split up libxul 10.* and copied over and fixed up a version based on 17.*. The plan was to add libxul10 (or libxul100) to Mk/bsd.gecko.mk and test which ports work with what and add libxul based on mozilla dist from www/firefox-esr. With a few bulk runs (9.1-RELEASE amd64, CURRENT amd64) of the reverse dependencies I could find (exact list: audio/tuxguitar deskutils/chmsee deskutils/google-gadgets editors/morla java/icedtea-web misc/xiphos multimedia/gxine net/libproxy-mozjs science/gchemutils www/gecko-mediaplayer www/gecko-sharp20 www/helixplugin www/moonshine www/openvrml www/xpi-conkeror x11-toolkits/swt x11-toolkits/swt-devel ), 100% of the ones that work on libxul 10 also work on libxul 17, while libxul 17 can piggyback on the patches from www/firefox-esr and works great on CURRENT! I think that libxul 17 is a suitable repacement for libxul 10. Please update. --- patch.txt begins here --- Index: Makefile =================================================================== --- Makefile (revision 319277) +++ Makefile (working copy) @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= libxul -DISTVERSION= 10.0.12 +DISTVERSION= 17.0.2 CATEGORIES?= www devel MASTER_SITES= ${MASTER_SITE_MOZILLA} MASTER_SITE_SUBDIR= firefox/releases/${DISTVERSION}esr/source @@ -14,13 +14,15 @@ BUILD_DEPENDS= nspr>=4.8.8:${PORTSDIR}/devel/nspr \ nss>=3.13.6_1:${PORTSDIR}/security/nss \ sqlite3>=3.7.7.1:${PORTSDIR}/databases/sqlite3 \ + ${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \ cairo>=1.10.2_1,1:${PORTSDIR}/graphics/cairo \ unzip:${PORTSDIR}/archivers/unzip -WRKSRC= ${WRKDIR}/mozilla-esr10 +WRKSRC= ${WRKDIR}/mozilla-esr17 CONFLICTS= mozilla-[0-9]* libxul-1.9.* USE_AUTOTOOLS= autoconf213:env +USE_PYTHON_BUILD=-2.7 WANT_GNOME= yes USE_QT4= # empty QT_NONSTANDARD= yes Index: distinfo =================================================================== --- distinfo (revision 319277) +++ distinfo (working copy) @@ -1,2 +1,2 @@ -SHA256 (firefox-10.0.12esr.source.tar.bz2) = 9f12cb7fd18fc51e995cd67b70a090f32fcd8dcf636be1b840281f2612d9db40 -SIZE (firefox-10.0.12esr.source.tar.bz2) = 75510903 +SHA256 (firefox-17.0.2esr.source.tar.bz2) = 92bf717b3e3933b84fd37b0e5c5026868e139be828637cfcf4acdc83f7ccd886 +SIZE (firefox-17.0.2esr.source.tar.bz2) = 90828234 Index: files/patch-alsapulse =================================================================== --- files/patch-alsapulse (revision 319277) +++ files/patch-alsapulse (working copy) @@ -1,74 +1,65 @@ ---- config/autoconf.mk.in~ -+++ config/autoconf.mk.in -@@ -568,7 +568,13 @@ MOZ_LIBNOTIFY_CFLAGS = @MOZ_LIBNOTIFY_CF - 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~ +diff --git configure.in configure.in +index 5980b76..11f5f77 100644 +--- configure.in +++ configure.in -@@ -5758,17 +5775,48 @@ dnl ==================================== +@@ -5600,13 +5600,25 @@ dnl ======================================================== dnl = Check alsa availability on Linux if using sydneyaudio dnl ======================================================== +MOZ_ARG_ENABLE_BOOL(alsa, -+[ --enable-alsa Enable Alsa support], ++[ --enable-alsa Enable Alsa support (default on Linux)], +MOZ_ALSA=1, +MOZ_ALSA= MOZ_ALSA_FORCE=$enableval) + dnl If using sydneyaudio with Linux, ensure that the alsa library is available --if test -n "$MOZ_SYDNEYAUDIO"; then -+if test -n "$MOZ_SYDNEYAUDIO" -a "$MOZ_ALSA_FORCE" != "no"; then - case "$target_os" in - linux*) -+ MOZ_ALSA=1 -+ ;; -+ esac +-if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux"; then ++if test -n "$MOZ_SYDNEYAUDIO" -a "$OS_TARGET" = "Linux" -a "$MOZ_ALSA_FORCE" != "no"; then ++ MOZ_ALSA=1 +fi + +if test -n "$MOZ_ALSA"; then - PKG_CHECK_MODULES(MOZ_ALSA, alsa, , ++ AC_DEFINE(MOZ_CUBEB) + PKG_CHECK_MODULES(MOZ_ALSA, alsa, , [echo "$MOZ_ALSA_PKG_ERRORS" AC_MSG_ERROR([Need alsa for Ogg, Wave or WebM decoding on Linux. Disable with --disable-ogg --disable-wave --disable-webm. (On Ubuntu, you might try installing the package libasound2-dev.)])]) -- ;; -- esac fi -+AC_SUBST(MOZ_ALSA_CFLAGS) +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 Permissions System + dnl = Enable PulseAudio 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 @@ -30,10 +30,6 @@ else ifeq ($(MOZ_WIDGET_TOOLKIT),android) CSRCS = \ @@ -100,20 +91,24 @@ ifeq ($(OS_ARCH),WINNT) OS_LIBS += winmm.lib endif ---- toolkit/library/libxul-config.mk~ -+++ toolkit/library/libxul-config.mk -@@ -348,10 +348,12 @@ ifdef MOZ_NATIVE_LIBVPX - EXTRA_DSO_LDOPTS += $(MOZ_LIBVPX_LIBS) - endif +diff --git toolkit/library/Makefile.in toolkit/library/Makefile.in +index 43384e9..e46a6e3 100644 +--- toolkit/library/Makefile.in ++++ toolkit/library/Makefile.in +@@ -370,14 +370,11 @@ endif + EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME_PATH,gkmedias,$(DIST)/lib) + -ifdef MOZ_SYDNEYAUDIO -ifeq ($(OS_ARCH),Linux) ++ifneq (,$(MOZ_CUBEB)$(MOZ_SYDNEYAUDIO)) +ifdef MOZ_ALSA EXTRA_DSO_LDOPTS += $(MOZ_ALSA_LIBS) endif -+ -+ifdef MOZ_PULSEAUDIO -+EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) +-endif +- + ifdef MOZ_PULSEAUDIO +-ifdef MOZ_CUBEB + EXTRA_DSO_LDOPTS += $(MOZ_PULSEAUDIO_LIBS) endif - - ifdef HAVE_CLOCK_MONOTONIC + endif Index: files/patch-bug753046 =================================================================== --- files/patch-bug753046 (revision 319277) +++ files/patch-bug753046 (working copy) @@ -56,7 +56,7 @@ --- ipc/chromium/Makefile.in.orig 2012-02-16 06:40:33.000000000 +0000 +++ ipc/chromium/Makefile.in -@@ -278,6 +278,34 @@ endif +@@ -278,6 +278,33 @@ endif endif # } OS_LINUX @@ -64,7 +64,6 @@ + +CPPSRCS += \ + atomicops_internals_x86_gcc.cc \ -+ file_util_linux.cc \ + process_util_bsd.cc \ + time_posix.cc \ + $(NULL) @@ -381,37 +380,29 @@ index 9a34492..62b280c 100644 --- 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" +#elif defined(OS_BSD) +#include "base/dir_reader_bsd.h" #else #include "base/dir_reader_fallback.h" #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; +#elif defined(OS_BSD) +typedef DirReaderBSD DirReaderPosix; #else typedef DirReaderFallback DirReaderPosix; #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 $ --- ipc/chromium/src/base/file_util_posix.cc.orig 2011-12-20 23:28:19.000000000 +0000 @@ -469,7 +460,7 @@ --- 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 -@@ -9,9 +9,17 @@ +@@ -9,16 +9,24 @@ #if defined(OS_MACOSX) #include <mach/mach.h> @@ -477,21 +468,31 @@ +#include <lwp.h> #elif defined(OS_LINUX) #include <sys/syscall.h> - #include <unistd.h> -+#elif defined(OS_DRAGONFLY) -+#include <unistd.h> +-#if !defined(__FreeBSD__) && !defined(__NetBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) + #include <sys/prctl.h> +-#elif !defined(__NetBSD__) +-#include <pthread_np.h> +#elif defined(OS_FREEBSD) +#include <sys/param.h> +#include <sys/thr.h> -+#include <pthread_np.h> #endif ++ ++#if !defined(OS_MACOSX) + #include <unistd.h> + #endif ++#if defined(OS_BSD) && !defined(OS_NETBSD) ++#include <pthread_np.h> ++#endif ++ #if defined(OS_MACOSX) -@@ -38,9 +45,20 @@ + namespace base { + void InitThreading(); +@@ -38,9 +45,20 @@ PlatformThreadId PlatformThread::CurrentId() { // into the kernel. #if defined(OS_MACOSX) return mach_thread_self(); --#elif defined (__OpenBSD__) +-#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) +#elif defined(OS_NETBSD) + return _lwp_self(); +#elif defined(OS_DRAGONFLY) @@ -511,6 +512,18 @@ #elif defined(OS_LINUX) return syscall(__NR_gettid); #endif +@@ -102,9 +102,9 @@ void PlatformThread::SetName(const char* name) { + // Note that glibc also has a 'pthread_setname_np' api, but it may not be + // available everywhere and it's only benefit over using prctl directly is + // that it can set the name of threads other than the current thread. +-#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) ++#if defined(OS_BSD) && !defined(OS_NETBSD) + pthread_set_name_np(pthread_self(), name); +-#elif defined(__NetBSD__) ++#elif defined(OS_NETBSD) + pthread_setname_np(pthread_self(), "%s", (void *)name); + #else + prctl(PR_SET_NAME, reinterpret_cast<uintptr_t>(name), 0, 0, 0); $NetBSD: patch-ipc_chromium_src_base_process__util.h,v 1.1 2012/03/06 12:34:09 ryoon Exp $ --- ipc/chromium/src/base/process_util.h.orig 2011-12-21 00:28:19.000000000 +0100 @@ -552,7 +565,7 @@ --- 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 -@@ -0,0 +1,318 @@ +@@ -0,0 +1,367 @@ +// Copyright (c) 2008 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. @@ -587,6 +600,20 @@ +#define HAVE_POSIX_SPAWN 1 +#endif + ++/* ++ * On platforms that are not gonk based, we fall back to an arbitrary ++ * UID. This is generally the UID for user `nobody', albeit it is not ++ * always the case. ++ */ ++ ++#if defined(OS_NETBSD) || defined(OS_OPENBSD) ++# define CHILD_UNPRIVILEGED_UID 32767 ++# define CHILD_UNPRIVILEGED_GID 32767 ++#else ++# define CHILD_UNPRIVILEGED_UID 65534 ++# define CHILD_UNPRIVILEGED_GID 65534 ++#endif ++ +#ifndef __dso_public +# ifdef __exported +# define __dso_public __exported @@ -635,6 +662,17 @@ + const environment_map& env_vars_to_set, + bool wait, ProcessHandle* process_handle, + ProcessArchitecture arch) { ++ return LaunchApp(argv, fds_to_remap, env_vars_to_set, ++ SAME_PRIVILEGES_AS_PARENT, ++ wait, process_handle); ++} ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ const environment_map& env_vars_to_set, ++ ChildPrivileges privs, ++ bool wait, ProcessHandle* process_handle, ++ ProcessArchitecture arch) { + bool retval = true; + + char* argv_copy[argv.size() + 1]; @@ -749,6 +787,17 @@ + const environment_map& env_vars_to_set, + bool wait, ProcessHandle* process_handle, + ProcessArchitecture arch) { ++ return LaunchApp(argv, fds_to_remap, env_vars_to_set, ++ SAME_PRIVILEGES_AS_PARENT, ++ wait, process_handle); ++} ++ ++bool LaunchApp(const std::vector<std::string>& argv, ++ const file_handle_mapping_vector& fds_to_remap, ++ const environment_map& env_vars_to_set, ++ ChildPrivileges privs, ++ bool wait, ProcessHandle* process_handle, ++ ProcessArchitecture arch) { + scoped_array<char*> argv_cstr(new char*[argv.size() + 1]); + // Illegal to allocate memory after fork and before execvp + InjectiveMultimap fd_shuffle1, fd_shuffle2; @@ -771,19 +820,32 @@ + + CloseSuperfluousFds(fd_shuffle2); + ++ for (size_t i = 0; i < argv.size(); i++) ++ argv_cstr[i] = const_cast<char*>(argv[i].c_str()); ++ argv_cstr[argv.size()] = NULL; ++ ++ if (privs == UNPRIVILEGED) { ++ if (setgid(CHILD_UNPRIVILEGED_GID) != 0) { ++ DLOG(ERROR) << "FAILED TO setgid() CHILD PROCESS, path: " << argv_cstr[0]; ++ _exit(127); ++ } ++ if (setuid(CHILD_UNPRIVILEGED_UID) != 0) { ++ DLOG(ERROR) << "FAILED TO setuid() CHILD PROCESS, path: " << argv_cstr[0]; ++ _exit(127); ++ } ++ if (chdir("/") != 0) ++ gProcessLog.print("==> could not chdir()\n"); ++ } ++ + for (environment_map::const_iterator it = env_vars_to_set.begin(); + it != env_vars_to_set.end(); ++it) { + if (setenv(it->first.c_str(), it->second.c_str(), 1/*overwrite*/)) + _exit(127); + } -+ -+ 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()); ++ execv(argv_cstr[0], argv_cstr.get()); + // if we get here, we're in serious trouble and should complain loudly + DLOG(ERROR) << "FAILED TO exec() CHILD PROCESS, path: " << argv_cstr[0]; -+ exit(127); ++ _exit(127); + } else { + gProcessLog.print("==> process %d launched child process %d\n", + GetCurrentProcId(), pid); @@ -945,57 +1007,6 @@ #else long pages = sysconf(_SC_PHYS_PAGES); 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 index abf2a56..48791f6 100644 --- ipc/chromium/src/base/time_posix.cc @@ -1140,11 +1151,11 @@ nsCString path; greDir->GetNativePath(path); -# ifdef OS_LINUX --# ifdef ANDROID +-# ifdef MOZ_WIDGET_ANDROID +# if defined(OS_LINUX) || defined(OS_BSD) -+# if defined(ANDROID) || defined(OS_BSD) ++# if defined(MOZ_WIDGET_ANDROID) || defined(OS_BSD) path += "/lib"; - # endif // ANDROID + # endif // MOZ_WIDGET_ANDROID const char *ld_library_path = PR_GetEnv("LD_LIBRARY_PATH"); @@ -557,7 +557,7 @@ childArgv.push_back(pidstring); @@ -1161,7 +1172,7 @@ base::LaunchApp(childArgv, mFileMap, -#if defined(OS_LINUX) || defined(OS_MACOSX) +#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) - newEnvVars, + newEnvVars, privs, #endif false, &process, arch); diff --git ipc/glue/SharedMemorySysV.h ipc/glue/SharedMemorySysV.h Index: files/patch-bug778078 =================================================================== --- files/patch-bug778078 (revision 319277) +++ files/patch-bug778078 (working copy) @@ -1,11 +1,11 @@ --- toolkit/xre/nsAppRunner.cpp~ +++ toolkit/xre/nsAppRunner.cpp -@@ -3133,7 +3133,7 @@ XRE_main(int argc, char* argv[], const n - gQtOnlyArgv[gQtOnlyArgc] = nsnull; - #endif - #if defined(MOZ_WIDGET_GTK2) +@@ -3833,7 +3833,7 @@ XREMain::XRE_main(int argc, char* argv[] + ScopedLogging log; + + #if defined(MOZ_WIDGET_GTK) -#ifdef MOZ_MEMORY +#if defined(MOZ_MEMORY) || defined(__FreeBSD__) || defined(__NetBSD__) - // Disable the slice allocator, since jemalloc already uses similar layout - // algorithms, and using a sub-allocator tends to increase fragmentation. - // This must be done before g_thread_init() is called. + // Disable the slice allocator, since jemalloc already uses similar layout + // algorithms, and using a sub-allocator tends to increase fragmentation. + // This must be done before g_thread_init() is called. Index: files/patch-bug783463 =================================================================== --- files/patch-bug783463 (revision 319277) +++ files/patch-bug783463 (working copy) @@ -1,20 +1,14 @@ ---- widget/src/qt/nsNativeThemeQt.cpp~ -+++ widget/src/qt/nsNativeThemeQt.cpp -@@ -25,7 +25,6 @@ - #include "nsThemeConstants.h" - #include "nsIServiceManager.h" - #include "nsIDOMHTMLInputElement.h" --#include <malloc.h> - - - #include "gfxASurface.h" ---- widget/src/qt/nsSound.cpp~ -+++ widget/src/qt/nsSound.cpp -@@ -40,6 +40,7 @@ - #include <QSound> - - #include <string.h> -+#include <unistd.h> - - #include "nscore.h" - #include "plstr.h" +--- gfx/skia/Makefile.in~ ++++ gfx/skia/Makefile.in +@@ -339,10 +339,9 @@ CPPSRCS += \ + SkMMapStream.cpp \ + SkOSFile.cpp \ + $(NULL) +-ifeq (Linux,$(OS_TARGET)) ++ifneq (,$(or $(MOZ_X11),$(filter Linux,$(OS_TARGET)))) + CPPSRCS += \ + SkFontHost_linux.cpp \ +- SkFontHost_tables.cpp \ + SkTime_Unix.cpp \ + $(NULL) + endif Index: files/patch-bug788039 =================================================================== --- files/patch-bug788039 (revision 319277) +++ files/patch-bug788039 (working copy) @@ -1,16 +1,5 @@ # 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 @@ -3854,7 +3854,7 @@ fi Index: files/patch-bug788108 =================================================================== --- files/patch-bug788108 (revision 319277) +++ files/patch-bug788108 (working copy) @@ -7,7 +7,7 @@ -//A trick to handle IEEE floating point exceptions on FreeBSD - E.D. -#ifdef __FreeBSD__ -#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; -#else -static fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML; Index: files/patch-bug789693 =================================================================== --- files/patch-bug789693 (revision 319277) +++ files/patch-bug789693 (working copy) @@ -1,6 +1,6 @@ --- toolkit/components/startup/nsAppStartup.cpp +++ toolkit/components/startup/nsAppStartup.cpp -@@ -50,17 +50,40 @@ +@@ -50,18 +50,41 @@ #include <sys/syscall.h> #endif @@ -19,6 +19,7 @@ #endif #include "mozilla/Telemetry.h" + #include "mozilla/StartupTimeline.h" +#if defined(__NetBSD__) +#undef KERN_PROC @@ -44,7 +45,7 @@ + static NS_DEFINE_CID(kAppShellCID, NS_APPSHELL_CID); - using namespace mozilla; + #define kPrefLastSuccess "toolkit.startup.last_success" @@ -836,42 +859,30 @@ CalculateProcessCreationTimestamp() #endif return timestamp; Index: files/patch-bug791366 =================================================================== --- files/patch-bug791366 (revision 319277) +++ files/patch-bug791366 (working copy) @@ -2,17 +2,17 @@ index a9aff58..674e757 100644 --- xpcom/base/nsMemoryReporterManager.cpp +++ xpcom/base/nsMemoryReporterManager.cpp -@@ -64,7 +64,7 @@ extern void jemalloc_stats(jemalloc_stat - # endif // XP_LINUX +@@ -32,7 +32,7 @@ using namespace mozilla; + # include "jemalloc.h" #endif // MOZ_MEMORY --#if defined(XP_LINUX) || defined(XP_MACOSX) +-#if defined(XP_LINUX) || defined(XP_MACOSX) || defined(SOLARIS) +#ifdef XP_UNIX #include <sys/time.h> #include <sys/resource.h> -@@ -122,6 +122,78 @@ static PRInt64 GetResident() - return GetProcSelfStatmField(1); +@@ -95,6 +95,81 @@ static nsresult GetResident(PRInt64 *n) + return GetProcSelfStatmField(1, n); } +#elif defined(__DragonFly__) || defined(__FreeBSD__) \ @@ -69,56 +69,27 @@ + return NS_OK; +} + -+static PRInt64 GetVsize() ++#define HAVE_VSIZE_AND_RESIDENT_REPORTERS 1 ++static nsresult GetVsize(PRInt64 *n) +{ + KINFO_PROC proc; -+ if (NS_SUCCEEDED(GetKinfoProcSelf(&proc))) -+ return KP_SIZE(proc); ++ nsresult rv = GetKinfoProcSelf(&proc); ++ if (NS_SUCCEEDED(rv)) ++ *n = KP_SIZE(proc); + -+ return -1; ++ return rv; +} + -+static PRInt64 GetResident() ++static nsresult GetResident(PRInt64 *n) +{ + KINFO_PROC proc; -+ if (NS_SUCCEEDED(GetKinfoProcSelf(&proc))) -+ return KP_RSS(proc); ++ nsresult rv = GetKinfoProcSelf(&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> -@@ -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 + #include <procfs.h> Index: files/patch-extensions-spellcheck-hunspell-src-mozHunspell.cpp =================================================================== --- files/patch-extensions-spellcheck-hunspell-src-mozHunspell.cpp (revision 319277) +++ files/patch-extensions-spellcheck-hunspell-src-mozHunspell.cpp (working copy) @@ -7,7 +7,7 @@ + // load system hunspell dictionaries + nsIFile* hunDir; + NS_NewNativeLocalFile(NS_LITERAL_CSTRING("%%LOCALBASE%%/share/hunspell"), -+ true, (nsILocalFile**)&hunDir); ++ true, &hunDir); + LoadDictionariesFromDir(hunDir); + // find dictionaries from extensions requiring restart --- patch.txt ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130528005216.024891A26C3>