summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Modules/mathmodule.c5
-rw-r--r--Objects/floatobject.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 5e52e78541..04408715ce 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -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.
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 340b0e7a2d..fc4dd21836 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -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 */