diff options
author | ahze <ahze@FreeBSD.org> | 2006-11-21 20:45:45 +0800 |
---|---|---|
committer | ahze <ahze@FreeBSD.org> | 2006-11-21 20:45:45 +0800 |
commit | 75b13a3dbe90ce1667f732917e9129a3dcbcfe96 (patch) | |
tree | ddf543d9ac10fc1f7daece3f213b1121f8958365 /www/seamonkey2 | |
parent | e8a5b9d3f5dd7ae416f8788ed0df6510435b6140 (diff) | |
download | freebsd-ports-graphics-75b13a3dbe90ce1667f732917e9129a3dcbcfe96.tar.gz freebsd-ports-graphics-75b13a3dbe90ce1667f732917e9129a3dcbcfe96.tar.zst freebsd-ports-graphics-75b13a3dbe90ce1667f732917e9129a3dcbcfe96.zip |
Update patch from www/firefox so regchrome doesn't core dump on sparc64
Reported by: kris (many times) via pointyhat
Diffstat (limited to 'www/seamonkey2')
-rw-r--r-- | www/seamonkey2/files/patch-extensions_transformiix_source_base_Double.cpp | 62 |
1 files changed, 49 insertions, 13 deletions
diff --git a/www/seamonkey2/files/patch-extensions_transformiix_source_base_Double.cpp b/www/seamonkey2/files/patch-extensions_transformiix_source_base_Double.cpp index 38ce7ec1216..5cd13e4ff4f 100644 --- a/www/seamonkey2/files/patch-extensions_transformiix_source_base_Double.cpp +++ b/www/seamonkey2/files/patch-extensions_transformiix_source_base_Double.cpp @@ -1,23 +1,59 @@ ---- extensions/transformiix/source/base/Double.cpp.orig Mon Feb 6 15:40:52 2006 -+++ extensions/transformiix/source/base/Double.cpp Mon Feb 6 15:51:01 2006 -@@ -52,11 +52,16 @@ +--- 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 --fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML; -+#if !defined(FP_X_DNML) -+#define FP_X_DNML 0 ++#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 -+#if !defined(FP_X_STK) -+#define FP_X_STK 0 -+#endif -+#if !defined(FP_X_IOV) -+#define FP_X_IOV 0 -+#endif -+fp_except_t allmask = FP_X_INV|FP_X_OFL|FP_X_UFL|FP_X_DZ|FP_X_IMP|FP_X_DNML|FP_X_STK|FP_X_IOV; 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 |