Commits

Mark Dickinson  committed 297df77

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.

  • Participants
  • Parent commits 18024d2
  • Branches legacy-trunk

Comments (0)

Files changed (3)

File Include/pyport.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" */
 
 /********************************************

File Objects/complexobject.c

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

File Objects/floatobject.c

 #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);