sl@0: /* sl@0: * tclMacMath.h -- sl@0: * sl@0: * This file is necessary because of Metrowerks CodeWarrior Pro 1 sl@0: * on the Macintosh. With 8-byte doubles turned on, the definitions of sl@0: * sin, cos, acos, etc., are screwed up. They are fine as long as sl@0: * they are used as function calls, but if the function pointers sl@0: * are passed around and used, they will crash hard on the 68K. sl@0: * sl@0: * Copyright (c) 1997 Sun Microsystems, Inc. sl@0: * sl@0: * See the file "license.terms" for information on usage and redistribution sl@0: * of this file, and for a DISCLAIMER OF ALL WARRANTIES. sl@0: * sl@0: * RCS: @(#) $Id: tclMacMath.h,v 1.3 2001/11/23 01:27:50 das Exp $ sl@0: */ sl@0: sl@0: #ifndef _TCLMACMATH sl@0: #define _TCLMACMATH sl@0: sl@0: #include sl@0: sl@0: #if defined(__MWERKS__) && !defined(__POWERPC__) sl@0: #if __option(IEEEdoubles) sl@0: sl@0: # ifdef cos sl@0: # undef cos sl@0: # define cos cosd sl@0: # endif sl@0: sl@0: # ifdef sin sl@0: # undef sin sl@0: # define sin sind sl@0: # endif sl@0: sl@0: # ifdef tan sl@0: # undef tan sl@0: # define tan tand sl@0: # endif sl@0: sl@0: # ifdef acos sl@0: # undef acos sl@0: # define acos acosd sl@0: # endif sl@0: sl@0: # ifdef asin sl@0: # undef asin sl@0: # define asin asind sl@0: # endif sl@0: sl@0: # ifdef atan sl@0: # undef atan sl@0: # define atan atand sl@0: # endif sl@0: sl@0: # ifdef cosh sl@0: # undef cosh sl@0: # define cosh coshd sl@0: # endif sl@0: sl@0: # ifdef sinh sl@0: # undef sinh sl@0: # define sinh sinhd sl@0: # endif sl@0: sl@0: # ifdef tanh sl@0: # undef tanh sl@0: # define tanh tanhd sl@0: # endif sl@0: sl@0: # ifdef exp sl@0: # undef exp sl@0: # define exp expd sl@0: # endif sl@0: sl@0: # ifdef ldexp sl@0: # undef ldexp sl@0: # define ldexp ldexpd sl@0: # endif sl@0: sl@0: # ifdef log sl@0: # undef log sl@0: # define log logd sl@0: # endif sl@0: sl@0: # ifdef log10 sl@0: # undef log10 sl@0: # define log10 log10d sl@0: # endif sl@0: sl@0: # ifdef fabs sl@0: # undef fabs sl@0: # define fabs fabsd sl@0: # endif sl@0: sl@0: # ifdef sqrt sl@0: # undef sqrt sl@0: # define sqrt sqrtd sl@0: # endif sl@0: sl@0: # ifdef fmod sl@0: # undef fmod sl@0: # define fmod fmodd sl@0: # endif sl@0: sl@0: # ifdef atan2 sl@0: # undef atan2 sl@0: # define atan2 atan2d sl@0: # endif sl@0: sl@0: # ifdef frexp sl@0: # undef frexp sl@0: # define frexp frexpd sl@0: # endif sl@0: sl@0: # ifdef modf sl@0: # undef modf sl@0: # define modf modfd sl@0: # endif sl@0: sl@0: # ifdef pow sl@0: # undef pow sl@0: # define pow powd sl@0: # endif sl@0: sl@0: # ifdef ceil sl@0: # undef ceil sl@0: # define ceil ceild sl@0: # endif sl@0: sl@0: # ifdef floor sl@0: # undef floor sl@0: # define floor floord sl@0: # endif sl@0: #endif sl@0: #endif sl@0: sl@0: #if (defined(THINK_C)) sl@0: #pragma export on sl@0: double hypotd(double x, double y); sl@0: #define hypot hypotd sl@0: #pragma export reset sl@0: #endif sl@0: sl@0: #endif /* _TCLMACMATH */