]> granicus.if.org Git - python/commitdiff
Workaround for bug in Metrowerks MSL headers on 68K Macs (Jack)
authorGuido van Rossum <guido@python.org>
Tue, 20 May 1997 15:58:15 +0000 (15:58 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 20 May 1997 15:58:15 +0000 (15:58 +0000)
Include/mymath.h

index c4dd68991124cfe0456200930ad06bee094265c7..9257a89df10974fb3d984c3cadb612b5952ae9d8 100644 (file)
 #ifndef HAVE_HYPOT
 extern double hypot Py_PROTO((double, double));
 #endif
+
+
+#if defined(USE_MSL) && defined(__MC68K__)
+/* CodeWarrior MSL 2.1.1 has weird define overrides that don't work
+** when you take the address of math functions. If I interpret the
+** ANSI C standard correctly this is illegal, but I haven't been able
+** to convince the MetroWerks folks of this...
+*/
+#undef acos
+#undef asin
+#undef atan
+#undef atan2
+#undef ceil
+#undef cos
+#undef cosh
+#undef exp
+#undef fabs
+#undef floor
+#undef fmod
+#undef log
+#undef log10
+#undef pow
+#undef sin
+#undef sinh
+#undef sqrt
+#undef tan
+#undef tanh
+#define acos acosd
+#define asin asind
+#define atan atand
+#define atan2 atan2d
+#define ceil ceild
+#define cos cosd
+#define cosh coshd
+#define exp expd
+#define fabs fabsd
+#define floor floord
+#define fmod fmodd
+#define log logd
+#define log10 log10d
+#define pow powd
+#define sin sind
+#define sinh sinhd
+#define sqrt sqrtd
+#define tan tand
+#define tanh tanhd
+#endif