summaryrefslogtreecommitdiffstats
path: root/Include/mymath.h
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-05-20 15:58:15 (GMT)
committerGuido van Rossum <guido@python.org>1997-05-20 15:58:15 (GMT)
commitc23ef0a6e82523cb43939572fafb70d36910caa5 (patch)
tree6b530afefb1e4afb254f12b24ace9e76654f1678 /Include/mymath.h
parentdf0d00e29b45453f2929a5fe02aef4a5bf1998b1 (diff)
downloadcpython-c23ef0a6e82523cb43939572fafb70d36910caa5.zip
cpython-c23ef0a6e82523cb43939572fafb70d36910caa5.tar.gz
cpython-c23ef0a6e82523cb43939572fafb70d36910caa5.tar.bz2
Workaround for bug in Metrowerks MSL headers on 68K Macs (Jack)
Diffstat (limited to 'Include/mymath.h')
-rw-r--r--Include/mymath.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/Include/mymath.h b/Include/mymath.h
index c4dd689..9257a89 100644
--- a/Include/mymath.h
+++ b/Include/mymath.h
@@ -18,3 +18,50 @@
#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