Skip to content

Commit 000b809

Browse files
thewtexmethane
authored andcommitted
bpo-11566: Remove hypot -> _hypot macro for very old compilers (GH-11283)
This addresses C extension build errors related to an undefined _hypot symbol when building with the Microsoft Visual C++ Compiler for Python 2.7 [1] or MinGWPy [2]. It also addresses errors when building a C++ extension with MinGWPy and C++11 from cmath, 'error "::hypot' has not been declared' [1] https://www.microsoft.com/en-us/download/details.aspx?id=44266 [2] https://mingwpy.github.io/
1 parent d9a2aca commit 000b809

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

PC/pyconfig.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -226,11 +226,6 @@ typedef int pid_t;
226226
#define Py_IS_FINITE(X) _finite(X)
227227
#define copysign _copysign
228228

229-
/* VS 2010 and above already defines hypot as _hypot */
230-
#if _MSC_VER < 1600
231-
#define hypot _hypot
232-
#endif
233-
234229
#endif /* _MSC_VER */
235230

236231
/* define some ANSI types that are not defined in earlier Win headers */
@@ -282,7 +277,6 @@ typedef int pid_t;
282277
#endif
283278

284279
#define COMPILER "[gcc]"
285-
#define hypot _hypot
286280
#define PY_LONG_LONG long long
287281
#define PY_LLONG_MIN LLONG_MIN
288282
#define PY_LLONG_MAX LLONG_MAX

0 commit comments

Comments
 (0)