diff options
author | Joe Marcus Clarke <marcus@FreeBSD.org> | 2003-11-16 18:56:29 +0000 |
---|---|---|
committer | Joe Marcus Clarke <marcus@FreeBSD.org> | 2003-11-16 18:56:29 +0000 |
commit | cad4a555e632dc13c6b686d07f4e001803146291 (patch) | |
tree | 75090d8a3e2b6998ef3e12b30a9b7cbf88179237 /www/mozilla-devel | |
parent | 605bf1dfcfb5e88e80b10bdb177e6ed30494d116 (diff) | |
download | ports-cad4a555e632dc13c6b686d07f4e001803146291.tar.gz ports-cad4a555e632dc13c6b686d07f4e001803146291.zip |
Notes
Diffstat (limited to 'www/mozilla-devel')
-rw-r--r-- | www/mozilla-devel/files/patch-Double.cpp | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/www/mozilla-devel/files/patch-Double.cpp b/www/mozilla-devel/files/patch-Double.cpp index ea09affc26e4..5cd13e4ff4fe 100644 --- a/www/mozilla-devel/files/patch-Double.cpp +++ b/www/mozilla-devel/files/patch-Double.cpp @@ -1,5 +1,5 @@ ---- extensions/transformiix/source/base/Double.cpp.orig Thu Jan 30 00:26:46 2003 -+++ extensions/transformiix/source/base/Double.cpp Tue Jun 24 23:30:10 2003 +--- 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__ @@ -14,3 +14,46 @@ #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 |