diff options
author | marcus <marcus@FreeBSD.org> | 2003-11-17 02:56:29 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2003-11-17 02:56:29 +0800 |
commit | 63ace12fc20a9f443083f18a1a1f62c84b6441db (patch) | |
tree | 26536f1511ef6f647f266d4aa9df5f480339cfc1 /mail/thunderbird-devel | |
parent | 1bafb1f2176eb14bf01e154a0fe035fae264fc91 (diff) | |
download | freebsd-ports-gnome-63ace12fc20a9f443083f18a1a1f62c84b6441db.tar.gz freebsd-ports-gnome-63ace12fc20a9f443083f18a1a1f62c84b6441db.tar.zst freebsd-ports-gnome-63ace12fc20a9f443083f18a1a1f62c84b6441db.zip |
Add a new patch-Double.cpp that fixes the recent core dumps during post-build
on Sparc64.
Submitted by: tmm (bless that man)
Diffstat (limited to 'mail/thunderbird-devel')
-rw-r--r-- | mail/thunderbird-devel/files/patch-Double.cpp | 60 |
1 files changed, 54 insertions, 6 deletions
diff --git a/mail/thunderbird-devel/files/patch-Double.cpp b/mail/thunderbird-devel/files/patch-Double.cpp index 3dabc0260c14..5cd13e4ff4fe 100644 --- a/mail/thunderbird-devel/files/patch-Double.cpp +++ b/mail/thunderbird-devel/files/patch-Double.cpp @@ -1,11 +1,59 @@ ---- extensions/transformiix/source/base/Double.cpp.orig Wed May 21 04:42:05 2003 -+++ extensions/transformiix/source/base/Double.cpp Wed May 21 04:42:24 2003 -@@ -51,7 +51,7 @@ +--- 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__ -+#if defined(__alpha__) || defined(__sparc64__) - fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP; - #else +-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 |