Fix compilation on QNX.
authorTobias Koenig <tobias.koenig.qnx@kdab.com>
Fri, 13 Jan 2012 18:34:47 +0000 (18:34 +0000)
committerQt by Nokia <qt-info@nokia.com>
Tue, 20 Mar 2012 07:51:22 +0000 (08:51 +0100)
Change-Id: I5e01cad23066a645c1434ce1463d370733f53e4f
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>

src/3rdparty/javascriptcore/DateMath.cpp
src/qml/qml/ftw/qhashedstring_p.h
src/qml/qml/ftw/qqmlpool.cpp
src/qml/qml/qqmlaccessors_p.h
src/qml/qml/v8/qjsconverter_impl_p.h
src/quick/items/context2d/qquickcontext2d.cpp
src/quick/particles/qquickangledirection.cpp
src/quick/particles/qquickellipseextruder.cpp
src/quick/scenegraph/coreapi/qsggeometry.cpp

index 9f66d91..be99d2c 100644 (file)
@@ -345,8 +345,15 @@ double timeClip(double t)
         return  NaN;
     return t >= 0 ? floor(t) : ceil(t);
 #else
+
+#if defined(__QNXNTO__)
+    if (!isfinite(t) || fabs(t) > maxECMAScriptTime)
+        return NaN;
+#else
     if (!std::isfinite(t) || fabs(t) > maxECMAScriptTime)
         return NaN;
+#endif
+
     return trunc(t);
 #endif
 }
index f575285..f058f21 100644 (file)
 
 #include <private/qflagpointer_p.h>
 
+#if defined(Q_OS_QNX)
+#include <stdlib.h>
+#endif
+
 QT_BEGIN_NAMESPACE
 
 // Enable this to debug hash linking assumptions.
index 6fd11d4..64df87a 100644 (file)
 
 #include "qqmlpool_p.h"
 
+#ifdef Q_OS_QNX
+#include <malloc.h>
+#endif
+
 // #define POOL_DEBUG
 
 QT_BEGIN_NAMESPACE
index a603bed..8e67a58 100644 (file)
 #include <QtCore/qhash.h>
 #include <QtCore/QReadWriteLock>
 
+#ifdef Q_OS_QNX
+#include <stdint.h>
+#endif
+
 QT_BEGIN_HEADER
 
 QT_BEGIN_NAMESPACE
index 10b8ab5..c2775df 100644 (file)
 #ifndef QJSCONVERTER_IMPL_P_H
 #define QJSCONVERTER_IMPL_P_H
 
+#ifdef Q_OS_QNX
+#include <malloc.h>
+#endif
+
 QT_BEGIN_NAMESPACE
 
 extern char *qdtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve, char **digits_str);
index f8e5e3c..a605b9c 100644 (file)
 #include <private/qv8domerrors_p.h>
 #include <QtCore/qnumeric.h>
 
+#ifdef Q_OS_QNX
+#include <ctype.h>
+#endif
+
 QT_BEGIN_NAMESPACE
 /*!
     \qmlclass Context2D QQuickContext2D
index a3bd45e..e77c473 100644 (file)
@@ -42,6 +42,9 @@
 #include "qquickangledirection_p.h"
 #include <stdlib.h>
 #include <cmath>
+#ifdef Q_OS_QNX
+#include <math.h>
+#endif
 QT_BEGIN_NAMESPACE
 const qreal CONV = 0.017453292519943295;
 /*!
index 3eb547f..083564e 100644 (file)
 #include "qquickellipseextruder_p.h"
 #include <stdlib.h>
 #include <cmath>
+
+#ifdef Q_OS_QNX
+#include <math.h>
+#endif
+
 QT_BEGIN_NAMESPACE
 /*!
     \qmlclass EllipseShape QQuickEllipseExtruder
index dbac95a..cf39c30 100644 (file)
 #include <qopenglfunctions.h>
 #include <private/qopenglextensions_p.h>
 
+#ifdef Q_OS_QNX
+#include <malloc.h>
+#endif
+
 QT_BEGIN_NAMESPACE