summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2014-02-20 21:36:34 (GMT)
committerZachary Ware <zachary.ware@gmail.com>2014-02-20 21:36:34 (GMT)
commit80315664bc6a9a947ac3cc000eb8c9ae17fb3626 (patch)
tree7792bd55ef8a9eb365f219b65fe21d4411f250cf
parent47ff6fa6008a565f980079aab44b24da9982b9c2 (diff)
downloadcpython-80315664bc6a9a947ac3cc000eb8c9ae17fb3626.zip
cpython-80315664bc6a9a947ac3cc000eb8c9ae17fb3626.tar.gz
cpython-80315664bc6a9a947ac3cc000eb8c9ae17fb3626.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 bfaffae..02f898b 100644
--- 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.
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index a45d5eb..a49ce69 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -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 */