Title: [149285] trunk/Source/WTF
Revision
149285
Author
[email protected]
Date
2013-04-29 08:22:32 -0700 (Mon, 29 Apr 2013)

Log Message

Build fix for WinCE after r148888 and r149097
https://bugs.webkit.org/show_bug.cgi?id=115168

Reviewed by Anders Carlsson.

When using compiler intrinsics on Windows CE the compiler complains
about wrong linkage specification of replaced CRT functions defined
in math.h. This is because the compiler has intrinsics for this
functions defined, and requires them to have extern "C" linkage.

* wtf/MathExtras.h:
(wtf_atan2): Added extern "C" to function signature.
(wtf_fmod): Ditto.
(wtf_pow): Ditto.

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (149284 => 149285)


--- trunk/Source/WTF/ChangeLog	2013-04-29 15:04:10 UTC (rev 149284)
+++ trunk/Source/WTF/ChangeLog	2013-04-29 15:22:32 UTC (rev 149285)
@@ -1,3 +1,20 @@
+2013-04-29  Patrick Gansterer  <[email protected]>
+
+        Build fix for WinCE after r148888 and r149097
+        https://bugs.webkit.org/show_bug.cgi?id=115168
+
+        Reviewed by Anders Carlsson.
+
+        When using compiler intrinsics on Windows CE the compiler complains
+        about wrong linkage specification of replaced CRT functions defined
+        in math.h. This is because the compiler has intrinsics for this
+        functions defined, and requires them to have extern "C" linkage.
+
+        * wtf/MathExtras.h:
+        (wtf_atan2): Added extern "C" to function signature.
+        (wtf_fmod): Ditto.
+        (wtf_pow): Ditto.
+
 2013-04-29  Carlos Garcia Campos  <[email protected]>
 
         Unreviewed. Fix make distcheck.

Modified: trunk/Source/WTF/wtf/MathExtras.h (149284 => 149285)


--- trunk/Source/WTF/wtf/MathExtras.h	2013-04-29 15:04:10 UTC (rev 149284)
+++ trunk/Source/WTF/wtf/MathExtras.h	2013-04-29 15:22:32 UTC (rev 149285)
@@ -187,7 +187,7 @@
 inline double copysign(double x, double y) { return _copysign(x, y); }
 
 // Work around a bug in Win, where atan2(+-infinity, +-infinity) yields NaN instead of specific values.
-inline double wtf_atan2(double x, double y)
+extern "C" inline double wtf_atan2(double x, double y)
 {
     double posInf = std::numeric_limits<double>::infinity();
     double negInf = -std::numeric_limits<double>::infinity();
@@ -210,10 +210,10 @@
 }
 
 // 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 (!std::isinf(x) && std::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)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to