Peter Schneider-Kamp | 25f6894 | 2000-07-31 22:19:30 +0000 | [diff] [blame] | 1 | /*********************************************************** |
| 2 | Copyright (c) 2000, BeOpen.com. |
| 3 | Copyright (c) 1995-2000, Corporation for National Research Initiatives. |
| 4 | Copyright (c) 1990-1995, Stichting Mathematisch Centrum. |
| 5 | All rights reserved. |
| 6 | |
| 7 | See the file "Misc/COPYRIGHT" for information on usage and |
| 8 | redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
| 9 | ******************************************************************/ |
| 10 | |
Peter Schneider-Kamp | 7e01890 | 2000-07-31 15:28:04 +0000 | [diff] [blame] | 11 | /*************************************** |
| 12 | THIS FILE IS OBSOLETE |
| 13 | USE "pyport.h" INSTEAD |
| 14 | ***************************************/ |
| 15 | |
Guido van Rossum | 0acd4b6 | 1995-02-18 14:50:12 +0000 | [diff] [blame] | 16 | /* 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 Rossum | 50cc04e | 1998-04-28 16:02:29 +0000 | [diff] [blame] | 23 | #ifndef HAVE_HYPOT |
Tim Peters | dbd9ba6 | 2000-07-09 03:09:57 +0000 | [diff] [blame] | 24 | extern double hypot(double, double); |
Guido van Rossum | 446fd04 | 1998-11-02 16:21:39 +0000 | [diff] [blame] | 25 | #ifdef MWERKS_BEFORE_PRO4 |
Guido van Rossum | 50cc04e | 1998-04-28 16:02:29 +0000 | [diff] [blame] | 26 | #define hypot we_dont_want_faulty_hypot_decl |
| 27 | #endif |
| 28 | #endif |
| 29 | |
Guido van Rossum | 0acd4b6 | 1995-02-18 14:50:12 +0000 | [diff] [blame] | 30 | #include <math.h> |
| 31 | |
Guido van Rossum | 50cc04e | 1998-04-28 16:02:29 +0000 | [diff] [blame] | 32 | #ifndef HAVE_HYPOT |
| 33 | #ifdef __MWERKS__ |
| 34 | #undef hypot |
| 35 | #endif |
| 36 | #endif |
| 37 | |
Guido van Rossum | c23ef0a | 1997-05-20 15:58:15 +0000 | [diff] [blame] | 38 | #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 |