os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/mac/tclMacMath.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/mac/tclMacMath.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,145 @@
1.4 +/*
1.5 + * tclMacMath.h --
1.6 + *
1.7 + * This file is necessary because of Metrowerks CodeWarrior Pro 1
1.8 + * on the Macintosh. With 8-byte doubles turned on, the definitions of
1.9 + * sin, cos, acos, etc., are screwed up. They are fine as long as
1.10 + * they are used as function calls, but if the function pointers
1.11 + * are passed around and used, they will crash hard on the 68K.
1.12 + *
1.13 + * Copyright (c) 1997 Sun Microsystems, Inc.
1.14 + *
1.15 + * See the file "license.terms" for information on usage and redistribution
1.16 + * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
1.17 + *
1.18 + * RCS: @(#) $Id: tclMacMath.h,v 1.3 2001/11/23 01:27:50 das Exp $
1.19 + */
1.20 +
1.21 +#ifndef _TCLMACMATH
1.22 +#define _TCLMACMATH
1.23 +
1.24 +#include <math.h>
1.25 +
1.26 +#if defined(__MWERKS__) && !defined(__POWERPC__)
1.27 +#if __option(IEEEdoubles)
1.28 +
1.29 +# ifdef cos
1.30 +# undef cos
1.31 +# define cos cosd
1.32 +# endif
1.33 +
1.34 +# ifdef sin
1.35 +# undef sin
1.36 +# define sin sind
1.37 +# endif
1.38 +
1.39 +# ifdef tan
1.40 +# undef tan
1.41 +# define tan tand
1.42 +# endif
1.43 +
1.44 +# ifdef acos
1.45 +# undef acos
1.46 +# define acos acosd
1.47 +# endif
1.48 +
1.49 +# ifdef asin
1.50 +# undef asin
1.51 +# define asin asind
1.52 +# endif
1.53 +
1.54 +# ifdef atan
1.55 +# undef atan
1.56 +# define atan atand
1.57 +# endif
1.58 +
1.59 +# ifdef cosh
1.60 +# undef cosh
1.61 +# define cosh coshd
1.62 +# endif
1.63 +
1.64 +# ifdef sinh
1.65 +# undef sinh
1.66 +# define sinh sinhd
1.67 +# endif
1.68 +
1.69 +# ifdef tanh
1.70 +# undef tanh
1.71 +# define tanh tanhd
1.72 +# endif
1.73 +
1.74 +# ifdef exp
1.75 +# undef exp
1.76 +# define exp expd
1.77 +# endif
1.78 +
1.79 +# ifdef ldexp
1.80 +# undef ldexp
1.81 +# define ldexp ldexpd
1.82 +# endif
1.83 +
1.84 +# ifdef log
1.85 +# undef log
1.86 +# define log logd
1.87 +# endif
1.88 +
1.89 +# ifdef log10
1.90 +# undef log10
1.91 +# define log10 log10d
1.92 +# endif
1.93 +
1.94 +# ifdef fabs
1.95 +# undef fabs
1.96 +# define fabs fabsd
1.97 +# endif
1.98 +
1.99 +# ifdef sqrt
1.100 +# undef sqrt
1.101 +# define sqrt sqrtd
1.102 +# endif
1.103 +
1.104 +# ifdef fmod
1.105 +# undef fmod
1.106 +# define fmod fmodd
1.107 +# endif
1.108 +
1.109 +# ifdef atan2
1.110 +# undef atan2
1.111 +# define atan2 atan2d
1.112 +# endif
1.113 +
1.114 +# ifdef frexp
1.115 +# undef frexp
1.116 +# define frexp frexpd
1.117 +# endif
1.118 +
1.119 +# ifdef modf
1.120 +# undef modf
1.121 +# define modf modfd
1.122 +# endif
1.123 +
1.124 +# ifdef pow
1.125 +# undef pow
1.126 +# define pow powd
1.127 +# endif
1.128 +
1.129 +# ifdef ceil
1.130 +# undef ceil
1.131 +# define ceil ceild
1.132 +# endif
1.133 +
1.134 +# ifdef floor
1.135 +# undef floor
1.136 +# define floor floord
1.137 +# endif
1.138 +#endif
1.139 +#endif
1.140 +
1.141 +#if (defined(THINK_C))
1.142 +#pragma export on
1.143 +double hypotd(double x, double y);
1.144 +#define hypot hypotd
1.145 +#pragma export reset
1.146 +#endif
1.147 +
1.148 +#endif /* _TCLMACMATH */