diff options
author | cvs2fossil <cvs2fossil> | 2011-01-25 19:02:56 (GMT) |
---|---|---|
committer | cvs2fossil <cvs2fossil> | 2011-01-25 19:02:56 (GMT) |
commit | 352fce86be9d102b2284de839b7f7ff94ed971f2 (patch) | |
tree | e454e0d4460f15029e4ed5ae3f3131a992445426 /mac/tclMacMath.h | |
parent | 75f084f6970d2344bb5a82fdff6a73825bc6e64e (diff) | |
download | tcl-d17b46e6e2c06a5517e3628d8dd5d9710c745d33.zip tcl-d17b46e6e2c06a5517e3628d8dd5d9710c745d33.tar.gz tcl-d17b46e6e2c06a5517e3628d8dd5d9710c745d33.tar.bz2 |
Created branch dgp-refactor-merge-syntheticdgp_refactor_mergedgp_refactor_merge_synthetic
Diffstat (limited to 'mac/tclMacMath.h')
-rw-r--r-- | mac/tclMacMath.h | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/mac/tclMacMath.h b/mac/tclMacMath.h new file mode 100644 index 0000000..6366dc3 --- /dev/null +++ b/mac/tclMacMath.h @@ -0,0 +1,145 @@ +/* + * tclMacMath.h -- + * + * This file is necessary because of Metrowerks CodeWarrior Pro 1 + * on the Macintosh. With 8-byte doubles turned on, the definitions of + * sin, cos, acos, etc., are screwed up. They are fine as long as + * they are used as function calls, but if the function pointers + * are passed around and used, they will crash hard on the 68K. + * + * Copyright (c) 1997 Sun Microsystems, Inc. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: tclMacMath.h,v 1.3 2001/11/23 01:27:50 das Exp $ + */ + +#ifndef _TCLMACMATH +#define _TCLMACMATH + +#include <math.h> + +#if defined(__MWERKS__) && !defined(__POWERPC__) +#if __option(IEEEdoubles) + +# ifdef cos +# undef cos +# define cos cosd +# endif + +# ifdef sin +# undef sin +# define sin sind +# endif + +# ifdef tan +# undef tan +# define tan tand +# endif + +# ifdef acos +# undef acos +# define acos acosd +# endif + +# ifdef asin +# undef asin +# define asin asind +# endif + +# ifdef atan +# undef atan +# define atan atand +# endif + +# ifdef cosh +# undef cosh +# define cosh coshd +# endif + +# ifdef sinh +# undef sinh +# define sinh sinhd +# endif + +# ifdef tanh +# undef tanh +# define tanh tanhd +# endif + +# ifdef exp +# undef exp +# define exp expd +# endif + +# ifdef ldexp +# undef ldexp +# define ldexp ldexpd +# endif + +# ifdef log +# undef log +# define log logd +# endif + +# ifdef log10 +# undef log10 +# define log10 log10d +# endif + +# ifdef fabs +# undef fabs +# define fabs fabsd +# endif + +# ifdef sqrt +# undef sqrt +# define sqrt sqrtd +# endif + +# ifdef fmod +# undef fmod +# define fmod fmodd +# endif + +# ifdef atan2 +# undef atan2 +# define atan2 atan2d +# endif + +# ifdef frexp +# undef frexp +# define frexp frexpd +# endif + +# ifdef modf +# undef modf +# define modf modfd +# endif + +# ifdef pow +# undef pow +# define pow powd +# endif + +# ifdef ceil +# undef ceil +# define ceil ceild +# endif + +# ifdef floor +# undef floor +# define floor floord +# endif +#endif +#endif + +#if (defined(THINK_C)) +#pragma export on +double hypotd(double x, double y); +#define hypot hypotd +#pragma export reset +#endif + +#endif /* _TCLMACMATH */ |