components/desktop/thunderbird/patches/firefox27-80-mftt_infinity.patch
author Stacy Yeh <stacy.yeh@oracle.com>
Mon, 11 Jan 2016 09:27:45 -0800
changeset 5255 cea0e462549a
permissions -rw-r--r--
22322082 Move Firefox/Thunderbird from Desktop consolidation to Userland

We use a different function from the one in ieeefp.h.
This may be a studio specific patch. Need to investigate if this can be
removed.

--- comm-esr31/mozilla/mfbt/decimal/Decimal.cpp.orig	2015-06-04 17:42:52.191270749 -0700
+++ comm-esr31/mozilla/mfbt/decimal/Decimal.cpp	2015-06-04 17:42:52.193703088 -0700
@@ -33,6 +33,7 @@
 
 #include <algorithm>
 #include <float.h>
+#include <ieeefp.h>
 
 using namespace moz_decimal_utils;
 
@@ -686,13 +687,13 @@
 
 Decimal Decimal::fromDouble(double doubleValue)
 {
-    if (std::isfinite(doubleValue))
+    if (finite(doubleValue))
         return fromString(mozToString(doubleValue));
 
-    if (std::isinf(doubleValue))
-        return infinity(doubleValue < 0 ? Negative : Positive);
+    if (isnand(doubleValue))
+        return nan();
 
-    return nan();
+    return infinity(doubleValue < 0 ? Negative : Positive);
 }
 
 Decimal Decimal::fromString(const String& str)