]> granicus.if.org Git - python/commitdiff
Include ieeefp.h (when available) in pyport.h instead of individually in
authorMark Dickinson <dickinsm@gmail.com>
Sat, 28 Nov 2009 12:30:36 +0000 (12:30 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Sat, 28 Nov 2009 12:30:36 +0000 (12:30 +0000)
Objects/floatobject.c and Objects/complexobject.c.  This should silence
compiler warnings about implicit declaration of the 'finite' function
on Solaris.

Include/pyport.h
Objects/complexobject.c
Objects/floatobject.c

index c0042b52715a42fdc562770004b2ac9a3956786f..7c537a961964e71f5d8e8bc47146476e791bdb1f 100644 (file)
@@ -305,6 +305,10 @@ typedef Py_intptr_t        Py_ssize_t;
 
 #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" */
 
 /********************************************
index f277b6625c13a0a0a1d375f4c26743a84992fe74..298e262f86e1955a475b33ca9da91e7e28b160b3 100644 (file)
@@ -8,10 +8,6 @@
 #include "Python.h"
 #include "structmember.h"
 
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-
 #ifndef WITHOUT_COMPLEX
 
 /* Precisions used by repr() and str(), respectively.
index 461029a91e7893b483f6253bcbdc7a6f509b6a89..01e5825c492a99789247fe45b227a8417cdc3406 100644 (file)
 #define MAX(x, y) ((x) < (y) ? (y) : (x))
 #define MIN(x, y) ((x) < (y) ? (x) : (y))
 
-#ifdef HAVE_IEEEFP_H
-#include <ieeefp.h>
-#endif
-
 #ifdef _OSF_SOURCE
 /* OSF1 5.1 doesn't make this available with XOPEN_SOURCE_EXTENDED defined */
 extern int finite(double);