aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4global_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-08-12 12:45:24 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-08-12 16:21:59 +0200
commitf76584d9b724c131914b62dd9caff17abf326a95 (patch)
tree6cc7c891f9a998b83a7cb1e3c181f83c551c7c49 /src/qml/jsruntime/qv4global_p.h
parent1f4427dae80712d07a25f8f2d49c187adcbecc6c (diff)
Fix build on QNX
There is std::isnan and friends, but math.h also defines isnan as macro, so std::isnan expands to std::whateverthemacrois and that fails to build. So include math.h early on, get rid of the macros and then we can continue to use std::isnan throughout the code base safely. Change-Id: Ifee580fa2adff396eb6d6f064d4c095a896fb022 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Diffstat (limited to 'src/qml/jsruntime/qv4global_p.h')
-rw-r--r--src/qml/jsruntime/qv4global_p.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4global_p.h b/src/qml/jsruntime/qv4global_p.h
index 34ce6aefde..c5a31eb555 100644
--- a/src/qml/jsruntime/qv4global_p.h
+++ b/src/qml/jsruntime/qv4global_p.h
@@ -59,6 +59,14 @@ inline bool signbit(double d) { return _copysign(1.0, d) < 0; }
inline double trunc(double d) { return d > 0 ? floor(d) : ceil(d); }
#endif
+#if defined(Q_OS_QNX)
+#include <math.h>
+#undef isnan
+#undef isfinite
+#undef isinf
+#undef signbit
+#endif
+
QT_BEGIN_NAMESPACE
namespace QV4 {