blob: 9257a89df10974fb3d984c3cadb612b5952ae9d8 [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
12#include <math.h>
13
Jack Jansenf9480ce1995-06-27 13:12:09 +000014#ifdef SYMANTEC__CFM68K__
Guido van Rossum0acd4b61995-02-18 14:50:12 +000015#pragma lib_export on
16#endif
Guido van Rossum9de624d1996-07-30 16:55:08 +000017
Guido van Rossumace527c1996-08-29 18:12:36 +000018#ifndef HAVE_HYPOT
19extern double hypot Py_PROTO((double, double));
Guido van Rossum9de624d1996-07-30 16:55:08 +000020#endif
Guido van Rossumc23ef0a1997-05-20 15:58:15 +000021
22
23#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
43#undef sin
44#undef sinh
45#undef sqrt
46#undef tan
47#undef tanh
48#define acos acosd
49#define asin asind
50#define atan atand
51#define atan2 atan2d
52#define ceil ceild
53#define cos cosd
54#define cosh coshd
55#define exp expd
56#define fabs fabsd
57#define floor floord
58#define fmod fmodd
59#define log logd
60#define log10 log10d
61#define pow powd
62#define sin sind
63#define sinh sinhd
64#define sqrt sqrtd
65#define tan tand
66#define tanh tanhd
67#endif