| 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 |  | 
| Guido van Rossum | 50cc04e | 1998-04-28 16:02:29 +0000 | [diff] [blame] | 12 | #ifndef HAVE_HYPOT | 
 | 13 | extern double hypot Py_PROTO((double, double)); | 
| Guido van Rossum | 446fd04 | 1998-11-02 16:21:39 +0000 | [diff] [blame] | 14 | #ifdef MWERKS_BEFORE_PRO4 | 
| Guido van Rossum | 50cc04e | 1998-04-28 16:02:29 +0000 | [diff] [blame] | 15 | #define hypot we_dont_want_faulty_hypot_decl | 
 | 16 | #endif | 
 | 17 | #endif | 
 | 18 |  | 
| Guido van Rossum | 0acd4b6 | 1995-02-18 14:50:12 +0000 | [diff] [blame] | 19 | #include <math.h> | 
 | 20 |  | 
| Guido van Rossum | 50cc04e | 1998-04-28 16:02:29 +0000 | [diff] [blame] | 21 | #ifndef HAVE_HYPOT | 
 | 22 | #ifdef __MWERKS__ | 
 | 23 | #undef hypot | 
 | 24 | #endif | 
 | 25 | #endif | 
 | 26 |  | 
| Jack Jansen | f9480ce | 1995-06-27 13:12:09 +0000 | [diff] [blame] | 27 | #ifdef SYMANTEC__CFM68K__ | 
| Guido van Rossum | 0acd4b6 | 1995-02-18 14:50:12 +0000 | [diff] [blame] | 28 | #pragma lib_export on | 
 | 29 | #endif | 
| Guido van Rossum | 9de624d | 1996-07-30 16:55:08 +0000 | [diff] [blame] | 30 |  | 
| Guido van Rossum | c23ef0a | 1997-05-20 15:58:15 +0000 | [diff] [blame] | 31 | #if defined(USE_MSL) && defined(__MC68K__) | 
 | 32 | /* CodeWarrior MSL 2.1.1 has weird define overrides that don't work | 
 | 33 | ** when you take the address of math functions. If I interpret the | 
 | 34 | ** ANSI C standard correctly this is illegal, but I haven't been able | 
 | 35 | ** to convince the MetroWerks folks of this... | 
 | 36 | */ | 
 | 37 | #undef acos | 
 | 38 | #undef asin | 
 | 39 | #undef atan | 
 | 40 | #undef atan2 | 
 | 41 | #undef ceil | 
 | 42 | #undef cos | 
 | 43 | #undef cosh | 
 | 44 | #undef exp | 
 | 45 | #undef fabs | 
 | 46 | #undef floor | 
 | 47 | #undef fmod | 
 | 48 | #undef log | 
 | 49 | #undef log10 | 
 | 50 | #undef pow | 
 | 51 | #undef sin | 
 | 52 | #undef sinh | 
 | 53 | #undef sqrt | 
 | 54 | #undef tan | 
 | 55 | #undef tanh | 
 | 56 | #define acos acosd | 
 | 57 | #define asin asind | 
 | 58 | #define atan atand | 
 | 59 | #define atan2 atan2d | 
 | 60 | #define ceil ceild | 
 | 61 | #define cos cosd | 
 | 62 | #define cosh coshd | 
 | 63 | #define exp expd | 
 | 64 | #define fabs fabsd | 
 | 65 | #define floor floord | 
 | 66 | #define fmod fmodd | 
 | 67 | #define log logd | 
 | 68 | #define log10 log10d | 
 | 69 | #define pow powd | 
 | 70 | #define sin sind | 
 | 71 | #define sinh sinhd | 
 | 72 | #define sqrt sqrtd | 
 | 73 | #define tan tand | 
 | 74 | #define tanh tanhd | 
 | 75 | #endif  |