[Webkit-unassigned] [Bug 23624] Expose a cross-platform NaN in MathExtras.h

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 29 13:11:17 PST 2009


------- Comment #3 from simon.fraser at apple.com  2009-01-29 13:11 PDT -------
Sorry to be vague. With this patch:

diff --git a/JavaScriptCore/wtf/MathExtras.h b/JavaScriptCore/wtf/MathExtras.h
index 76488b4..9638b35 100644
--- a/JavaScriptCore/wtf/MathExtras.h
+++ b/JavaScriptCore/wtf/MathExtras.h
@@ -28,6 +28,7 @@

 #include <math.h>
 #include <stdlib.h>
+#include <limits>

 #include <ieeefp.h>
@@ -44,7 +45,6 @@
 #include <xmath.h>
-#include <limits>

 #include <float.h>
@@ -68,6 +68,8 @@ const double piOverFourDouble = M_PI_4;
 const float piOverFourFloat = static_cast<float>(M_PI_4);

+const double nanDouble = std::numeric_limits<double>::quiet_NaN();

 // Work around a bug in the Mac OS X libc where ceil(-0.1) return +0.

I get link errors:

ld warning: symbol _ctiVMThrowTrampoline found in unsupported section in
ld warning: symbol _ctiTrampoline found in unsupported section in
Undefined symbols:
  "_ctiTrampoline", referenced from:
in Interpreter.o
  "_ctiVMThrowTrampoline", referenced from:
      _ctiVMThrowTrampoline$non_lazy_ptr in Interpreter.o
ld: symbol(s) not found

I think this is because quiet_NaN() is declared as 
  double quiet_NaN() throw()

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the webkit-unassigned mailing list