Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intern/cycles/util/util_math.h2
-rw-r--r--intern/iksolver/intern/TNT/tntmath.h2
-rw-r--r--intern/smoke/intern/tnt/tnt_math_utils.h2
-rw-r--r--source/blender/blenlib/BLI_math_base.h11
4 files changed, 12 insertions, 5 deletions
diff --git a/intern/cycles/util/util_math.h b/intern/cycles/util/util_math.h
index 851c67b1189..fdee1e90486 100644
--- a/intern/cycles/util/util_math.h
+++ b/intern/cycles/util/util_math.h
@@ -78,7 +78,7 @@ CCL_NAMESPACE_BEGIN
#ifndef __KERNEL_GPU__
-#if(!defined(FREE_WINDOWS))
+#if (!defined(FREE_WINDOWS)) && (_MSC_VER < 1800)
#define copysignf(x, y) ((float)_copysign(x, y))
#define hypotf(x, y) _hypotf(x, y)
#define isnan(x) _isnan(x)
diff --git a/intern/iksolver/intern/TNT/tntmath.h b/intern/iksolver/intern/TNT/tntmath.h
index a1fef28075c..d55acb00d04 100644
--- a/intern/iksolver/intern/TNT/tntmath.h
+++ b/intern/iksolver/intern/TNT/tntmath.h
@@ -34,7 +34,7 @@
// conventional functions required by several matrix algorithms
-#ifdef _WIN32
+#if (defined _WIN32) && (_MSC_VER < 1800)
#define hypot _hypot
#endif
diff --git a/intern/smoke/intern/tnt/tnt_math_utils.h b/intern/smoke/intern/tnt/tnt_math_utils.h
index e0bf4839733..d96a0aefcd7 100644
--- a/intern/smoke/intern/tnt/tnt_math_utils.h
+++ b/intern/smoke/intern/tnt/tnt_math_utils.h
@@ -7,7 +7,7 @@
/* needed for fabs, sqrt() below */
#include <cmath>
-#ifdef _WIN32
+#if (defined _WIN32) && (_MSC_VER < 1800)
#define hypot _hypot
#endif
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index 99d9397f218..e2a5672b7ea 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -143,20 +143,27 @@ static const int NAN_INT = 0x7FC00000;
#define copysignf(a, b) ((float)copysign(a, b))
#endif
-#endif /* C99 or POSIX.1-2001 */
+#else /* C99 or POSIX.1-2001 */
#ifdef WIN32
# ifndef FREE_WINDOWS
# ifndef isnan
# define isnan(n) _isnan(n)
# endif
-# define finite _finite
# ifndef hypot
# define hypot(a, b) _hypot(a, b)
# endif
# endif
#endif
+#endif /* C99 or POSIX.1-2001 */
+
+#ifdef WIN32
+# ifndef FREE_WINDOWS
+# define finite _finite
+# endif
+#endif
+
/* Causes warning:
* incompatible types when assigning to type 'Foo' from type 'Bar'
* ... the compiler optimizes away the temp var */