mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
bpo-45440: Require math.h isinf() to build (GH-28894)
Building Python now requires a C99 <math.h> header file providing isinf(), isnan() and isfinite() functions. Remove the Py_FORCE_DOUBLE() macro. It was used by the Py_IS_INFINITY() macro. Changes: * Remove Py_IS_NAN(), Py_IS_INFINITY() and Py_IS_FINITE() in PC/pyconfig.h. * Remove the _Py_force_double() function. * configure no longer checks if math.h defines isinf(), isnan() and isfinite().
This commit is contained in:
parent
aac29af678
commit
194a9526d8
10 changed files with 25 additions and 143 deletions
|
|
@ -189,11 +189,6 @@ typedef _W64 int Py_ssize_t;
|
|||
|
||||
typedef int pid_t;
|
||||
|
||||
#include <float.h>
|
||||
#define Py_IS_NAN _isnan
|
||||
#define Py_IS_INFINITY(X) (!_finite(X) && !_isnan(X))
|
||||
#define Py_IS_FINITE(X) _finite(X)
|
||||
|
||||
/* define some ANSI types that are not defined in earlier Win headers */
|
||||
#if _MSC_VER >= 1200
|
||||
/* This file only exists in VC 6.0 or higher */
|
||||
|
|
@ -358,15 +353,9 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
|
|||
|
||||
/* Define to 1 if you have the `round' function. */
|
||||
#if _MSC_VER >= 1800
|
||||
#define HAVE_ROUND 1
|
||||
# define HAVE_ROUND 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `isinf' macro. */
|
||||
#define HAVE_DECL_ISINF 1
|
||||
|
||||
/* Define to 1 if you have the `isnan' function. */
|
||||
#define HAVE_DECL_ISNAN 1
|
||||
|
||||
/* Define if on AIX 3.
|
||||
System headers sometimes define this.
|
||||
We just want to avoid a redefinition error message. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue