blob: cead61a3a04eaefc80ea0f1ed8566923c416762c [file] [log] [blame]
Peter Schneider-Kamp25f68942000-07-31 22:19:30 +00001/***********************************************************
2Copyright (c) 2000, BeOpen.com.
3Copyright (c) 1995-2000, Corporation for National Research Initiatives.
4Copyright (c) 1990-1995, Stichting Mathematisch Centrum.
5All rights reserved.
6
7See the file "Misc/COPYRIGHT" for information on usage and
8redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
9******************************************************************/
10
Peter Schneider-Kamp7e018902000-07-31 15:28:04 +000011/***************************************
12THIS FILE IS OBSOLETE
13USE "pyport.h" INSTEAD
14***************************************/
15
Guido van Rossum0acd4b61995-02-18 14:50:12 +000016/* On the 68K Mac, when using CFM (Code Fragment Manager),
17 <math.h> requires special treatment -- we need to surround it with
18 #pragma lib_export off / on...
19 This is because MathLib.o is a static library, and exporting its
20 symbols doesn't quite work...
21 XXX Not sure now... Seems to be something else going on as well... */
22
Guido van Rossum50cc04e1998-04-28 16:02:29 +000023#ifndef HAVE_HYPOT
Tim Petersdbd9ba62000-07-09 03:09:57 +000024extern double hypot(double, double);
Guido van Rossum446fd041998-11-02 16:21:39 +000025#ifdef MWERKS_BEFORE_PRO4
Guido van Rossum50cc04e1998-04-28 16:02:29 +000026#define hypot we_dont_want_faulty_hypot_decl
27#endif
28#endif
29
Guido van Rossum0acd4b61995-02-18 14:50:12 +000030#include <math.h>
31
Guido van Rossum50cc04e1998-04-28 16:02:29 +000032#ifndef HAVE_HYPOT
33#ifdef __MWERKS__
34#undef hypot
35#endif
36#endif
37
Guido van Rossumc23ef0a1997-05-20 15:58:15 +000038#if defined(USE_MSL) && defined(__MC68K__)
39/* CodeWarrior MSL 2.1.1 has weird define overrides that don't work
40** when you take the address of math functions. If I interpret the
41** ANSI C standard correctly this is illegal, but I haven't been able
42** to convince the MetroWerks folks of this...
43*/
44#undef acos
45#undef asin
46#undef atan
47#undef atan2
48#undef ceil
49#undef cos
50#undef cosh
51#undef exp
52#undef fabs
53#undef floor
54#undef fmod
55#undef log
56#undef log10
57#undef pow
58#undef sin
59#undef sinh
60#undef sqrt
61#undef tan
62#undef tanh
63#define acos acosd
64#define asin asind
65#define atan atand
66#define atan2 atan2d
67#define ceil ceild
68#define cos cosd
69#define cosh coshd
70#define exp expd
71#define fabs fabsd
72#define floor floord
73#define fmod fmodd
74#define log logd
75#define log10 log10d
76#define pow powd
77#define sin sind
78#define sinh sinhd
79#define sqrt sqrtd
80#define tan tand
81#define tanh tanhd
82#endif