mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 04:00:05 +02:00
libqt4: fix for gcc7.
removed webkit build.
This commit is contained in:
@@ -9,7 +9,7 @@ CHECKSUM_SHA256="dc5c24bed30b7d14cb9c981a50a4ea5d3587be9a8f4f69fc2d5e6c49ed31065
|
||||
SOURCE_DIR="qt4-$portVersion-haiku-1"
|
||||
LICENSE="GNU LGPL v2.1"
|
||||
COPYRIGHT="2015 Digia Plc and/or its subsidiary(-ies)."
|
||||
REVISION="9"
|
||||
REVISION="10"
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
@@ -39,7 +39,6 @@ PROVIDES="
|
||||
lib:libQtSql$secondaryArchSuffix = $portVersion compat >= 4.8
|
||||
lib:libQtSvg$secondaryArchSuffix = $portVersion compat >= 4.8
|
||||
lib:libQtTest$secondaryArchSuffix = $portVersion compat >= 4.8
|
||||
lib:libQtWebKit$secondaryArchSuffix = 4.9.4 compat >= 4
|
||||
lib:libQtXml$secondaryArchSuffix = $portVersion compat >= 4.8
|
||||
lib:libQtXmlPatterns$secondaryArchSuffix = $portVersion compat >= 4.8
|
||||
"
|
||||
@@ -122,7 +121,6 @@ PROVIDES_devel="
|
||||
devel:libQtSql$secondaryArchSuffix = $portVersion compat >= 4.8
|
||||
devel:libQtSvg$secondaryArchSuffix = $portVersion compat >= 4.8
|
||||
devel:libQtTest$secondaryArchSuffix = $portVersion compat >= 4.8
|
||||
devel:libQtWebKit$secondaryArchSuffix = 4.9.4 compat >= 4
|
||||
devel:libQtXml$secondaryArchSuffix = $portVersion compat >= 4.8
|
||||
devel:libQtXmlPatterns$secondaryArchSuffix = $portVersion compat >= 4.8
|
||||
devel:libQtUiTools$secondaryArchSuffix = $portVersion compat >= 4.8
|
||||
@@ -158,7 +156,7 @@ BUILD()
|
||||
-no-pch -no-opengl -no-largefile \
|
||||
-fast -nomake examples -nomake demos -release -opensource \
|
||||
-confirm-license -no-iconv -phonon -no-phonon-backend \
|
||||
-multimedia -no-audio-backend -dbus
|
||||
-multimedia -no-audio-backend -dbus -no-webkit
|
||||
|
||||
make $jobArgs
|
||||
|
||||
@@ -181,7 +179,7 @@ INSTALL()
|
||||
libQtMultimedia libQtNetwork \
|
||||
libQtScript libQtScriptTools \
|
||||
libQtSql libQtSvg \
|
||||
libQtTest libQtWebKit \
|
||||
libQtTest \
|
||||
libQtXml libQtXmlPatterns \
|
||||
libQtUiTools
|
||||
|
||||
|
||||
@@ -1,638 +1,99 @@
|
||||
From e9ab91efd4d7f0220fde6ec046448023d6fdd5ce Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= <jerome.duval@gmail.com>
|
||||
Date: Thu, 13 Sep 2018 17:47:09 +0200
|
||||
Subject: [PATCH] Fix C++11 build of qtscript
|
||||
From 7286faf7c2cbeea757946050fa7ac9c3064cd67a Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sun, 25 Nov 2018 11:10:17 +0100
|
||||
Subject: applying patch libqt4-4.8.7.patch
|
||||
|
||||
based on https://github.com/qt/qtscript/commit/8b80ca515d50967086fdebb8df746c280fadf240.patch
|
||||
---
|
||||
.../runtime/DateConstructor.cpp | 29 +++++++++---------
|
||||
.../JavaScriptCore/runtime/DateInstance.cpp | 5 ++--
|
||||
.../JavaScriptCore/runtime/DatePrototype.cpp | 12 ++++----
|
||||
.../runtime/JSGlobalObjectFunctions.cpp | 8 ++---
|
||||
.../JavaScriptCore/runtime/JSImmediate.h | 2 +-
|
||||
.../JavaScriptCore/runtime/JSONObject.cpp | 2 +-
|
||||
.../JavaScriptCore/runtime/JSValue.cpp | 6 ++--
|
||||
.../JavaScriptCore/runtime/JSValue.h | 5 ++--
|
||||
.../JavaScriptCore/runtime/MathObject.cpp | 10 ++++---
|
||||
.../runtime/NumberPrototype.cpp | 10 +++----
|
||||
.../runtime/StringPrototype.cpp | 6 ++--
|
||||
.../JavaScriptCore/wtf/DateMath.cpp | 6 ++--
|
||||
.../JavaScriptCore/wtf/HashTable.h | 13 ++++----
|
||||
.../JavaScriptCore/wtf/MathExtras.h | 30 ++++++++++++++-----
|
||||
.../JavaScriptCore/wtf/TypeTraits.h | 24 ++++++++-------
|
||||
.../JavaScriptCore/wtf/dtoa.cpp | 2 +-
|
||||
src/script/script.pro | 2 --
|
||||
17 files changed, 94 insertions(+), 78 deletions(-)
|
||||
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConstructor.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConstructor.cpp
|
||||
index 532eedb4..885d8a1a 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConstructor.cpp
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateConstructor.cpp
|
||||
@@ -30,7 +30,6 @@
|
||||
#include "JSString.h"
|
||||
#include "ObjectPrototype.h"
|
||||
#include "PrototypeFunction.h"
|
||||
-#include <math.h>
|
||||
#include <time.h>
|
||||
#include <wtf/DateMath.h>
|
||||
#include <wtf/MathExtras.h>
|
||||
@@ -89,13 +88,13 @@ JSObject* constructDate(ExecState* exec, const ArgList& args)
|
||||
value = primitive.toNumber(exec);
|
||||
}
|
||||
} else {
|
||||
- if (isnan(args.at(0).toNumber(exec))
|
||||
- || isnan(args.at(1).toNumber(exec))
|
||||
- || (numArgs >= 3 && isnan(args.at(2).toNumber(exec)))
|
||||
- || (numArgs >= 4 && isnan(args.at(3).toNumber(exec)))
|
||||
- || (numArgs >= 5 && isnan(args.at(4).toNumber(exec)))
|
||||
- || (numArgs >= 6 && isnan(args.at(5).toNumber(exec)))
|
||||
- || (numArgs >= 7 && isnan(args.at(6).toNumber(exec))))
|
||||
+ if (std::isnan(args.at(0).toNumber(exec))
|
||||
+ || std::isnan(args.at(1).toNumber(exec))
|
||||
+ || (numArgs >= 3 && std::isnan(args.at(2).toNumber(exec)))
|
||||
+ || (numArgs >= 4 && std::isnan(args.at(3).toNumber(exec)))
|
||||
+ || (numArgs >= 5 && std::isnan(args.at(4).toNumber(exec)))
|
||||
+ || (numArgs >= 6 && std::isnan(args.at(5).toNumber(exec)))
|
||||
+ || (numArgs >= 7 && std::isnan(args.at(6).toNumber(exec))))
|
||||
value = NaN;
|
||||
else {
|
||||
GregorianDateTime t;
|
||||
@@ -157,13 +156,13 @@ static JSValue JSC_HOST_CALL dateNow(ExecState* exec, JSObject*, JSValue, const
|
||||
static JSValue JSC_HOST_CALL dateUTC(ExecState* exec, JSObject*, JSValue, const ArgList& args)
|
||||
{
|
||||
int n = args.size();
|
||||
- if (isnan(args.at(0).toNumber(exec))
|
||||
- || isnan(args.at(1).toNumber(exec))
|
||||
- || (n >= 3 && isnan(args.at(2).toNumber(exec)))
|
||||
- || (n >= 4 && isnan(args.at(3).toNumber(exec)))
|
||||
- || (n >= 5 && isnan(args.at(4).toNumber(exec)))
|
||||
- || (n >= 6 && isnan(args.at(5).toNumber(exec)))
|
||||
- || (n >= 7 && isnan(args.at(6).toNumber(exec))))
|
||||
+ if (std::isnan(args.at(0).toNumber(exec))
|
||||
+ || std::isnan(args.at(1).toNumber(exec))
|
||||
+ || (n >= 3 && std::isnan(args.at(2).toNumber(exec)))
|
||||
+ || (n >= 4 && std::isnan(args.at(3).toNumber(exec)))
|
||||
+ || (n >= 5 && std::isnan(args.at(4).toNumber(exec)))
|
||||
+ || (n >= 6 && std::isnan(args.at(5).toNumber(exec)))
|
||||
+ || (n >= 7 && std::isnan(args.at(6).toNumber(exec))))
|
||||
return jsNaN(exec);
|
||||
diff --git a/src/gui/kernel/qclipboard_haiku.cpp b/src/gui/kernel/qclipboard_haiku.cpp
|
||||
index 761ba29..e5df7af 100644
|
||||
--- a/src/gui/kernel/qclipboard_haiku.cpp
|
||||
+++ b/src/gui/kernel/qclipboard_haiku.cpp
|
||||
@@ -37,7 +37,7 @@ const QMimeData *QClipboard::mimeData(Mode mode) const
|
||||
|
||||
GregorianDateTime t;
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateInstance.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateInstance.cpp
|
||||
index 77a92be6..506067a0 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateInstance.cpp
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DateInstance.cpp
|
||||
@@ -24,7 +24,6 @@
|
||||
|
||||
#include "JSGlobalObject.h"
|
||||
|
||||
-#include <math.h>
|
||||
#include <wtf/DateMath.h>
|
||||
#include <wtf/MathExtras.h>
|
||||
|
||||
@@ -49,7 +48,7 @@ DateInstance::DateInstance(ExecState* exec, double time)
|
||||
const GregorianDateTime* DateInstance::calculateGregorianDateTime(ExecState* exec) const
|
||||
{
|
||||
double milli = internalNumber();
|
||||
- if (isnan(milli))
|
||||
+ if (std::isnan(milli))
|
||||
return 0;
|
||||
|
||||
if (!m_data)
|
||||
@@ -65,7 +64,7 @@ const GregorianDateTime* DateInstance::calculateGregorianDateTime(ExecState* exe
|
||||
const GregorianDateTime* DateInstance::calculateGregorianDateTimeUTC(ExecState* exec) const
|
||||
{
|
||||
double milli = internalNumber();
|
||||
- if (isnan(milli))
|
||||
+ if (std::isnan(milli))
|
||||
return 0;
|
||||
|
||||
if (!m_data)
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DatePrototype.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DatePrototype.cpp
|
||||
index ca9d4ea4..fe24ecf2 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DatePrototype.cpp
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/DatePrototype.cpp
|
||||
@@ -299,7 +299,7 @@ static bool fillStructuresUsingTimeArgs(ExecState* exec, const ArgList& args, in
|
||||
// milliseconds
|
||||
if (idx < numArgs) {
|
||||
double millis = args.at(idx).toNumber(exec);
|
||||
- ok = isfinite(millis);
|
||||
+ ok = std::isfinite(millis);
|
||||
milliseconds += millis;
|
||||
} else
|
||||
milliseconds += *ms;
|
||||
@@ -736,7 +736,7 @@ JSValue JSC_HOST_CALL dateProtoFuncGetMilliSeconds(ExecState* exec, JSObject*, J
|
||||
|
||||
DateInstance* thisDateObj = asDateInstance(thisValue);
|
||||
double milli = thisDateObj->internalNumber();
|
||||
- if (isnan(milli))
|
||||
+ if (std::isnan(milli))
|
||||
return jsNaN(exec);
|
||||
|
||||
double secs = floor(milli / msPerSecond);
|
||||
@@ -751,7 +751,7 @@ JSValue JSC_HOST_CALL dateProtoFuncGetUTCMilliseconds(ExecState* exec, JSObject*
|
||||
|
||||
DateInstance* thisDateObj = asDateInstance(thisValue);
|
||||
double milli = thisDateObj->internalNumber();
|
||||
- if (isnan(milli))
|
||||
+ if (std::isnan(milli))
|
||||
return jsNaN(exec);
|
||||
|
||||
double secs = floor(milli / msPerSecond);
|
||||
@@ -793,7 +793,7 @@ static JSValue setNewValueFromTimeArgs(ExecState* exec, JSValue thisValue, const
|
||||
DateInstance* thisDateObj = asDateInstance(thisValue);
|
||||
double milli = thisDateObj->internalNumber();
|
||||
|
||||
- if (args.isEmpty() || isnan(milli)) {
|
||||
+ if (args.isEmpty() || std::isnan(milli)) {
|
||||
JSValue result = jsNaN(exec);
|
||||
thisDateObj->setInternalValue(result);
|
||||
return result;
|
||||
@@ -837,7 +837,7 @@ static JSValue setNewValueFromDateArgs(ExecState* exec, JSValue thisValue, const
|
||||
double ms = 0;
|
||||
|
||||
GregorianDateTime gregorianDateTime;
|
||||
- if (numArgsToUse == 3 && isnan(milli))
|
||||
+ if (numArgsToUse == 3 && std::isnan(milli))
|
||||
msToGregorianDateTime(exec, 0, true, gregorianDateTime);
|
||||
else {
|
||||
ms = milli - floor(milli / msPerSecond) * msPerSecond;
|
||||
@@ -960,7 +960,7 @@ JSValue JSC_HOST_CALL dateProtoFuncSetYear(ExecState* exec, JSObject*, JSValue t
|
||||
double ms = 0;
|
||||
|
||||
GregorianDateTime gregorianDateTime;
|
||||
- if (isnan(milli))
|
||||
+ if (std::isnan(milli))
|
||||
// Based on ECMA 262 B.2.5 (setYear)
|
||||
// the time must be reset to +0 if it is NaN.
|
||||
msToGregorianDateTime(exec, 0, true, gregorianDateTime);
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
|
||||
index 0bc12747..2e2853ec 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
|
||||
@@ -309,9 +309,9 @@ JSValue JSC_HOST_CALL globalFuncParseInt(ExecState* exec, JSObject*, JSValue, co
|
||||
|
||||
if (value.isDouble()) {
|
||||
double d = value.asDouble();
|
||||
- if (isfinite(d))
|
||||
+ if (std::isfinite(d))
|
||||
return jsNumber(exec, (d > 0) ? floor(d) : ceil(d));
|
||||
- if (isnan(d) || isinf(d))
|
||||
+ if (std::isnan(d) || std::isinf(d))
|
||||
return jsNaN(exec);
|
||||
return jsNumber(exec, 0);
|
||||
}
|
||||
@@ -326,13 +326,13 @@ JSValue JSC_HOST_CALL globalFuncParseFloat(ExecState* exec, JSObject*, JSValue,
|
||||
|
||||
JSValue JSC_HOST_CALL globalFuncIsNaN(ExecState* exec, JSObject*, JSValue, const ArgList& args)
|
||||
{
|
||||
- return jsBoolean(isnan(args.at(0).toNumber(exec)));
|
||||
+ return jsBoolean(std::isnan(args.at(0).toNumber(exec)));
|
||||
for ( int i = 0; msg->GetInfo(B_MIME_TYPE, i, &name, &type, &count) == B_OK; i++ ) {
|
||||
const void *data;
|
||||
- int32 dataLen = 0;
|
||||
+ ssize_t dataLen = 0;
|
||||
qDebug() << "mimeData " << name;
|
||||
status_t stat = msg->FindData(name,B_MIME_TYPE,&data,&dataLen);
|
||||
if(dataLen && stat==B_OK) {
|
||||
--
|
||||
2.19.1
|
||||
|
||||
|
||||
From 6b0cbd139e5e6aac71259c092b8b64532f76c115 Mon Sep 17 00:00:00 2001
|
||||
From: Jerome Duval <jerome.duval@gmail.com>
|
||||
Date: Sun, 25 Nov 2018 11:59:24 +0100
|
||||
Subject: gcc7 fix
|
||||
|
||||
|
||||
diff --git a/configure b/configure
|
||||
index 2a93bbd..3961f1f 100755
|
||||
--- a/configure
|
||||
+++ b/configure
|
||||
@@ -7762,7 +7762,7 @@ case "$XPLATFORM" in
|
||||
*-g++*)
|
||||
# Check gcc's version
|
||||
case "$(${QMAKE_CONF_COMPILER} -dumpversion)" in
|
||||
- 5*|4*|3.4*)
|
||||
+ 8*|7*|6*|5*|4*|3.4*)
|
||||
;;
|
||||
3.3*)
|
||||
canBuildWebKit="no"
|
||||
@@ -8078,7 +8078,7 @@ g++*)
|
||||
3.*)
|
||||
COMPILER_VERSION="3.*"
|
||||
;;
|
||||
- 5*|4.*)
|
||||
+ 8*|7*|6*|5*|4.*)
|
||||
COMPILER_VERSION="4"
|
||||
;;
|
||||
*)
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
|
||||
index 847f69c..2360f62 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/JavaScriptCore.pri
|
||||
@@ -234,3 +234,4 @@ SOURCES += \
|
||||
SOURCES += wtf/TCSystemAlloc.cpp
|
||||
}
|
||||
|
||||
JSValue JSC_HOST_CALL globalFuncIsFinite(ExecState* exec, JSObject*, JSValue, const ArgList& args)
|
||||
{
|
||||
double n = args.at(0).toNumber(exec);
|
||||
- return jsBoolean(!isnan(n) && !isinf(n));
|
||||
+ return jsBoolean(!std::isnan(n) && !std::isinf(n));
|
||||
}
|
||||
|
||||
JSValue JSC_HOST_CALL globalFuncDecodeURI(ExecState* exec, JSObject*, JSValue, const ArgList& args)
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h
|
||||
index 053b4c08..c3e40e4c 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSImmediate.h
|
||||
@@ -490,7 +490,7 @@ namespace JSC {
|
||||
const int intVal = static_cast<int>(d);
|
||||
|
||||
// Check for data loss from conversion to int.
|
||||
- if (intVal != d || (!intVal && signbit(d)))
|
||||
+ if (intVal != d || (!intVal && std::signbit(d)))
|
||||
return fromNumberOutsideIntegerRange(d);
|
||||
|
||||
return from(intVal);
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp
|
||||
index b089584e..d36cf585 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSONObject.cpp
|
||||
@@ -395,7 +395,7 @@ Stringifier::StringifyResult Stringifier::appendStringifiedValue(StringBuilder&
|
||||
|
||||
double numericValue;
|
||||
if (value.getNumber(numericValue)) {
|
||||
- if (!isfinite(numericValue))
|
||||
+ if (!std::isfinite(numericValue))
|
||||
builder.append("null");
|
||||
else
|
||||
builder.append(UString::from(numericValue));
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.cpp
|
||||
index 502312ca..9108cfef 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.cpp
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.cpp
|
||||
@@ -43,7 +43,7 @@ double JSValue::toInteger(ExecState* exec) const
|
||||
if (isInt32())
|
||||
return asInt32();
|
||||
double d = toNumber(exec);
|
||||
- return isnan(d) ? 0.0 : trunc(d);
|
||||
+ return std::isnan(d) ? 0.0 : trunc(d);
|
||||
}
|
||||
|
||||
double JSValue::toIntegerPreserveNaN(ExecState* exec) const
|
||||
@@ -141,7 +141,7 @@ int32_t toInt32SlowCase(double d, bool& ok)
|
||||
if (d >= -D32 / 2 && d < D32 / 2)
|
||||
return static_cast<int32_t>(d);
|
||||
|
||||
- if (isnan(d) || isinf(d)) {
|
||||
+ if (std::isnan(d) || std::isinf(d)) {
|
||||
ok = false;
|
||||
return 0;
|
||||
}
|
||||
@@ -161,7 +161,7 @@ uint32_t toUInt32SlowCase(double d, bool& ok)
|
||||
if (d >= 0.0 && d < D32)
|
||||
return static_cast<uint32_t>(d);
|
||||
|
||||
- if (isnan(d) || isinf(d)) {
|
||||
+ if (std::isnan(d) || std::isinf(d)) {
|
||||
ok = false;
|
||||
return 0;
|
||||
}
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h
|
||||
index 6da921f3..501ab5e1 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include "CallData.h"
|
||||
#include "ConstructData.h"
|
||||
-#include <math.h>
|
||||
#include <stddef.h> // for size_t
|
||||
#include <stdint.h>
|
||||
#include <wtf/AlwaysInline.h>
|
||||
@@ -612,7 +611,7 @@ namespace JSC {
|
||||
inline JSValue::JSValue(ExecState* exec, double d)
|
||||
{
|
||||
const int32_t asInt32 = static_cast<int32_t>(d);
|
||||
- if (asInt32 != d || (!asInt32 && signbit(d))) { // true for -0.0
|
||||
+ if (asInt32 != d || (!asInt32 && std::signbit(d))) { // true for -0.0
|
||||
u.asDouble = d;
|
||||
return;
|
||||
}
|
||||
@@ -693,7 +692,7 @@ namespace JSC {
|
||||
inline JSValue::JSValue(JSGlobalData* globalData, double d)
|
||||
{
|
||||
const int32_t asInt32 = static_cast<int32_t>(d);
|
||||
- if (asInt32 != d || (!asInt32 && signbit(d))) { // true for -0.0
|
||||
+ if (asInt32 != d || (!asInt32 && std::signbit(d))) { // true for -0.0
|
||||
u.asDouble = d;
|
||||
return;
|
||||
}
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp
|
||||
index 807cfe76..023fe132 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/MathObject.cpp
|
||||
@@ -29,6 +29,8 @@
|
||||
#include <wtf/RandomNumber.h>
|
||||
#include <wtf/RandomNumberSeed.h>
|
||||
|
||||
+using std::signbit;
|
||||
+
|
||||
namespace JSC {
|
||||
|
||||
ASSERT_CLASS_FITS_IN_CELL(MathObject);
|
||||
@@ -168,7 +170,7 @@ JSValue JSC_HOST_CALL mathProtoFuncMax(ExecState* exec, JSObject*, JSValue, cons
|
||||
double result = -Inf;
|
||||
for (unsigned k = 0; k < argsCount; ++k) {
|
||||
double val = args.at(k).toNumber(exec);
|
||||
- if (isnan(val)) {
|
||||
+ if (std::isnan(val)) {
|
||||
result = NaN;
|
||||
break;
|
||||
}
|
||||
@@ -184,7 +186,7 @@ JSValue JSC_HOST_CALL mathProtoFuncMin(ExecState* exec, JSObject*, JSValue, cons
|
||||
double result = +Inf;
|
||||
for (unsigned k = 0; k < argsCount; ++k) {
|
||||
double val = args.at(k).toNumber(exec);
|
||||
- if (isnan(val)) {
|
||||
+ if (std::isnan(val)) {
|
||||
result = NaN;
|
||||
break;
|
||||
}
|
||||
@@ -201,9 +203,9 @@ JSValue JSC_HOST_CALL mathProtoFuncPow(ExecState* exec, JSObject*, JSValue, cons
|
||||
double arg = args.at(0).toNumber(exec);
|
||||
double arg2 = args.at(1).toNumber(exec);
|
||||
|
||||
- if (isnan(arg2))
|
||||
+ if (std::isnan(arg2))
|
||||
return jsNaN(exec);
|
||||
- if (isinf(arg2) && fabs(arg) == 1)
|
||||
+ if (std::isinf(arg2) && fabs(arg) == 1)
|
||||
return jsNaN(exec);
|
||||
return jsNumber(exec, pow(arg, arg2));
|
||||
}
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/NumberPrototype.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/NumberPrototype.cpp
|
||||
index 67210fab..584a57fd 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/NumberPrototype.cpp
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/NumberPrototype.cpp
|
||||
@@ -157,7 +157,7 @@ JSValue JSC_HOST_CALL numberProtoFuncToString(ExecState* exec, JSObject*, JSValu
|
||||
char s[2048 + 3];
|
||||
const char* lastCharInString = s + sizeof(s) - 1;
|
||||
double x = v.uncheckedGetNumber();
|
||||
- if (isnan(x) || isinf(x))
|
||||
+ if (std::isnan(x) || std::isinf(x))
|
||||
return jsString(exec, UString::from(x));
|
||||
|
||||
bool isNegative = x < 0.0;
|
||||
@@ -233,7 +233,7 @@ JSValue JSC_HOST_CALL numberProtoFuncToFixed(ExecState* exec, JSObject*, JSValue
|
||||
int f = static_cast<int>(df);
|
||||
|
||||
double x = v.uncheckedGetNumber();
|
||||
- if (isnan(x))
|
||||
+ if (std::isnan(x))
|
||||
return jsNontrivialString(exec, "NaN");
|
||||
|
||||
UString s;
|
||||
@@ -319,7 +319,7 @@ JSValue JSC_HOST_CALL numberProtoFuncToExponential(ExecState* exec, JSObject*, J
|
||||
|
||||
double x = v.uncheckedGetNumber();
|
||||
|
||||
- if (isnan(x) || isinf(x))
|
||||
+ if (std::isnan(x) || std::isinf(x))
|
||||
return jsString(exec, UString::from(x));
|
||||
|
||||
JSValue fractionalDigitsValue = args.at(0);
|
||||
@@ -345,7 +345,7 @@ JSValue JSC_HOST_CALL numberProtoFuncToExponential(ExecState* exec, JSObject*, J
|
||||
decimalAdjust = static_cast<int>(logx);
|
||||
}
|
||||
|
||||
- if (isnan(x))
|
||||
+ if (std::isnan(x))
|
||||
return jsNontrivialString(exec, "NaN");
|
||||
|
||||
if (x == -0.0) // (-0.0).toExponential() should print as 0 instead of -0
|
||||
@@ -391,7 +391,7 @@ JSValue JSC_HOST_CALL numberProtoFuncToPrecision(ExecState* exec, JSObject*, JSV
|
||||
|
||||
double doublePrecision = args.at(0).toIntegerPreserveNaN(exec);
|
||||
double x = v.uncheckedGetNumber();
|
||||
- if (args.at(0).isUndefined() || isnan(x) || isinf(x))
|
||||
+ if (args.at(0).isUndefined() || std::isnan(x) || std::isinf(x))
|
||||
return jsString(exec, v.toString(exec));
|
||||
|
||||
UString s;
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/StringPrototype.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/StringPrototype.cpp
|
||||
index d002e071..6c6a0946 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/StringPrototype.cpp
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/StringPrototype.cpp
|
||||
@@ -480,7 +480,7 @@ JSValue JSC_HOST_CALL stringProtoFuncLastIndexOf(ExecState* exec, JSObject*, JSV
|
||||
dpos = len;
|
||||
#if OS(SYMBIAN)
|
||||
// Work around for broken NaN compare operator
|
||||
- else if (isnan(dpos))
|
||||
+ else if (std::isnan(dpos))
|
||||
dpos = len;
|
||||
#endif
|
||||
return jsNumber(exec, s.rfind(u2, static_cast<int>(dpos)));
|
||||
@@ -680,9 +680,9 @@ JSValue JSC_HOST_CALL stringProtoFuncSubstring(ExecState* exec, JSObject*, JSVal
|
||||
|
||||
double start = a0.toNumber(exec);
|
||||
double end = a1.toNumber(exec);
|
||||
- if (isnan(start))
|
||||
+ if (std::isnan(start))
|
||||
start = 0;
|
||||
- if (isnan(end))
|
||||
+ if (std::isnan(end))
|
||||
end = 0;
|
||||
if (start < 0)
|
||||
start = 0;
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp
|
||||
index e72f94b5..a6eb0d63 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/DateMath.cpp
|
||||
@@ -846,7 +846,7 @@ double parseDateFromNullTerminatedCharacters(const char* dateString)
|
||||
bool haveTZ;
|
||||
int offset;
|
||||
double ms = parseDateFromNullTerminatedCharacters(dateString, haveTZ, offset);
|
||||
- if (isnan(ms))
|
||||
+ if (std::isnan(ms))
|
||||
return NaN;
|
||||
|
||||
// fall back to local timezone
|
||||
@@ -858,7 +858,7 @@ double parseDateFromNullTerminatedCharacters(const char* dateString)
|
||||
|
||||
double timeClip(double t)
|
||||
{
|
||||
- if (!isfinite(t))
|
||||
+ if (!std::isfinite(t))
|
||||
return NaN;
|
||||
if (fabs(t) > maxECMAScriptTime)
|
||||
return NaN;
|
||||
@@ -971,7 +971,7 @@ double parseDateFromNullTerminatedCharacters(ExecState* exec, const char* dateSt
|
||||
bool haveTZ;
|
||||
int offset;
|
||||
double ms = WTF::parseDateFromNullTerminatedCharacters(dateString, haveTZ, offset);
|
||||
- if (isnan(ms))
|
||||
+ if (std::isnan(ms))
|
||||
return NaN;
|
||||
|
||||
// fall back to local timezone
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h
|
||||
index 42a92330..81493754 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashTable.h
|
||||
@@ -257,19 +257,20 @@ namespace WTF {
|
||||
|
||||
using std::swap;
|
||||
|
||||
-#if !COMPILER(MSVC) && !OS(QNX) && !defined(_LIBCPP_VERSION)
|
||||
- // The Dinkumware C++ library (used by MSVC and QNX) and clang's libc++ have a swap for pairs defined.
|
||||
+ // Work around MSVC's standard library, whose swap for pairs does not swap by component.
|
||||
+ template<typename T> inline void hashTableSwap(T& a, T& b)
|
||||
+ {
|
||||
+ swap(a, b);
|
||||
+ }
|
||||
|
||||
- // swap pairs by component, in case of pair members that specialize swap
|
||||
- template<typename T, typename U> inline void swap(pair<T, U>& a, pair<T, U>& b)
|
||||
+ template<typename T, typename U> inline void hashTableSwap(pair<T, U>& a, pair<T, U>& b)
|
||||
{
|
||||
swap(a.first, b.first);
|
||||
swap(a.second, b.second);
|
||||
}
|
||||
-#endif
|
||||
|
||||
template<typename T, bool useSwap> struct Mover;
|
||||
- template<typename T> struct Mover<T, true> { static void move(T& from, T& to) { swap(from, to); } };
|
||||
+ template<typename T> struct Mover<T, true> { static void move(T& from, T& to) { hashTableSwap(from, to); } };
|
||||
template<typename T> struct Mover<T, false> { static void move(T& from, T& to) { to = from; } };
|
||||
|
||||
template<typename Key, typename Value, typename HashFunctions> class IdentityHashTranslator {
|
||||
+QMAKE_CXXFLAGS += -std=gnu++98
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h
|
||||
index 9e2e638d..e1a88e31 100644
|
||||
index 9e2e638..0825cdb 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/MathExtras.h
|
||||
@@ -27,7 +27,7 @@
|
||||
@@ -27,7 +27,6 @@
|
||||
#define WTF_MathExtras_h
|
||||
|
||||
#include <float.h>
|
||||
-#include <math.h>
|
||||
+#include <cmath.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#if OS(SOLARIS)
|
||||
@@ -73,20 +73,26 @@ inline double wtf_ceil(double x) { return copysign(ceil(x), x); }
|
||||
|
||||
#if OS(SOLARIS)
|
||||
|
||||
+namespace std {
|
||||
diff --git a/src/plugins/accessible/qaccessiblebase.pri b/src/plugins/accessible/qaccessiblebase.pri
|
||||
index 95c1fad..a28f289 100644
|
||||
--- a/src/plugins/accessible/qaccessiblebase.pri
|
||||
+++ b/src/plugins/accessible/qaccessiblebase.pri
|
||||
@@ -1,2 +1,4 @@
|
||||
target.path += $$[QT_INSTALL_PLUGINS]/accessible
|
||||
INSTALLS += target
|
||||
+
|
||||
#ifndef isfinite
|
||||
inline bool isfinite(double x) { return finite(x) && !isnand(x); }
|
||||
#endif
|
||||
+#ifndef signbit
|
||||
+inline bool signbit(double x) { return copysign(1.0, x) < 0; }
|
||||
+#endif
|
||||
#ifndef isinf
|
||||
inline bool isinf(double x) { return !finite(x) && !isnand(x); }
|
||||
#endif
|
||||
-#ifndef signbit
|
||||
-inline bool signbit(double x) { return x < 0.0; } // FIXME: Wrong for negative 0.
|
||||
-#endif
|
||||
+
|
||||
+} // namespace std
|
||||
+QMAKE_CXXFLAGS += -std=gnu++98
|
||||
diff --git a/src/xmlpatterns/api/qcoloroutput_p.h b/src/xmlpatterns/api/qcoloroutput_p.h
|
||||
index 7911e89..be284d1 100644
|
||||
--- a/src/xmlpatterns/api/qcoloroutput_p.h
|
||||
+++ b/src/xmlpatterns/api/qcoloroutput_p.h
|
||||
@@ -70,8 +70,8 @@ namespace QPatternist
|
||||
ForegroundShift = 10,
|
||||
BackgroundShift = 20,
|
||||
SpecialShift = 20,
|
||||
- ForegroundMask = ((1 << ForegroundShift) - 1) << ForegroundShift,
|
||||
- BackgroundMask = ((1 << BackgroundShift) - 1) << BackgroundShift
|
||||
+ ForegroundMask = 0x1f << ForegroundShift,
|
||||
+ BackgroundMask = 0x7 << BackgroundShift
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#if OS(OPENBSD)
|
||||
|
||||
+namespace std {
|
||||
+
|
||||
#ifndef isfinite
|
||||
inline bool isfinite(double x) { return finite(x); }
|
||||
#endif
|
||||
@@ -94,6 +100,8 @@ inline bool isfinite(double x) { return finite(x); }
|
||||
inline bool signbit(double x) { struct ieee_double *p = (struct ieee_double *)&x; return p->dbl_sign; }
|
||||
#endif
|
||||
|
||||
+} // namespace std
|
||||
+
|
||||
#endif
|
||||
|
||||
#if (COMPILER(MSVC) && _MSC_VER < 1800) || COMPILER(RVCT)
|
||||
@@ -121,17 +129,23 @@ inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); }
|
||||
|
||||
#endif
|
||||
|
||||
-#if COMPILER(MSVC) && _MSC_VER < 1800
|
||||
+#if COMPILER(MSVC)
|
||||
+
|
||||
+namespace std {
|
||||
|
||||
inline bool isinf(double num) { return !_finite(num) && !_isnan(num); }
|
||||
inline bool isnan(double num) { return !!_isnan(num); }
|
||||
+inline bool isfinite(double x) { return _finite(x); }
|
||||
+#if _MSC_VER < 1800
|
||||
inline bool signbit(double num) { return _copysign(1.0, num) < 0; }
|
||||
+#endif
|
||||
+
|
||||
+} // namespace std
|
||||
|
||||
inline double nextafter(double x, double y) { return _nextafter(x, y); }
|
||||
inline float nextafterf(float x, float y) { return x > y ? x - FLT_EPSILON : x + FLT_EPSILON; }
|
||||
|
||||
inline double copysign(double x, double y) { return _copysign(x, y); }
|
||||
-inline int isfinite(double x) { return _finite(x); }
|
||||
|
||||
// Work around a bug in Win, where atan2(+-infinity, +-infinity) yields NaN instead of specific values.
|
||||
inline double wtf_atan2(double x, double y)
|
||||
@@ -157,10 +171,10 @@ inline double wtf_atan2(double x, double y)
|
||||
}
|
||||
|
||||
// Work around a bug in the Microsoft CRT, where fmod(x, +-infinity) yields NaN instead of x.
|
||||
-inline double wtf_fmod(double x, double y) { return (!isinf(x) && isinf(y)) ? x : fmod(x, y); }
|
||||
+extern "C" inline double wtf_fmod(double x, double y) { return (!std::isinf(x) && std::isinf(y)) ? x : fmod(x, y); }
|
||||
|
||||
// Work around a bug in the Microsoft CRT, where pow(NaN, 0) yields NaN instead of 1.
|
||||
-inline double wtf_pow(double x, double y) { return y == 0 ? 1 : pow(x, y); }
|
||||
+extern "C" inline double wtf_pow(double x, double y) { return y == 0 ? 1 : pow(x, y); }
|
||||
|
||||
#define atan2(x, y) wtf_atan2(x, y)
|
||||
#define fmod(x, y) wtf_fmod(x, y)
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h
|
||||
index 7ba487fc..3ef0f9f4 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h
|
||||
@@ -26,6 +26,9 @@
|
||||
|
||||
#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
|
||||
#include <type_traits>
|
||||
+#if defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)
|
||||
+#include <tr1/memory>
|
||||
+#endif
|
||||
#endif
|
||||
|
||||
namespace WTF {
|
||||
@@ -166,13 +169,21 @@ namespace WTF {
|
||||
typedef T Type;
|
||||
};
|
||||
|
||||
-#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
|
||||
-
|
||||
+#if COMPILER(CLANG) || GCC_VERSION_AT_LEAST(4, 6, 0) || (defined(_MSC_VER) && (_MSC_VER >= 1400) && (_MSC_VER < 1600) && !defined(__INTEL_COMPILER))
|
||||
+ // VC8 (VS2005) and later has __has_trivial_constructor and __has_trivial_destructor,
|
||||
+ // but the implementation returns false for built-in types. We add the extra IsPod condition to
|
||||
+ // work around this.
|
||||
+ template <typename T> struct HasTrivialConstructor {
|
||||
+ static const bool value = __has_trivial_constructor(T) || IsPod<RemoveConstVolatile<T> >::value;
|
||||
+ };
|
||||
+ template <typename T> struct HasTrivialDestructor {
|
||||
+ static const bool value = __has_trivial_destructor(T) || IsPod<RemoveConstVolatile<T> >::value;
|
||||
+ };
|
||||
+#elif (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
|
||||
// GCC's libstdc++ 20070724 and later supports C++ TR1 type_traits in the std namespace.
|
||||
// VC10 (VS2010) and later support C++ TR1 type_traits in the std::tr1 namespace.
|
||||
template<typename T> struct HasTrivialConstructor : public std::tr1::has_trivial_constructor<T> { };
|
||||
template<typename T> struct HasTrivialDestructor : public std::tr1::has_trivial_destructor<T> { };
|
||||
-
|
||||
#else
|
||||
|
||||
// This compiler doesn't provide type traits, so we provide basic HasTrivialConstructor
|
||||
@@ -189,15 +200,8 @@ namespace WTF {
|
||||
typedef IntegralConstant<bool, true> true_type;
|
||||
typedef IntegralConstant<bool, false> false_type;
|
||||
|
||||
-#if defined(_MSC_VER) && (_MSC_VER >= 1400) && !defined(__INTEL_COMPILER)
|
||||
- // VC8 (VS2005) and later have built-in compiler support for HasTrivialConstructor / HasTrivialDestructor,
|
||||
- // but for some unexplained reason it doesn't work on built-in types.
|
||||
- template <typename T> struct HasTrivialConstructor : public IntegralConstant<bool, __has_trivial_constructor(T)>{ };
|
||||
- template <typename T> struct HasTrivialDestructor : public IntegralConstant<bool, __has_trivial_destructor(T)>{ };
|
||||
-#else
|
||||
template <typename T> struct HasTrivialConstructor : public false_type{ };
|
||||
template <typename T> struct HasTrivialDestructor : public false_type{ };
|
||||
-#endif
|
||||
|
||||
template <typename T> struct HasTrivialConstructor<T*> : public true_type{ };
|
||||
template <typename T> struct HasTrivialDestructor<T*> : public true_type{ };
|
||||
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/dtoa.cpp b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/dtoa.cpp
|
||||
index 6289d046..fe650425 100644
|
||||
--- a/src/3rdparty/javascriptcore/JavaScriptCore/wtf/dtoa.cpp
|
||||
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/wtf/dtoa.cpp
|
||||
@@ -2395,7 +2395,7 @@ void doubleToStringInJavaScriptFormat(double d, DtoaBuffer buffer, unsigned* res
|
||||
ASSERT(buffer);
|
||||
|
||||
// avoid ever printing -NaN, in JS conceptually there is only one NaN value
|
||||
- if (isnan(d)) {
|
||||
+ if (std::isnan(d)) {
|
||||
append(buffer, "NaN", 3);
|
||||
if (resultLength)
|
||||
*resultLength = 3;
|
||||
diff --git a/src/script/script.pro b/src/script/script.pro
|
||||
index d9472764..071c35bb 100644
|
||||
--- a/src/script/script.pro
|
||||
+++ b/src/script/script.pro
|
||||
@@ -105,5 +105,3 @@ integrity {
|
||||
CFLAGS += --diag_remark=236,82
|
||||
}
|
||||
|
||||
-# WebKit doesn't compile in C++0x mode
|
||||
-*-g++*:QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x
|
||||
public:
|
||||
--
|
||||
2.17.1
|
||||
2.19.1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user