|
1 Remove obsolete workarounds for previous Solaris problems with these |
|
2 functions and C++ programs. |
|
3 |
|
4 Also, refer to the related math functions using the fully-qualified |
|
5 namespace; see upstream bug: |
|
6 143884 - Prefix isnan() with std |
|
7 https://bugs.webkit.org/show_bug.cgi?id=143884 |
|
8 |
|
9 --- webkitgtk-2.8.3/Source/WTF/wtf/MathExtras.h 2015-05-15 01:41:50.000000000 -0700 |
|
10 +++ webkitgtk-2.8.3/Source/WTF/wtf/MathExtras.h 2015-07-09 19:23:03.451197962 -0700 |
|
11 @@ -34,10 +34,6 @@ |
|
12 #include <stdlib.h> |
|
13 #include <wtf/StdLibExtras.h> |
|
14 |
|
15 -#if OS(SOLARIS) |
|
16 -#include <ieeefp.h> |
|
17 -#endif |
|
18 - |
|
19 #if OS(OPENBSD) |
|
20 #include <sys/types.h> |
|
21 #include <machine/ieee.h> |
|
22 @@ -84,24 +80,6 @@ |
|
23 |
|
24 #endif |
|
25 |
|
26 -#if OS(SOLARIS) |
|
27 - |
|
28 -namespace std { |
|
29 - |
|
30 -#ifndef isfinite |
|
31 -inline bool isfinite(double x) { return finite(x) && !isnand(x); } |
|
32 -#endif |
|
33 -#ifndef signbit |
|
34 -inline bool signbit(double x) { return copysign(1.0, x) < 0; } |
|
35 -#endif |
|
36 -#ifndef isinf |
|
37 -inline bool isinf(double x) { return !finite(x) && !isnand(x); } |
|
38 -#endif |
|
39 - |
|
40 -} // namespace std |
|
41 - |
|
42 -#endif |
|
43 - |
|
44 #if OS(OPENBSD) |
|
45 |
|
46 namespace std { |
|
47 --- webkitgtk-2.8.3/Source/JavaScriptCore/API/tests/testapi.c 2015-05-15 01:41:50.000000000 -0700 |
|
48 +++ webkitgtk-2.8.3/Source/JavaScriptCore/API/tests/testapi.c 2015-07-09 20:14:37.933449207 -0700 |
|
49 @@ -72,7 +72,7 @@ |
|
50 // FIXME <rdar://4668451> - On i386 the isnan(double) macro tries to map to the isnan(float) function, |
|
51 // causing a build break with -Wshorten-64-to-32 enabled. The issue is known by the appropriate team. |
|
52 // After that's resolved, we can remove these casts |
|
53 - if (number != expectedValue && !(isnan((float)number) && isnan((float)expectedValue))) { |
|
54 + if (number != expectedValue && !(std::isnan((float)number) && std::isnan((float)expectedValue))) { |
|
55 fprintf(stderr, "assertEqualsAsNumber failed: %p, %lf\n", value, expectedValue); |
|
56 failed = 1; |
|
57 } |
|
58 @@ -1500,7 +1500,7 @@ |
|
59 // FIXME <rdar://4668451> - On i386 the isnan(double) macro tries to map to the isnan(float) function, |
|
60 // causing a build break with -Wshorten-64-to-32 enabled. The issue is known by the appropriate team. |
|
61 // After that's resolved, we can remove these casts |
|
62 - ASSERT(isnan((float)JSValueToNumber(context, jsObjectNoProto, &exception))); |
|
63 + ASSERT(std::isnan((float)JSValueToNumber(context, jsObjectNoProto, &exception))); |
|
64 ASSERT(exception); |
|
65 |
|
66 exception = NULL; |
|
67 --- webkitgtk-2.8.3/Source/WTF/wtf/Stopwatch.h 2015-04-28 03:37:59.000000000 -0700 |
|
68 +++ webkitgtk-2.8.3/Source/WTF/wtf/Stopwatch.h 2015-07-09 20:14:50.495480192 -0700 |
|
69 @@ -44,7 +44,7 @@ |
|
70 |
|
71 double elapsedTime(); |
|
72 |
|
73 - bool isActive() const { return !isnan(m_lastStartTime); } |
|
74 + bool isActive() const { return !std::isnan(m_lastStartTime); } |
|
75 private: |
|
76 Stopwatch() { reset(); } |
|
77 |
|
78 @@ -60,14 +60,14 @@ |
|
79 |
|
80 inline void Stopwatch::start() |
|
81 { |
|
82 - ASSERT_WITH_MESSAGE(isnan(m_lastStartTime), "Tried to start the stopwatch, but it is already running."); |
|
83 + ASSERT_WITH_MESSAGE(std::isnan(m_lastStartTime), "Tried to start the stopwatch, but it is already running."); |
|
84 |
|
85 m_lastStartTime = monotonicallyIncreasingTime(); |
|
86 } |
|
87 |
|
88 inline void Stopwatch::stop() |
|
89 { |
|
90 - ASSERT_WITH_MESSAGE(!isnan(m_lastStartTime), "Tried to stop the stopwatch, but it is not running."); |
|
91 + ASSERT_WITH_MESSAGE(!std::isnan(m_lastStartTime), "Tried to stop the stopwatch, but it is not running."); |
|
92 |
|
93 m_elapsedTime += monotonicallyIncreasingTime() - m_lastStartTime; |
|
94 m_lastStartTime = NAN; |
|
95 @@ -75,7 +75,7 @@ |
|
96 |
|
97 inline double Stopwatch::elapsedTime() |
|
98 { |
|
99 - bool shouldSuspend = !isnan(m_lastStartTime); |
|
100 + bool shouldSuspend = !std::isnan(m_lastStartTime); |
|
101 if (shouldSuspend) |
|
102 stop(); |
|
103 |