From: Zachary Ware Date: Thu, 20 Feb 2014 21:36:34 +0000 (-0600) Subject: Issue #20221: Removed conflicting (or circular) hypot definition X-Git-Tag: v3.3.5rc1~5 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2d659518aa4d21ee72896a4b8a55bfacc2bd7adc;p=thirdparty%2FPython%2Fcpython.git Issue #20221: Removed conflicting (or circular) hypot definition when compiled with VS 2010 or above. Initial patch by Tabrez Mohammed. --- diff --git a/Misc/NEWS b/Misc/NEWS index eb9bc58d9f14..006f3bfce299 100644 --- 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. diff --git a/PC/pyconfig.h b/PC/pyconfig.h index f320ccf588cc..0b96539fdd79 100644 --- a/PC/pyconfig.h +++ b/PC/pyconfig.h @@ -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