diff options
author | Tobias Koenig <tobias.koenig.qnx@kdab.com> | 2012-01-13 18:34:47 +0000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-20 08:51:22 +0100 |
commit | 9ca4af5c5901a3d0abb0010e21fab0925573cf00 (patch) | |
tree | 4737f6b269794850d62e4fea9dc90a50327e0746 /src/3rdparty/javascriptcore | |
parent | d268ac6f0e2642fc0f0bacab4f4a1f75b49ef1ec (diff) |
Fix compilation on QNX.
Change-Id: I5e01cad23066a645c1434ce1463d370733f53e4f
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Diffstat (limited to 'src/3rdparty/javascriptcore')
-rw-r--r-- | src/3rdparty/javascriptcore/DateMath.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/3rdparty/javascriptcore/DateMath.cpp b/src/3rdparty/javascriptcore/DateMath.cpp index 9f66d91013..be99d2ca25 100644 --- a/src/3rdparty/javascriptcore/DateMath.cpp +++ b/src/3rdparty/javascriptcore/DateMath.cpp @@ -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 } |