]> granicus.if.org Git - python/commitdiff
Add prototypes to get the mathmodule.c to compile on OSF1 5.1 (Tru64)
authorNeal Norwitz <nnorwitz@gmail.com>
Fri, 25 Jan 2008 08:04:16 +0000 (08:04 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Fri, 25 Jan 2008 08:04:16 +0000 (08:04 +0000)
and eliminate a compiler warning in floatobject.c.  There might be
a better way to go about this, but it should be good enough for now.

Modules/mathmodule.c
Objects/floatobject.c

index 5e52e785416792353730ca69e8f358a6a6e40a2c..04408715ce38cd409cacd7c7a6d9f0bd4f4cf4f5 100644 (file)
@@ -12,6 +12,11 @@ extern double modf (double, double *);
 #endif /* __STDC__ */
 #endif /* _MSC_VER */
 
+#ifdef _OSF_SOURCE
+/* OSF1 5.1 doesn't make this available with XOPEN_SOURCE_EXTENDED defined */
+extern double copysign(double, double);
+#endif
+
 /* Call is_error when errno != 0, and where x is the result libm
  * returned.  is_error will usually set up an exception and return
  * true (1), but may return false (0) without setting up an exception.
index 340b0e7a2d98131ac75c85ae4728e56964208cfa..fc4dd218361f898ff52b09e10887cf36db7a7029 100644 (file)
@@ -16,6 +16,11 @@ extern double fmod(double, double);
 extern double pow(double, double);
 #endif
 
+#ifdef _OSF_SOURCE
+/* OSF1 5.1 doesn't make this available with XOPEN_SOURCE_EXTENDED defined */
+extern int finite(double);
+#endif
+
 /* Special free list -- see comments for same code in intobject.c. */
 #define BLOCK_SIZE     1000    /* 1K less typical malloc overhead */
 #define BHEAD_SIZE     8       /* Enough for a 64-bit pointer */