mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
isinf and isnan are macros, not functions; fix configure script
to use AC_CHECK_DECLS instead of AC_CHECK_FUNCS for these. (See discussion in issue #4506)
This commit is contained in:
parent
04b272336d
commit
d181e3a246
5 changed files with 224 additions and 16 deletions
|
@ -87,7 +87,7 @@ extern double copysign(double, double);
|
|||
* Note: PC/pyconfig.h defines Py_IS_NAN as _isnan
|
||||
*/
|
||||
#ifndef Py_IS_NAN
|
||||
#ifdef HAVE_ISNAN
|
||||
#ifdef HAVE_DECL_ISNAN
|
||||
#define Py_IS_NAN(X) isnan(X)
|
||||
#else
|
||||
#define Py_IS_NAN(X) ((X) != (X))
|
||||
|
@ -104,7 +104,7 @@ extern double copysign(double, double);
|
|||
* Note: PC/pyconfig.h defines Py_IS_INFINITY as _isinf
|
||||
*/
|
||||
#ifndef Py_IS_INFINITY
|
||||
#ifdef HAVE_ISINF
|
||||
#ifdef HAVE_DECL_ISINF
|
||||
#define Py_IS_INFINITY(X) isinf(X)
|
||||
#else
|
||||
#define Py_IS_INFINITY(X) ((X) && (X)*0.5 == (X))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue