ESYS13
Revision_
|
00001 00002 /******************************************************* 00003 * 00004 * Copyright (c) 2003-2012 by University of Queensland 00005 * Earth Systems Science Computational Center (ESSCC) 00006 * http://www.uq.edu.au/esscc 00007 * 00008 * Primary Business: Queensland, Australia 00009 * Licensed under the Open Software License version 3.0 00010 * http://www.opensource.org/licenses/osl-3.0.php 00011 * 00012 *******************************************************/ 00013 00014 00019 /* 00020 @(#) system_dep.h 00021 */ 00022 00023 00024 #ifndef escript_system_dep_h 00025 #define escript_system_dep_h 00026 00027 00028 #ifdef NO_FLOAT_H 00029 # define DBL_EPSILON 2.2204460492503131E-16 00030 # define DBL_MAX 1.7976931348623157E+308 00031 # define DBL_MIN 2.2250738585072014E-308 00032 #else /* for the rest of the world */ 00033 # include <float.h> 00034 #endif 00035 #include <limits.h> 00036 00037 #if defined(_WIN32) && defined(__INTEL_COMPILER) 00038 /* 00039 The Intel compiler on windows has an "improved" math library compared to the usual Visual C++ one 00040 In particular it has a acosh and other similar functions which aren't implemented in Visual C++ math.h 00041 Note you will get a compile time error if any other header (including system ones) includes math.h whilst mathimf.h 00042 has been included. As a result system_dep.h must be included FIRST at all times (this prevents math.h from being included). 00043 */ 00044 # include <mathimf.h> 00045 # else 00046 # include <math.h> 00047 # endif 00048 00049 #ifndef M_PI 00050 # define M_PI 3.14159265358979323846 00051 #endif 00052 00053 #ifndef SQRT_DBL_EPSILON 00054 # define SQRT_DBL_EPSILON 1.4901161193847656e-08 00055 #endif 00056 00057 #ifndef M_LN2 00058 # define M_LN2 0.69314718055994530942 /* log_e 2 */ 00059 #endif 00060 00061 #define ESCRIPT_DLL_API 00062 00063 #ifdef _WIN32 00064 # ifndef ESCRIPT_STATIC_LIB 00065 # undef ESCRIPT_DLL_API 00066 # ifdef ESCRIPT_EXPORTS 00067 # define ESCRIPT_DLL_API __declspec(dllexport) 00068 # else 00069 # define ESCRIPT_DLL_API __declspec(dllimport) 00070 # endif 00071 # endif 00072 #endif 00073 00074 #ifndef ESCRIPT_MAX_DATA_RANK 00075 #define ESCRIPT_MAX_DATA_RANK 4 00076 #endif 00077 00078 /* you'll need this one day. */ 00079 #ifndef __const 00080 # if (defined __STDC__ && __STDC__) || defined __cplusplus 00081 # define __const const 00082 # else 00083 # define __const 00084 # endif 00085 #endif 00086 00087 #endif