diff --git a/Include/pyport.h b/Include/pyport.h index c0042b52715..7c537a96196 100644 --- a/Include/pyport.h +++ b/Include/pyport.h @@ -305,6 +305,10 @@ typedef Py_intptr_t Py_ssize_t; #include +#ifdef HAVE_IEEEFP_H +#include /* needed for 'finite' declaration on some platforms */ +#endif + #include /* Moved here from the math section, before extern "C" */ /******************************************** diff --git a/Objects/complexobject.c b/Objects/complexobject.c index f277b6625c1..298e262f86e 100644 --- a/Objects/complexobject.c +++ b/Objects/complexobject.c @@ -8,10 +8,6 @@ #include "Python.h" #include "structmember.h" -#ifdef HAVE_IEEEFP_H -#include -#endif - #ifndef WITHOUT_COMPLEX /* Precisions used by repr() and str(), respectively. diff --git a/Objects/floatobject.c b/Objects/floatobject.c index 461029a91e7..01e5825c492 100644 --- a/Objects/floatobject.c +++ b/Objects/floatobject.c @@ -15,10 +15,6 @@ #define MAX(x, y) ((x) < (y) ? (y) : (x)) #define MIN(x, y) ((x) < (y) ? (x) : (y)) -#ifdef HAVE_IEEEFP_H -#include -#endif - #ifdef _OSF_SOURCE /* OSF1 5.1 doesn't make this available with XOPEN_SOURCE_EXTENDED defined */ extern int finite(double);