Fix T37987: MSVC 2013 has C99 headers and warns for out define hypot _hypot for good reason it seems
This commit is contained in:
@@ -78,7 +78,7 @@ CCL_NAMESPACE_BEGIN
|
|||||||
|
|
||||||
#ifndef __KERNEL_GPU__
|
#ifndef __KERNEL_GPU__
|
||||||
|
|
||||||
#if(!defined(FREE_WINDOWS))
|
#if (!defined(FREE_WINDOWS)) && (_MSC_VER < 1800)
|
||||||
#define copysignf(x, y) ((float)_copysign(x, y))
|
#define copysignf(x, y) ((float)_copysign(x, y))
|
||||||
#define hypotf(x, y) _hypotf(x, y)
|
#define hypotf(x, y) _hypotf(x, y)
|
||||||
#define isnan(x) _isnan(x)
|
#define isnan(x) _isnan(x)
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
|
|
||||||
// conventional functions required by several matrix algorithms
|
// conventional functions required by several matrix algorithms
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if (defined _WIN32) && (_MSC_VER < 1800)
|
||||||
#define hypot _hypot
|
#define hypot _hypot
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
/* needed for fabs, sqrt() below */
|
/* needed for fabs, sqrt() below */
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if (defined _WIN32) && (_MSC_VER < 1800)
|
||||||
#define hypot _hypot
|
#define hypot _hypot
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -143,20 +143,27 @@ static const int NAN_INT = 0x7FC00000;
|
|||||||
#define copysignf(a, b) ((float)copysign(a, b))
|
#define copysignf(a, b) ((float)copysign(a, b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* C99 or POSIX.1-2001 */
|
#else /* C99 or POSIX.1-2001 */
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
# ifndef FREE_WINDOWS
|
# ifndef FREE_WINDOWS
|
||||||
# ifndef isnan
|
# ifndef isnan
|
||||||
# define isnan(n) _isnan(n)
|
# define isnan(n) _isnan(n)
|
||||||
# endif
|
# endif
|
||||||
# define finite _finite
|
|
||||||
# ifndef hypot
|
# ifndef hypot
|
||||||
# define hypot(a, b) _hypot(a, b)
|
# define hypot(a, b) _hypot(a, b)
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* C99 or POSIX.1-2001 */
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
# ifndef FREE_WINDOWS
|
||||||
|
# define finite _finite
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Causes warning:
|
/* Causes warning:
|
||||||
* incompatible types when assigning to type 'Foo' from type 'Bar'
|
* incompatible types when assigning to type 'Foo' from type 'Bar'
|
||||||
* ... the compiler optimizes away the temp var */
|
* ... the compiler optimizes away the temp var */
|
||||||
|
Reference in New Issue
Block a user