summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-08-08 19:10:21 (GMT)
committerGuido van Rossum <guido@python.org>1996-08-08 19:10:21 (GMT)
commit6412b1de5dd28c2aa85ba1bccb187049abc170ea (patch)
tree5a148bfc797e64e6e59d1611c4fd619e3f24f3e0
parent97867b2ce2e1307d54a6e38941dc2b3207ff0500 (diff)
downloadcpython-6412b1de5dd28c2aa85ba1bccb187049abc170ea.zip
cpython-6412b1de5dd28c2aa85ba1bccb187049abc170ea.tar.gz
cpython-6412b1de5dd28c2aa85ba1bccb187049abc170ea.tar.bz2
Hack for Mac (where fabs is not usable as a function pointer).
-rw-r--r--Modules/mathmodule.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c
index 242bd6f..e69aea9 100644
--- a/Modules/mathmodule.c
+++ b/Modules/mathmodule.c
@@ -145,7 +145,12 @@ FUNC1(math_ceil, ceil)
FUNC1(math_cos, cos)
FUNC1(math_cosh, cosh)
FUNC1(math_exp, exp)
+#ifdef __MWERKS__
+double myfabs(double x) { return fabs(x); }
+FUNC1(math_fabs, myfabs)
+#else
FUNC1(math_fabs, fabs)
+#endif
FUNC1(math_floor, floor)
FUNC2(math_fmod, fmod)
FUNC2(math_hypot, hypot)