os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/mac/tclMacMath.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
/*
sl@0
     2
 * tclMacMath.h --
sl@0
     3
 *
sl@0
     4
 *	This file is necessary because of Metrowerks CodeWarrior Pro 1
sl@0
     5
 *	on the Macintosh. With 8-byte doubles turned on, the definitions of
sl@0
     6
 *	sin, cos, acos, etc., are screwed up.  They are fine as long as
sl@0
     7
 *	they are used as function calls, but if the function pointers
sl@0
     8
 *	are passed around and used, they will crash hard on the 68K.
sl@0
     9
 *
sl@0
    10
 * Copyright (c) 1997 Sun Microsystems, Inc.
sl@0
    11
 *
sl@0
    12
 * See the file "license.terms" for information on usage and redistribution
sl@0
    13
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
sl@0
    14
 *
sl@0
    15
 * RCS: @(#) $Id: tclMacMath.h,v 1.3 2001/11/23 01:27:50 das Exp $
sl@0
    16
 */
sl@0
    17
sl@0
    18
#ifndef _TCLMACMATH
sl@0
    19
#define _TCLMACMATH
sl@0
    20
sl@0
    21
#include <math.h>
sl@0
    22
sl@0
    23
#if defined(__MWERKS__) && !defined(__POWERPC__)
sl@0
    24
#if __option(IEEEdoubles)
sl@0
    25
sl@0
    26
#   ifdef cos
sl@0
    27
#	undef cos
sl@0
    28
#	define cos cosd
sl@0
    29
#   endif
sl@0
    30
sl@0
    31
#   ifdef sin
sl@0
    32
#	undef sin
sl@0
    33
#	define sin sind
sl@0
    34
#   endif
sl@0
    35
sl@0
    36
#   ifdef tan
sl@0
    37
#	undef tan
sl@0
    38
#	define tan tand
sl@0
    39
#   endif
sl@0
    40
sl@0
    41
#   ifdef acos
sl@0
    42
#	undef acos
sl@0
    43
#	define acos acosd
sl@0
    44
#   endif
sl@0
    45
sl@0
    46
#   ifdef asin
sl@0
    47
#	undef asin
sl@0
    48
#	define asin asind
sl@0
    49
#   endif
sl@0
    50
sl@0
    51
#   ifdef atan
sl@0
    52
#	undef atan
sl@0
    53
#	define atan atand
sl@0
    54
#   endif
sl@0
    55
sl@0
    56
#   ifdef cosh
sl@0
    57
#	undef cosh
sl@0
    58
#	define cosh coshd
sl@0
    59
#   endif
sl@0
    60
sl@0
    61
#   ifdef sinh
sl@0
    62
#	undef sinh
sl@0
    63
#	define sinh sinhd
sl@0
    64
#   endif
sl@0
    65
sl@0
    66
#   ifdef tanh
sl@0
    67
#	undef tanh
sl@0
    68
#	define tanh tanhd
sl@0
    69
#   endif
sl@0
    70
sl@0
    71
#   ifdef exp
sl@0
    72
#	undef exp
sl@0
    73
#	define exp expd
sl@0
    74
#   endif
sl@0
    75
sl@0
    76
#   ifdef ldexp
sl@0
    77
#	undef ldexp
sl@0
    78
#	define ldexp ldexpd
sl@0
    79
#   endif
sl@0
    80
sl@0
    81
#   ifdef log
sl@0
    82
#	undef log
sl@0
    83
#	define log logd
sl@0
    84
#   endif
sl@0
    85
sl@0
    86
#   ifdef log10
sl@0
    87
#	undef log10
sl@0
    88
#	define log10 log10d
sl@0
    89
#   endif
sl@0
    90
sl@0
    91
#   ifdef fabs
sl@0
    92
#	undef fabs
sl@0
    93
#	define fabs fabsd
sl@0
    94
#   endif
sl@0
    95
sl@0
    96
#   ifdef sqrt
sl@0
    97
#	undef sqrt
sl@0
    98
#	define sqrt sqrtd
sl@0
    99
#   endif
sl@0
   100
sl@0
   101
#   ifdef fmod
sl@0
   102
#	undef fmod
sl@0
   103
#	define fmod fmodd
sl@0
   104
#   endif
sl@0
   105
sl@0
   106
#   ifdef atan2
sl@0
   107
#	undef atan2
sl@0
   108
#	define atan2 atan2d
sl@0
   109
#   endif
sl@0
   110
sl@0
   111
#   ifdef frexp
sl@0
   112
#	undef frexp
sl@0
   113
#	define frexp frexpd
sl@0
   114
#   endif
sl@0
   115
sl@0
   116
#   ifdef modf
sl@0
   117
#	undef modf
sl@0
   118
#	define modf modfd
sl@0
   119
#   endif
sl@0
   120
sl@0
   121
#   ifdef pow
sl@0
   122
#	undef pow
sl@0
   123
#	define pow powd
sl@0
   124
#   endif
sl@0
   125
sl@0
   126
#   ifdef ceil
sl@0
   127
#	undef ceil
sl@0
   128
#	define ceil ceild
sl@0
   129
#   endif
sl@0
   130
sl@0
   131
#   ifdef floor
sl@0
   132
#	undef floor
sl@0
   133
#	define floor floord
sl@0
   134
#   endif
sl@0
   135
#endif
sl@0
   136
#endif
sl@0
   137
sl@0
   138
#if (defined(THINK_C))
sl@0
   139
#pragma export on
sl@0
   140
double		hypotd(double x, double y);
sl@0
   141
#define hypot hypotd
sl@0
   142
#pragma export reset
sl@0
   143
#endif
sl@0
   144
sl@0
   145
#endif /* _TCLMACMATH */