]> 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 bfaffae59f22fbb6520f4343bc9f76a41fd2490b..02f898ba5c01fa03f2be335610d13c5afd574874 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -263,6 +263,9 @@ Tests
 Build
 -----
 
+- Issue #20221: Removed conflicting (or circular) hypot definition when
+  compiled with VS 2010 or above.  Initial patch by Tabrez Mohammed.
+
 - Issue #16537: Check whether self.extensions is empty in setup.py. Patch by
   Jonathan Hosmer.
 
index a45d5ebf4ab0a3614428ff85d3a677c1cfd3ba18..a49ce69013981cba852bbe4cfd8dffd185cb93fa 100644 (file)
@@ -217,7 +217,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
 
 #endif /* _MSC_VER */