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.
This commit is contained in:
Mark Dickinson 2009-11-28 12:30:36 +00:00
parent 8d8f874c19
commit 31f0cfef0e
3 changed files with 4 additions and 8 deletions

View File

@ -305,6 +305,10 @@ typedef Py_intptr_t Py_ssize_t;
#include <stdlib.h> #include <stdlib.h>
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h> /* needed for 'finite' declaration on some platforms */
#endif
#include <math.h> /* Moved here from the math section, before extern "C" */ #include <math.h> /* Moved here from the math section, before extern "C" */
/******************************************** /********************************************

View File

@ -8,10 +8,6 @@
#include "Python.h" #include "Python.h"
#include "structmember.h" #include "structmember.h"
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
#ifndef WITHOUT_COMPLEX #ifndef WITHOUT_COMPLEX
/* Precisions used by repr() and str(), respectively. /* Precisions used by repr() and str(), respectively.

View File

@ -15,10 +15,6 @@
#define MAX(x, y) ((x) < (y) ? (y) : (x)) #define MAX(x, y) ((x) < (y) ? (y) : (x))
#define MIN(x, y) ((x) < (y) ? (x) : (y)) #define MIN(x, y) ((x) < (y) ? (x) : (y))
#ifdef HAVE_IEEEFP_H
#include <ieeefp.h>
#endif
#ifdef _OSF_SOURCE #ifdef _OSF_SOURCE
/* OSF1 5.1 doesn't make this available with XOPEN_SOURCE_EXTENDED defined */ /* OSF1 5.1 doesn't make this available with XOPEN_SOURCE_EXTENDED defined */
extern int finite(double); extern int finite(double);