blob: dd6ee58841d8629ec6230d0271f0b96d14ea3644 [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
Jack Jansenf9480ce1995-06-27 13:12:09 +00008#ifdef SYMANTEC__CFM68K__
Guido van Rossum0acd4b61995-02-18 14:50:12 +00009#pragma lib_export off
10#endif
11
Guido van Rossum50cc04e1998-04-28 16:02:29 +000012#ifndef HAVE_HYPOT
13extern double hypot Py_PROTO((double, double));
Guido van Rossum446fd041998-11-02 16:21:39 +000014#ifdef MWERKS_BEFORE_PRO4
Guido van Rossum50cc04e1998-04-28 16:02:29 +000015#define hypot we_dont_want_faulty_hypot_decl
16#endif
17#endif
18
Guido van Rossum0acd4b61995-02-18 14:50:12 +000019#include <math.h>
20
Guido van Rossum50cc04e1998-04-28 16:02:29 +000021#ifndef HAVE_HYPOT
22#ifdef __MWERKS__
23#undef hypot
24#endif
25#endif
26
Jack Jansenf9480ce1995-06-27 13:12:09 +000027#ifdef SYMANTEC__CFM68K__
Guido van Rossum0acd4b61995-02-18 14:50:12 +000028#pragma lib_export on
29#endif
Guido van Rossum9de624d1996-07-30 16:55:08 +000030
Guido van Rossumc23ef0a1997-05-20 15:58:15 +000031#if defined(USE_MSL) && defined(__MC68K__)
32/* CodeWarrior MSL 2.1.1 has weird define overrides that don't work
33** when you take the address of math functions. If I interpret the
34** ANSI C standard correctly this is illegal, but I haven't been able
35** to convince the MetroWerks folks of this...
36*/
37#undef acos
38#undef asin
39#undef atan
40#undef atan2
41#undef ceil
42#undef cos
43#undef cosh
44#undef exp
45#undef fabs
46#undef floor
47#undef fmod
48#undef log
49#undef log10
50#undef pow
51#undef sin
52#undef sinh
53#undef sqrt
54#undef tan
55#undef tanh
56#define acos acosd
57#define asin asind
58#define atan atand
59#define atan2 atan2d
60#define ceil ceild
61#define cos cosd
62#define cosh coshd
63#define exp expd
64#define fabs fabsd
65#define floor floord
66#define fmod fmodd
67#define log logd
68#define log10 log10d
69#define pow powd
70#define sin sind
71#define sinh sinhd
72#define sqrt sqrtd
73#define tan tand
74#define tanh tanhd
75#endif