1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
All this is needed for qt-webkit to build if c++0x use is enabled
while using gcc-4.6 ...
you also need to append -fpermissive to the compiler flags
--- src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h
+++ src/3rdparty/javascriptcore/JavaScriptCore/wtf/TypeTraits.h
@@ -23,6 +23,7 @@
#define TypeTraits_h
#include "Platform.h"
+#include <tr1/memory>
#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
#include <type_traits>
--- src/3rdparty/webkit/Source/JavaScriptCore/wtf/TypeTraits.h
+++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/TypeTraits.h
@@ -23,6 +23,7 @@
#define TypeTraits_h
#include "Platform.h"
+#include <tr1/memory>
#if (defined(__GLIBCXX__) && (__GLIBCXX__ >= 20070724) && defined(__GXX_EXPERIMENTAL_CXX0X__)) || (defined(_MSC_VER) && (_MSC_VER >= 1600))
#include <type_traits>
--- src/3rdparty/webkit/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
+++ src/3rdparty/webkit/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
@@ -1106,7 +1106,7 @@ RegisterID* BytecodeGenerator::emitLoad(RegisterID* dst, double number)
// FIXME: Our hash tables won't hold infinity, so we make a new JSValue each time.
// Later we can do the extra work to handle that like the other cases. They also don't
// work correctly with NaN as a key.
- if (isnan(number) || number == HashTraits<double>::emptyValue() || HashTraits<double>::isDeletedValue(number))
+ if (std::isnan(number) || number == HashTraits<double>::emptyValue() || HashTraits<double>::isDeletedValue(number))
return emitLoad(dst, jsNumber(number));
JSValue& valueInMap = m_numberMap.add(number, JSValue()).first->second;
if (!valueInMap)
--- src/3rdparty/webkit/Source/JavaScriptCore/wtf/MathExtras.h
+++ src/3rdparty/webkit/Source/JavaScriptCore/wtf/MathExtras.h
@@ -137,8 +137,10 @@ inline double trunc(double num) { return num > 0 ? floor(num) : ceil(num); }
inline long long abs(long long num) { return _abs64(num); }
#endif
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
inline bool isinf(double num) { return !_finite(num) && !_isnan(num); }
inline bool isnan(double num) { return !!_isnan(num); }
+#endif
inline bool signbit(double num) { return _copysign(1.0, num) < 0; }
inline double nextafter(double x, double y) { return _nextafter(x, y); }
@@ -240,8 +242,10 @@ inline int clampToInteger(unsigned value)
#if !COMPILER(MSVC) && !(COMPILER(RVCT) && PLATFORM(BREWMP)) && !OS(SOLARIS) && !OS(SYMBIAN)
using std::isfinite;
+#ifndef __GXX_EXPERIMENTAL_CXX0X__
using std::isinf;
using std::isnan;
+#endif
using std::signbit;
#endif
--- src/3rdparty/webkit/Source/WebCore/bindings/js/JSGeolocationCustom.cpp
+++ src/3rdparty/webkit/Source/WebCore/bindings/js/JSGeolocationCustom.cpp
@@ -80,7 +80,7 @@ static PassRefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValu
if (exec->hadException())
return 0;
// If the value is positive infinity, there's nothing to do.
- if (!(isinf(timeoutNumber) && (timeoutNumber > 0))) {
+ if (!(std::isinf(timeoutNumber) && (timeoutNumber > 0))) {
// Wrap to int32 and force non-negative to match behavior of window.setTimeout.
options->setTimeout(max(0, timeoutValue.toInt32(exec)));
if (exec->hadException())
@@ -95,7 +95,7 @@ static PassRefPtr<PositionOptions> createPositionOptions(ExecState* exec, JSValu
double maximumAgeNumber = maximumAgeValue.toNumber(exec);
if (exec->hadException())
return 0;
- if (isinf(maximumAgeNumber) && (maximumAgeNumber > 0)) {
+ if (std::isinf(maximumAgeNumber) && (maximumAgeNumber > 0)) {
// If the value is positive infinity, clear maximumAge.
options->clearMaximumAge();
} else {
--- src/3rdparty/webkit/Source/WebCore/html/HTMLInputElement.cpp
+++ src/3rdparty/webkit/Source/WebCore/html/HTMLInputElement.cpp
@@ -332,7 +332,7 @@ void HTMLInputElement::applyStep(double count, ExceptionCode& ec)
return;
}
double newValue = current + step * count;
- if (isinf(newValue)) {
+ if (std::isinf(newValue)) {
ec = INVALID_STATE_ERR;
return;
}
--- src/3rdparty/webkit/Source/WebCore/html/NumberInputType.cpp
+++ src/3rdparty/webkit/Source/WebCore/html/NumberInputType.cpp
@@ -132,7 +132,7 @@ bool NumberInputType::stepMismatch(const String& value, double step) const
if (!parseToDoubleForNumberType(value, &doubleValue))
return false;
doubleValue = fabs(doubleValue - stepBase());
- if (isinf(doubleValue))
+ if (std::isinf(doubleValue))
return false;
// double's fractional part size is DBL_MAN_DIG-bit. If the current value
// is greater than step*2^DBL_MANT_DIG, the following computation for
|