[Python-checkins] r76561 - in python/trunk: Include/pyport.h Objects/complexobject.c Objects/floatobject.c

mark.dickinson python-checkins at python.org
Sat Nov 28 13:30:36 CET 2009


Author: mark.dickinson
Date: Sat Nov 28 13:30:36 2009
New Revision: 76561

Log:
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.


Modified:
   python/trunk/Include/pyport.h
   python/trunk/Objects/complexobject.c
   python/trunk/Objects/floatobject.c

Modified: python/trunk/Include/pyport.h
==============================================================================
--- python/trunk/Include/pyport.h	(original)
+++ python/trunk/Include/pyport.h	Sat Nov 28 13:30:36 2009
@@ -305,6 +305,10 @@
 
 #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" */
 
 /********************************************

Modified: python/trunk/Objects/complexobject.c
==============================================================================
--- python/trunk/Objects/complexobject.c	(original)
+++ python/trunk/Objects/complexobject.c	Sat Nov 28 13:30:36 2009
@@ -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.

Modified: python/trunk/Objects/floatobject.c
==============================================================================
--- python/trunk/Objects/floatobject.c	(original)
+++ python/trunk/Objects/floatobject.c	Sat Nov 28 13:30:36 2009
@@ -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 <ieeefp.h>
-#endif
-
 #ifdef _OSF_SOURCE
 /* OSF1 5.1 doesn't make this available with XOPEN_SOURCE_EXTENDED defined */
 extern int finite(double);


More information about the Python-checkins mailing list