mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Use C99 'isfinite' macro in preference to BSD-derived 'finite' function.
This commit is contained in:
parent
0ebfedf38e
commit
1bf6401ab2
1 changed files with 3 additions and 1 deletions
|
|
@ -118,7 +118,9 @@ extern double copysign(double, double);
|
|||
* Note: PC/pyconfig.h defines Py_IS_FINITE as _finite
|
||||
*/
|
||||
#ifndef Py_IS_FINITE
|
||||
#ifdef HAVE_FINITE
|
||||
#if defined HAVE_DECL_ISFINITE && HAVE_DECL_ISFINITE == 1
|
||||
#define Py_IS_FINITE(X) isfinite(X)
|
||||
#elif defined HAVE_FINITE
|
||||
#define Py_IS_FINITE(X) finite(X)
|
||||
#else
|
||||
#define Py_IS_FINITE(X) (!Py_IS_INFINITY(X) && !Py_IS_NAN(X))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue