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