]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Hack suggested by Matthias Klose to pull in all relevant entry points
authorGuido van Rossum <guido@python.org>
Fri, 31 Oct 1997 17:00:30 +0000 (17:00 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 31 Oct 1997 17:00:30 +0000 (17:00 +0000)
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.

Objects/floatobject.c

index 6f5b625c4cdcd81ccc329ec6c439908247d050bd..070e83def9af0ccf7fb14a0ce034763c54f80bca 100644 (file)
@@ -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 */