summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2014-02-20 21:39:29 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2014-02-20 21:39:29 (GMT)
commit52855719f58ee294790e6c3c7b834939d7ece6ac (patch)
tree2155ffc7afc0dbaf3ddff6bf448838d1ba40d0af
parentf9200ae398de358f88911bcd01e47644344934b2 (diff)
parent2d659518aa4d21ee72896a4b8a55bfacc2bd7adc (diff)
downloadcpython-52855719f58ee294790e6c3c7b834939d7ece6ac.zip
cpython-52855719f58ee294790e6c3c7b834939d7ece6ac.tar.gz
cpython-52855719f58ee294790e6c3c7b834939d7ece6ac.tar.bz2
Issue #20221: Removed conflicting (or circular) hypot definition
when compiled with VS 2010 or above. Initial patch by Tabrez Mohammed.
-rw-r--r--Misc/NEWS3
-rw-r--r--PC/pyconfig.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index 94a2f87..edb5f71 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -103,6 +103,9 @@ Tests
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
index 299527d..ccf75f3 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -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