summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-09-29 11:06:17 +0200
committerJani Heikkinen <jani.heikkinen@digia.com>2014-09-29 11:50:22 +0200
commit14710df8fa3b8c31cdbf0243d268a006e667e13a (patch)
tree24e07976165ab0089a70932e5b9c486d396d94de /src
parent8b80ca515d50967086fdebb8df746c280fadf240 (diff)
downloadqtscript-14710df8fa3b8c31cdbf0243d268a006e667e13a.tar.gz
Fix QNX build
Copy the MathExtra QNX workarounds from QtWebKit to QtScript. Change-Id: I95fbeeb6669a69e74f4b8a64b148dc5eff8c8e16 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com> Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h
index 7185c1b..46b2241 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h
@@ -40,6 +40,18 @@
#include <machine/ieee.h>
#endif
+#if OS(QNX)
+// FIXME: Look into a way to have cmath import its functions into both the standard and global
+// namespace. For now, we include math.h since the QNX cmath header only imports its functions
+// into the standard namespace.
+#include <math.h>
+// These macros from math.h conflict with the real functions in the std namespace.
+#undef signbit
+#undef isnan
+#undef isinf
+#undef isfinite
+#endif
+
#ifndef M_PI
const double piDouble = 3.14159265358979323846;
const float piFloat = 3.14159265358979323846f;