summaryrefslogtreecommitdiff
path: root/www/mozilla/patches/patch-cd
blob: cef9da8640c1f54ee6dcb251ca72497a2341b467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
$NetBSD: patch-cd,v 1.1 2005/05/31 09:21:51 martin Exp $

--- extensions/transformiix/source/base/Double.cpp.orig	2004-01-15 22:23:18.000000000 +0100
+++ extensions/transformiix/source/base/Double.cpp	2005-05-30 15:51:38.000000000 +0200
@@ -48,6 +48,24 @@
  * Utility class for doubles
  */
 
+/* this should be some other predicate - like "has working math support" */
+#if defined(__NetBSD__) || (defined(__sun__) && defined(_LP64))
+MBool Double::isInfinite(double aDbl)
+{
+	return isinf(aDbl);
+}
+
+MBool Double::isNaN(double aDbl)
+{
+	return isnan(aDbl);
+}
+
+MBool Double::isNeg(double aDbl)
+{
+	return aDbl<0.0;
+}
+#else
+
 //A trick to handle IEEE floating point exceptions on FreeBSD - E.D.
 #ifdef __FreeBSD__
 #include <ieeefp.h>
@@ -157,6 +175,7 @@
 {
     return (TX_DOUBLE_HI32(aDbl) & TX_DOUBLE_HI32_SIGNBIT) != 0;
 }
+#endif
 
 /*
  * Converts the given String to a double, if the String value does not