[Python-checkins] cpython (merge 3.3 -> default): Issue #20221: Removed conflicting (or circular) hypot definition

zach.ware python-checkins at python.org
Thu Feb 20 22:40:22 CET 2014


http://hg.python.org/cpython/rev/bf413a97f1a9
changeset:   89310:bf413a97f1a9
parent:      89308:cd23d0c3f850
parent:      89309:9aedb876c2d7
user:        Zachary Ware <zachary.ware at gmail.com>
date:        Thu Feb 20 15:39:29 2014 -0600
summary:
  Issue #20221: Removed conflicting (or circular) hypot definition
when compiled with VS 2010 or above.  Initial patch by Tabrez Mohammed.

files:
  Misc/NEWS     |  3 +++
  PC/pyconfig.h |  4 ++++
  2 files changed, 7 insertions(+), 0 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -103,6 +103,9 @@
 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.
 
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -207,7 +207,11 @@
 #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

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list