- Add Makefile.common o A new build/install system for gecko ports, Makefile.common includes many generic routines and common tasks. o Fix ld-run-path in all gecko's by using -Wl,-rpath,${moz_libdir} thus removing the need to have a startup script for ports that depend on gecko. [2] o Use system libm, nss, nspr in all gecko ports - Add bsd.gecko.mk o This is the predecessor to WITH_MOZILLA=[mozilla|firefox|...] with a more robust way of detecting a gecko a end user wishs to use. o bsd.gecko.mk abstracts the selection of gecko-based backends. It allows users and porters to support any available gecko backend without needing to build many conditional tests. ${USE_GECKO} is the list of backends that your port can handle, and ${GECKO} is set by bsd.gecko.mk to be the chosen backend. Users set ${WITH_GECKO} to the list of gecko backends they want on their system. Port Makefile example: USE_GECKO=firefox mozilla seamonkey thunderbird .include <bsd.port.pre.mk> .include "${.CURDIR}/../../www/mozilla/bsd.gecko.mk" End user example: WITH_GECKO=seamonkey firefox We highly recommend moving away from using WITH_MOZILLA and switching to USE/WITH_GECKO. PR: 89052 [2] Submitted by: vs [2] Obtained from: www/firefox Thanks to: adamw, marcus, and mezz for ideas, bug squashing, and more sajd from irc.freenode.org/#FreeBSD-Gnome for pointing out many bugs
62 lines
2.4 KiB
C++
62 lines
2.4 KiB
C++
$FreeBSD$
|
|
$MCom: ports/www/firefox/files/patch-Double.cpp,v 1.7 2005/11/11 00:15:48 ahze Exp $
|
|
|
|
--- extensions/transformiix/source/base/Double.cpp.orig Thu Jan 30 09:26:46 2003
|
|
+++ extensions/transformiix/source/base/Double.cpp Sun Nov 16 01:46:42 2003
|
|
@@ -51,10 +51,10 @@
|
|
//A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
|
|
#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;
|
|
-#else
|
|
+#if defined(__i386__)
|
|
fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML;
|
|
+#else
|
|
+fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP;
|
|
#endif
|
|
fp_except_t oldmask = fpsetmask(~allmask);
|
|
#endif
|
|
@@ -75,22 +75,31 @@
|
|
#define TX_DOUBLE_HI32_EXPMASK 0x7ff00000
|
|
#define TX_DOUBLE_HI32_MANTMASK 0x000fffff
|
|
|
|
+union ui32dun {
|
|
+ PRUint32 i[2];
|
|
+ double d;
|
|
+};
|
|
+
|
|
//-- Initialize Double related constants
|
|
#ifdef IS_BIG_ENDIAN
|
|
-const PRUint32 nanMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK,
|
|
- 0xffffffff};
|
|
-const PRUint32 infMask[2] = {TX_DOUBLE_HI32_EXPMASK, 0};
|
|
-const PRUint32 negInfMask[2] = {TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0};
|
|
+const union ui32dun nanMask =
|
|
+ {{TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK, 0xffffffff}};
|
|
+const union ui32dun infMask =
|
|
+ {{TX_DOUBLE_HI32_EXPMASK, 0}};
|
|
+const union ui32dun negInfMask =
|
|
+ {{TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT, 0}};
|
|
#else
|
|
-const PRUint32 nanMask[2] = {0xffffffff,
|
|
- TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK};
|
|
-const PRUint32 infMask[2] = {0, TX_DOUBLE_HI32_EXPMASK};
|
|
-const PRUint32 negInfMask[2] = {0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT};
|
|
+const union ui32dun nanMask =
|
|
+ {{0xffffffff, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_MANTMASK}};
|
|
+const union ui32dun infMask =
|
|
+ {{0, TX_DOUBLE_HI32_EXPMASK}};
|
|
+const union ui32dun negInfMask =
|
|
+ {{0, TX_DOUBLE_HI32_EXPMASK | TX_DOUBLE_HI32_SIGNBIT}};
|
|
#endif
|
|
|
|
-const double Double::NaN = *((double*)nanMask);
|
|
-const double Double::POSITIVE_INFINITY = *((double*)infMask);
|
|
-const double Double::NEGATIVE_INFINITY = *((double*)negInfMask);
|
|
+const double Double::NaN = nanMask.d;
|
|
+const double Double::POSITIVE_INFINITY = infMask.d;
|
|
+const double Double::NEGATIVE_INFINITY = negInfMask.d;
|
|
|
|
/*
|
|
* Determines whether the given double represents positive or negative
|