Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d65951

Browse files
committed
Issue #20221: Removed conflicting (or circular) hypot definition
when compiled with VS 2010 or above. Initial patch by Tabrez Mohammed.
1 parent a96fd48 commit 2d65951

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ Documentation
141141
Build
142142
-----
143143

144+
- Issue #20221: Removed conflicting (or circular) hypot definition when
145+
compiled with VS 2010 or above. Initial patch by Tabrez Mohammed.
146+
144147
- Issue #20609: Restored the ability to build 64-bit Windows binaries on
145148
32-bit Windows, which was broken by the change in issue #19788.
146149

PC/pyconfig.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,11 @@ typedef int pid_t;
213213
#define Py_IS_INFINITY(X) (!_finite(X) && !_isnan(X))
214214
#define Py_IS_FINITE(X) _finite(X)
215215
#define copysign _copysign
216+
217+
/* VS 2010 and above already defines hypot as _hypot */
218+
#if _MSC_VER < 1600
216219
#define hypot _hypot
220+
#endif
217221

218222
/* Side by Side assemblies supported in VS 2005 and VS 2008 but not 2010*/
219223
#if _MSC_VER >= 1400 && _MSC_VER < 1600

0 commit comments

Comments
 (0)