From 383360d5e015dd839d2b8f1da05dc58d4f3f3d25 Mon Sep 17 00:00:00 2001 From: "mark.dickinson" Date: Sat, 28 Nov 2009 12:30:36 +0000 Subject: [PATCH] Include ieeefp.h (when available) in pyport.h instead of individually in Objects/floatobject.c and Objects/complexobject.c. This should silence compiler warnings about implicit declaration of the 'finite' function on Solaris. git-svn-id: http://svn.python.org/projects/python/trunk@76561 6015fed2-1504-0410-9fe1-9d1591cc4771 --- Include/pyport.h | 4 ++++ Objects/complexobject.c | 4 ---- Objects/floatobject.c | 4 ---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Include/pyport.h b/Include/pyport.h index c0042b5271..7c537a9619 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 f277b6625c..298e262f86 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 461029a91e..01e5825c49 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); -- 2.11.4.GIT