summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-10-31 17:00:30 +0000
committerGuido van Rossum <guido@python.org>1997-10-31 17:00:30 +0000
commit3c03fa87b64576841d0e9a6a3b4ada5063a228b8 (patch)
tree37852c71bd9944c12d23f3d7ceae4260dc979f8f
parent86aeb900e5e9dea96cddc697b6145e1fe1435ca1 (diff)
downloadcpython-git-3c03fa87b64576841d0e9a6a3b4ada5063a228b8.tar.gz
Hack suggested by Matthias Klose to pull in all relevant entry points
in libmath.a so they are available to mathmodule.so (in case it is shared). While this still gets triggered on Solaris 2.x, this appears to be harmless there.
-rw-r--r--Objects/floatobject.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Objects/floatobject.c b/Objects/floatobject.c
index 6f5b625c4c..070e83def9 100644
--- a/Objects/floatobject.c
+++ b/Objects/floatobject.c
@@ -83,6 +83,16 @@ extern double fmod Py_PROTO((double, double));
extern double pow Py_PROTO((double, double));
#endif
+#ifdef sun
+/* On SunOS4.1 only libm.a exists. Make sure that references to all
+ needed math functions exist in the executable, so that dynamic
+ loading of mathmodule does not fail. */
+double (*_Py_math_funcs_hack[])() = {
+ acos, asin, atan, atan2, ceil, cos, cosh, exp, fabs, floor,
+ fmod, log, log10, pow, sin, sinh, sqrt, tan, tanh
+};
+#endif
+
/* Special free list -- see comments for same code in intobject.c. */
static PyFloatObject *free_list = NULL;
#define BLOCK_SIZE 1000 /* 1K less typical malloc overhead */