Guido van Rossum | 0acd4b6 | 1995-02-18 14:50:12 +0000 | [diff] [blame] | 1 | /* 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 Jansen | f9480ce | 1995-06-27 13:12:09 +0000 | [diff] [blame] | 8 | #ifdef SYMANTEC__CFM68K__ |
Guido van Rossum | 0acd4b6 | 1995-02-18 14:50:12 +0000 | [diff] [blame] | 9 | #pragma lib_export off |
| 10 | #endif |
| 11 | |
| 12 | #include <math.h> |
| 13 | |
Jack Jansen | f9480ce | 1995-06-27 13:12:09 +0000 | [diff] [blame] | 14 | #ifdef SYMANTEC__CFM68K__ |
Guido van Rossum | 0acd4b6 | 1995-02-18 14:50:12 +0000 | [diff] [blame] | 15 | #pragma lib_export on |
| 16 | #endif |
Guido van Rossum | 9de624d | 1996-07-30 16:55:08 +0000 | [diff] [blame] | 17 | |
Guido van Rossum | ace527c | 1996-08-29 18:12:36 +0000 | [diff] [blame] | 18 | #ifndef HAVE_HYPOT |
| 19 | extern double hypot Py_PROTO((double, double)); |
Guido van Rossum | 9de624d | 1996-07-30 16:55:08 +0000 | [diff] [blame] | 20 | #endif |
Guido van Rossum | c23ef0a | 1997-05-20 15:58:15 +0000 | [diff] [blame] | 21 | |
| 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 |