summaryrefslogtreecommitdiffstats
path: root/mail/thunderbird/files/patch-Double.cpp
diff options
context:
space:
mode:
authorahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2005-11-14 12:12:10 +0800
committerahze <ahze@df743ca5-7f9a-e211-a948-0013205c9059>2005-11-14 12:12:10 +0800
commit10f20df13d5bb31ba0adee47cca87786f9f55a54 (patch)
tree24a11096e1315f726d54c91b00c153a53dfe79cc /mail/thunderbird/files/patch-Double.cpp
parent6aeec1b976e64de14caa674fe7173e5be17e9b23 (diff)
downloadmarcuscom-ports-10f20df13d5bb31ba0adee47cca87786f9f55a54.tar
marcuscom-ports-10f20df13d5bb31ba0adee47cca87786f9f55a54.tar.gz
marcuscom-ports-10f20df13d5bb31ba0adee47cca87786f9f55a54.tar.bz2
marcuscom-ports-10f20df13d5bb31ba0adee47cca87786f9f55a54.tar.lz
marcuscom-ports-10f20df13d5bb31ba0adee47cca87786f9f55a54.tar.xz
marcuscom-ports-10f20df13d5bb31ba0adee47cca87786f9f55a54.tar.zst
marcuscom-ports-10f20df13d5bb31ba0adee47cca87786f9f55a54.zip
- Support Makefile.common in all mozilla ports
- Make all mozilla ports use system nss, nspr, and libm and some mozilla ports use system cairo - Do a bunch of much needed catch-up and sync work on many mozilla ports such as libesd and cups patch, and many other misc patches - This adds WITH_DEBUG/WITH_LOGGING to many mozilla ports that didn't have it before. - Extend EXTRACT_AFTER_ARGS so everything will extract faster. Todo: Sync thunderbird-devel with thunderbird THEN make it use Makefile.common git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@5125 df743ca5-7f9a-e211-a948-0013205c9059
Diffstat (limited to 'mail/thunderbird/files/patch-Double.cpp')
-rw-r--r--mail/thunderbird/files/patch-Double.cpp59
1 files changed, 59 insertions, 0 deletions
diff --git a/mail/thunderbird/files/patch-Double.cpp b/mail/thunderbird/files/patch-Double.cpp
new file mode 100644
index 000000000..5cd13e4ff
--- /dev/null
+++ b/mail/thunderbird/files/patch-Double.cpp
@@ -0,0 +1,59 @@
+--- 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