Do not expect a copysign function to be defined in <cmath> with clang-cl

clang-cl defines __cplusplus to 201103L, but it uses the runtime library
provided by MSVC, so the copysign function will not be available there.

BUG=skia:
R=reed@google.com

Author: ehsan.akhgari@gmail.com

Review URL: https://codereview.chromium.org/526813002
This commit is contained in:
ehsan.akhgari 2014-09-12 12:30:35 -07:00 committed by Commit bot
parent 9db509272a
commit c34b0d4e9a

View File

@ -31,7 +31,7 @@ static inline float sk_float_pow(float base, float exp) {
static inline float sk_float_copysign(float x, float y) {
// c++11 contains a 'float copysign(float, float)' function in <cmath>.
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
#if (!defined(_MSC_VER) && __cplusplus >= 201103L) || (defined(_MSC_VER) && _MSC_VER >= 1800)
return copysign(x, y);
// Posix has demanded 'float copysignf(float, float)' (from C99) since Issue 6.