Merge patches from firefox3 to hopefully fix the build on certain platforms.

Additionally, fix a plist problem with files being installed to /etc.
This commit is contained in:
Joe Marcus Clarke 2009-04-12 03:30:29 +00:00
parent ab89a0bdbe
commit 69fe7c5867
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=232165
12 changed files with 408 additions and 1 deletions

View file

@ -8,7 +8,7 @@
PORTNAME= libxul
PORTVERSION= 1.9.0.7
PORTREVISION?= 2
PORTREVISION?= 3
CATEGORIES?= www devel
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= xulrunner/releases/${PORTVERSION}/source/
@ -30,6 +30,7 @@ ALL_TARGET= default
HAS_CONFIGURE= yes
USE_BZIP2= yes
USE_GMAKE= yes
MAKE_ENV= SKIP_GRE_REGISTRATION=1
LDFLAGS+= -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH}
PORT_MOZCONFIG= ${WRKSRC}/xulrunner/config/mozconfig
@ -47,6 +48,11 @@ MOZ_PKGCONFIG_FILES= libxul-embedding-unstable libxul-embedding \
libxul-unstable libxul mozilla-gtkmozembed-embedding \
mozilla-gtkmozembed mozilla-js mozilla-nss mozilla-plugin
post-patch:
${REINPLACE_CMD} -e 's|%%PTHREAD_LIBS%%|${PTHREAD_LIBS:C/-pthread/${GECKO_PTHREAD_LIBS}/}|' \
${WRKSRC}/storage/build/Makefile.in \
${WRKSRC}/db/sqlite3/src/Makefile.in
post-build:
@${REINPLACE_CMD} -e "s|\(Libs:.*\)\($$\)|\1 -Wl,-rpath,${PREFIX}/lib/${MOZ_RPATH}\2| ; \
s|%sdkdir%|%sdkdir%/sdk|g ; \

View file

@ -0,0 +1,20 @@
--- content/xslt/public/txDouble.h.orig Fri Oct 13 00:00:29 2006
+++ content/xslt/public/txDouble.h Fri Oct 13 00:00:53 2006
@@ -41,7 +41,7 @@
#define __txdouble_h__
//A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
-#ifdef __FreeBSD__
+/* #ifdef __FreeBSD__
#include <ieeefp.h>
#ifdef __alpha__
fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP;
@@ -50,7 +50,7 @@
#endif
fp_except_t oldmask = fpsetmask(~allmask);
#endif
-
+*/
/**
* Macros to workaround math-bugs bugs in various platforms
*/

View file

@ -0,0 +1,11 @@
--- db/sqlite3/src/Makefile.in.orig 2008-06-19 11:03:17.000000000 -0500
+++ db/sqlite3/src/Makefile.in 2008-06-19 11:04:15.000000000 -0500
@@ -45,6 +45,8 @@
include $(DEPTH)/config/autoconf.mk
+OS_CFLAGS = -I../../../dist/include/sqlite3
+OS_LIBS = %%PTHREAD_LIBS%%
MODULE = sqlite3
LIBRARY_NAME = sqlite3
FORCE_SHARED_LIB = 1

View file

@ -0,0 +1,28 @@
--- js/src/jsnum.c.orig Sun Nov 5 18:37:07 2006
+++ js/src/jsnum.c Sun Nov 5 18:42:31 2006
@@ -45,6 +45,9 @@
#if defined(XP_WIN) || defined(XP_OS2)
#include <float.h>
#endif
+#if defined(__FreeBSD__)
+#include <sys/param.h>
+#endif
#include <locale.h>
#include <limits.h>
#include <math.h>
@@ -532,7 +535,15 @@ static jsdouble NaN;
#else
+#if defined(__FreeBSD__) && __FreeBSD_version >= 601000
+#include <fenv.h>
+#define FIX_FPU() (fedisableexcept(FE_ALL_EXCEPT))
+
+#else
+
#define FIX_FPU() ((void)0)
+
+#endif /* defined(__FreeBSD__) && __FreeBSD_version >= 503000 */
#endif

View file

@ -0,0 +1,215 @@
# Ensure correct alignment for nsCSSValue objects inside nsCSSValue::Array.
# (Bug 476345)
--- layout/style/nsCSSValue.h.orig 2008-07-02 00:51:43.000000000 +0200
+++ layout/style/nsCSSValue.h 2009-02-01 21:43:29.000000000 +0100
@@ -286,104 +286,7 @@
// failure.
static nsStringBuffer* BufferFromString(const nsString& aValue);
- struct Array {
-
- // return |Array| with reference count of zero
- static Array* Create(PRUint16 aItemCount) {
- return new (aItemCount) Array(aItemCount);
- }
-
- nsCSSValue& operator[](PRUint16 aIndex) {
- NS_ASSERTION(aIndex < mCount, "out of range");
- return *(First() + aIndex);
- }
-
- const nsCSSValue& operator[](PRUint16 aIndex) const {
- NS_ASSERTION(aIndex < mCount, "out of range");
- return *(First() + aIndex);
- }
-
- nsCSSValue& Item(PRUint16 aIndex) { return (*this)[aIndex]; }
- const nsCSSValue& Item(PRUint16 aIndex) const { return (*this)[aIndex]; }
-
- PRUint16 Count() const { return mCount; }
-
- PRBool operator==(const Array& aOther) const
- {
- if (mCount != aOther.mCount)
- return PR_FALSE;
- for (PRUint16 i = 0; i < mCount; ++i)
- if ((*this)[i] != aOther[i])
- return PR_FALSE;
- return PR_TRUE;
- }
-
- void AddRef() {
- if (mRefCnt == PR_UINT16_MAX) {
- NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
- return;
- }
- ++mRefCnt;
- NS_LOG_ADDREF(this, mRefCnt, "nsCSSValue::Array", sizeof(*this));
- }
- void Release() {
- if (mRefCnt == PR_UINT16_MAX) {
- NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
- return;
- }
- --mRefCnt;
- NS_LOG_RELEASE(this, mRefCnt, "nsCSSValue::Array");
- if (mRefCnt == 0)
- delete this;
- }
-
- private:
-
- PRUint16 mRefCnt;
- PRUint16 mCount;
-
- void* operator new(size_t aSelfSize, PRUint16 aItemCount) CPP_THROW_NEW {
- return ::operator new(aSelfSize + sizeof(nsCSSValue)*aItemCount);
- }
-
- void operator delete(void* aPtr) { ::operator delete(aPtr); }
-
- nsCSSValue* First() {
- return (nsCSSValue*) (((char*)this) + sizeof(*this));
- }
-
- const nsCSSValue* First() const {
- return (const nsCSSValue*) (((const char*)this) + sizeof(*this));
- }
-
-#define CSSVALUE_LIST_FOR_VALUES(var) \
- for (nsCSSValue *var = First(), *var##_end = var + mCount; \
- var != var##_end; ++var)
-
- Array(PRUint16 aItemCount)
- : mRefCnt(0)
- , mCount(aItemCount)
- {
- MOZ_COUNT_CTOR(nsCSSValue::Array);
- CSSVALUE_LIST_FOR_VALUES(val) {
- new (val) nsCSSValue();
- }
- }
-
- ~Array()
- {
- MOZ_COUNT_DTOR(nsCSSValue::Array);
- CSSVALUE_LIST_FOR_VALUES(val) {
- val->~nsCSSValue();
- }
- }
-
-#undef CSSVALUE_LIST_FOR_VALUES
-
- private:
- Array(const Array& aOther); // not to be implemented
- };
-
+ struct Array;
struct URL {
// Methods are not inline because using an nsIPrincipal means requiring
// caps, which leads to REQUIRES hell, since this header is included all
@@ -454,5 +357,102 @@
} mValue;
};
-#endif /* nsCSSValue_h___ */
+struct nsCSSValue::Array {
+
+ // return |Array| with reference count of zero
+ static Array* Create(PRUint16 aItemCount) {
+ return new (aItemCount) Array(aItemCount);
+ }
+
+ nsCSSValue& operator[](PRUint16 aIndex) {
+ NS_ASSERTION(aIndex < mCount, "out of range");
+ return mArray[aIndex];
+ }
+
+ const nsCSSValue& operator[](PRUint16 aIndex) const {
+ NS_ASSERTION(aIndex < mCount, "out of range");
+ return mArray[aIndex];
+ }
+
+ nsCSSValue& Item(PRUint16 aIndex) { return (*this)[aIndex]; }
+ const nsCSSValue& Item(PRUint16 aIndex) const { return (*this)[aIndex]; }
+
+ PRUint16 Count() const { return mCount; }
+
+ PRBool operator==(const Array& aOther) const
+ {
+ if (mCount != aOther.mCount)
+ return PR_FALSE;
+ for (PRUint16 i = 0; i < mCount; ++i)
+ if ((*this)[i] != aOther[i])
+ return PR_FALSE;
+ return PR_TRUE;
+ }
+
+ void AddRef() {
+ if (mRefCnt == PR_UINT16_MAX) {
+ NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
+ return;
+ }
+ ++mRefCnt;
+ NS_LOG_ADDREF(this, mRefCnt, "nsCSSValue::Array", sizeof(*this));
+ }
+ void Release() {
+ if (mRefCnt == PR_UINT16_MAX) {
+ NS_WARNING("refcount overflow, leaking nsCSSValue::Array");
+ return;
+ }
+ --mRefCnt;
+ NS_LOG_RELEASE(this, mRefCnt, "nsCSSValue::Array");
+ if (mRefCnt == 0)
+ delete this;
+ }
+
+private:
+
+ PRUint16 mRefCnt;
+ const PRUint16 mCount;
+ // This must be the last sub-object, since we extend this array to
+ // be of size mCount; it needs to be a sub-object so it gets proper
+ // alignment.
+ nsCSSValue mArray[1];
+ void* operator new(size_t aSelfSize, PRUint16 aItemCount) CPP_THROW_NEW {
+ return ::operator new(aSelfSize + sizeof(nsCSSValue) * (aItemCount - 1));
+ }
+
+ void operator delete(void* aPtr) { ::operator delete(aPtr); }
+
+ nsCSSValue* First() { return mArray; }
+
+ const nsCSSValue* First() const { return mArray; }
+
+#define CSSVALUE_LIST_FOR_EXTRA_VALUES(var) \
+for (nsCSSValue *var = First() + 1, *var##_end = First() + mCount; \
+ var != var##_end; ++var)
+
+ Array(PRUint16 aItemCount)
+ : mRefCnt(0)
+ , mCount(aItemCount)
+ {
+ MOZ_COUNT_CTOR(nsCSSValue::Array);
+ CSSVALUE_LIST_FOR_EXTRA_VALUES(val) {
+ new (val) nsCSSValue();
+ }
+ }
+
+ ~Array()
+ {
+ MOZ_COUNT_DTOR(nsCSSValue::Array);
+ CSSVALUE_LIST_FOR_EXTRA_VALUES(val) {
+ val->~nsCSSValue();
+ }
+ }
+
+#undef CSSVALUE_LIST_FOR_VALUES
+
+private:
+ Array(const Array& aOther); // not to be implemented
+};
+
+#endif /* nsCSSValue_h___ */

View file

@ -0,0 +1,14 @@
--- layout/generic/Makefile.in.orig 2008-06-19 12:29:06.000000000 -0500
+++ layout/generic/Makefile.in 2008-06-19 12:30:04.000000000 -0500
@@ -188,9 +188,10 @@
-I$(srcdir)/../../content/base/src \
-I$(srcdir)/../../content/html/content/src \
-I$(srcdir)/../../dom/src/base \
- $(MOZ_CAIRO_CFLAGS) \
$(NULL)
+CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
+
ifdef MOZ_ENABLE_GTK2
CXXFLAGS += $(MOZ_GTK2_CFLAGS)
endif

View file

@ -0,0 +1,10 @@
--- security/manager/ssl/src/nsNSSComponent.cpp.orig Mon May 29 23:10:54 2006
+++ security/manager/ssl/src/nsNSSComponent.cpp Mon May 29 23:12:22 2006
@@ -110,6 +110,7 @@
#include "nss.h"
#include "pk11func.h"
#include "ssl.h"
+#define NSS_ENABLE_ECC 1
#include "sslproto.h"
#include "secmod.h"
#include "sechash.h"

View file

@ -0,0 +1,10 @@
--- storage/build/Makefile.in.orig Tue Feb 21 11:18:56 2006
+++ storage/build/Makefile.in Sun Nov 5 16:16:06 2006
@@ -77,6 +77,7 @@
$(EXTRA_DSO_LIBS) \
$(MOZ_COMPONENT_LIBS) \
$(MOZ_JS_LIBS) \
+ %%PTHREAD_LIBS%% \
$(NULL)
include $(topsrcdir)/config/rules.mk

View file

@ -0,0 +1,24 @@
--- toolkit/components/history/src/nsGlobalHistory.cpp.orig 2006-02-02 20:55:17.000000000 +0100
+++ toolkit/components/history/src/nsGlobalHistory.cpp
@@ -322,7 +322,9 @@ matchAgeInDaysCallback(nsIMdbRow *row, v
if (err != 0) return PR_FALSE;
PRTime rowDate;
- PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &rowDate);
+ long long ld;
+ PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &ld);
+ rowDate = ld;
PRInt32 days = GetAgeInDays(matchSearchTerm->now, rowDate);
@@ -1067,7 +1069,9 @@ nsGlobalHistory::GetRowValue(nsIMdbRow *
if (!yarn.mYarn_Fill || !yarn.mYarn_Buf)
return NS_OK;
- PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", aResult);
+ long long ld;
+ PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &ld);
+ *aResult = ld;
return NS_OK;
}

View file

@ -0,0 +1,17 @@
--- toolkit/components/places/src/nsMorkHistoryImporter.cpp.orig 2008-03-19 20:30:49.000000000 +0100
+++ toolkit/components/places/src/nsMorkHistoryImporter.cpp 2008-12-17 09:38:05.000000000 +0100
@@ -148,9 +148,12 @@ AddToHistoryCB(const nsCSubstring &aRowI
}
PRTime date;
- if (PR_sscanf(values[kLastVisitColumn].get(), "%lld", &date) != 1) {
+ long long ld;
+ if (PR_sscanf(values[kLastVisitColumn].get(), "%lld", &ld) != 1) {
date = -1;
- }
+ } else {
+ date = ld;
+ }
PRBool isTyped = values[kTypedColumn].EqualsLiteral("1");
PRInt32 transition = isTyped ?

View file

@ -0,0 +1,28 @@
# reported upstream as: https://bugzilla.mozilla.org/show_bug.cgi?id=469276
--- toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp.orig 2008-08-25 22:59:14.000000000 +0200
+++ toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp 2008-12-12 16:31:11.000000000 +0100
@@ -2023,8 +2023,9 @@
return NS_ERROR_FAILURE;
}
const nsCSubstring& str = Substring(chunk, start, 4);
- const PRUint32 *p = reinterpret_cast<const PRUint32*>(str.BeginReading());
- entry->mAddChunkId = PR_ntohl(*p);
+ PRUint32 p;
+ memcpy(&p, str.BeginReading(), 4);
+ entry->mAddChunkId = PR_ntohl(p);
if (entry->mAddChunkId == 0) {
NS_WARNING("Received invalid chunk number.");
return NS_ERROR_FAILURE;
@@ -2052,8 +2053,9 @@
if (chunkType == CHUNK_SUB) {
const nsCSubstring& str = Substring(chunk, start, 4);
- const PRUint32 *p = reinterpret_cast<const PRUint32*>(str.BeginReading());
- entry->mAddChunkId = PR_ntohl(*p);
+ PRUint32 p;
+ memcpy(&p, str.BeginReading(), 4);
+ entry->mAddChunkId = PR_ntohl(p);
if (entry->mAddChunkId == 0) {
NS_WARNING("Received invalid chunk number.");
return NS_ERROR_FAILURE;

View file

@ -0,0 +1,24 @@
--- xpfe/components/history/src/nsGlobalHistory.cpp.orig 2007-12-03 05:25:14.000000000 +0100
+++ xpfe/components/history/src/nsGlobalHistory.cpp
@@ -304,7 +304,9 @@ matchAgeInDaysCallback(nsIMdbRow *row, v
if (err != 0) return PR_FALSE;
PRTime rowDate;
- PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &rowDate);
+ long long ld;
+ PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &ld);
+ rowDate = ld;
PRInt32 days = matchSearchTerm->globalHist->GetAgeInDays(rowDate);
@@ -1000,7 +1002,9 @@ nsGlobalHistory::GetRowValue(nsIMdbRow *
if (!yarn.mYarn_Fill || !yarn.mYarn_Buf)
return NS_OK;
- PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", aResult);
+ long long ld;
+ PR_sscanf((const char*)yarn.mYarn_Buf, "%lld", &ld);
+ *aResult = ld;
return NS_OK;
}