]> granicus.if.org Git - python/commitdiff
Issue #20221: Removed conflicting (or circular) hypot definition
authorZachary Ware <zachary.ware@gmail.com>
Thu, 20 Feb 2014 21:36:34 +0000 (15:36 -0600)
committerZachary Ware <zachary.ware@gmail.com>
Thu, 20 Feb 2014 21:36:34 +0000 (15:36 -0600)
when compiled with VS 2010 or above.  Initial patch by Tabrez Mohammed.

Misc/NEWS
PC/pyconfig.h

index eb9bc58d9f14bbb36d32b8066e8e07cdef563554..006f3bfce299e7ff4019f8ed01b579b58ce6fbe8 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -141,6 +141,9 @@ Documentation
 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 f320ccf588cc8f2d4cfbb8e204eaf3756955c080..0b96539fdd795237ea53416df2bad76f7f3b9c58 100644 (file)
@@ -213,7 +213,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