Issue #20221: Removed conflicting (or circular) hypot definition
authorZachary Ware <zachary.ware@gmail.com>
Thu, 20 Feb 2014 21:39:29 +0000 (15:39 -0600)
committerZachary Ware <zachary.ware@gmail.com>
Thu, 20 Feb 2014 21:39:29 +0000 (15:39 -0600)
when compiled with VS 2010 or above.  Initial patch by Tabrez Mohammed.

Misc/NEWS
PC/pyconfig.h

index 43bdbd427f000b7baaf71f6cddbf7d7b2fc9013a..40c2760679218a9c8cacf4a63c0ac5e8a3e24d23 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -68,6 +68,9 @@ Library
 Build
 -----
 
+- Issue #20221: Removed conflicting (or circular) hypot definition when
+  compiled with VS 2010 or above.  Initial patch by Tabrez Mohammed.
+
 - Issue #20609: Restored the ability to build 64-bit Windows binaries on
   32-bit Windows, which was broken by the change in issue #19788.
 
index 299527db7d402f9875347b8c129cfd110f6a2148..ccf75f37364498b66f1e13cf2c315a33254c4fe1 100644 (file)
@@ -207,7 +207,11 @@ typedef int pid_t;
 #define Py_IS_INFINITY(X) (!_finite(X) && !_isnan(X))
 #define Py_IS_FINITE(X) _finite(X)
 #define copysign _copysign
+
+/* VS 2010 and above already defines hypot as _hypot */
+#if _MSC_VER < 1600
 #define hypot _hypot
+#endif
 
 /* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/
 #if _MSC_VER >= 1400 && _MSC_VER < 1600