blob: cba65e820292f9a5c1f605ed924253c88e9d4583 [file] [log] [blame]
Guido van Rossum0acd4b61995-02-18 14:50:12 +00001/* On the 68K Mac, when using CFM (Code Fragment Manager),
2 <math.h> requires special treatment -- we need to surround it with
3 #pragma lib_export off / on...
4 This is because MathLib.o is a static library, and exporting its
5 symbols doesn't quite work...
6 XXX Not sure now... Seems to be something else going on as well... */
7
Guido van Rossum50cc04e1998-04-28 16:02:29 +00008#ifndef HAVE_HYPOT
Tim Petersdbd9ba62000-07-09 03:09:57 +00009extern double hypot(double, double);
Guido van Rossum446fd041998-11-02 16:21:39 +000010#ifdef MWERKS_BEFORE_PRO4
Guido van Rossum50cc04e1998-04-28 16:02:29 +000011#define hypot we_dont_want_faulty_hypot_decl
12#endif
13#endif
14
Guido van Rossum0acd4b61995-02-18 14:50:12 +000015#include <math.h>
16
Guido van Rossum50cc04e1998-04-28 16:02:29 +000017#ifndef HAVE_HYPOT
18#ifdef __MWERKS__
19#undef hypot
20#endif
21#endif
22
Guido van Rossumc23ef0a1997-05-20 15:58:15 +000023#if defined(USE_MSL) && defined(__MC68K__)
24/* CodeWarrior MSL 2.1.1 has weird define overrides that don't work
25** when you take the address of math functions. If I interpret the
26** ANSI C standard correctly this is illegal, but I haven't been able
27** to convince the MetroWerks folks of this...
28*/
29#undef acos
30#undef asin
31#undef atan
32#undef atan2
33#undef ceil
34#undef cos
35#undef cosh
36#undef exp
37#undef fabs
38#undef floor
39#undef fmod
40#undef log
41#undef log10
42#undef pow
Guido van Rossum71260b82000-05-11 18:19:42 +000043#undef rint
Guido van Rossumc23ef0a1997-05-20 15:58:15 +000044#undef sin
45#undef sinh
46#undef sqrt
47#undef tan
48#undef tanh
49#define acos acosd
50#define asin asind
51#define atan atand
52#define atan2 atan2d
53#define ceil ceild
54#define cos cosd
55#define cosh coshd
56#define exp expd
57#define fabs fabsd
58#define floor floord
59#define fmod fmodd
60#define log logd
61#define log10 log10d
62#define pow powd
Guido van Rossum71260b82000-05-11 18:19:42 +000063#define rint rintd
Guido van Rossumc23ef0a1997-05-20 15:58:15 +000064#define sin sind
65#define sinh sinhd
66#define sqrt sqrtd
67#define tan tand
68#define tanh tanhd
69#endif