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