/[escript]/trunk/escript/src/system_dep.h
ViewVC logotype

Diff of /trunk/escript/src/system_dep.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1030 by woo409, Fri Jul 14 07:41:31 2006 UTC revision 1031 by phornby, Wed Mar 14 06:03:21 2007 UTC
# Line 1  Line 1 
1  /**  /**
2  \file system_dep.h  \file system_dep.h
3  \ingroup Other  \ingroup Other
4   */   */
5  //  //
6  // @(#) system_dep.h  // @(#) system_dep.h
7  //  //
8    
9  #ifndef escript_system_dep_h  #ifndef escript_system_dep_h
10  #define escript_system_dep_h  #define escript_system_dep_h
11    
12  # ifdef __INTEL_COMPILER  
13  // The Intel compiler on windows has an "improved" math library compared to the usual Visual C++ one  #ifdef NO_FLOAT_H
14  // In particular it has a acosh and other similar functions which aren't implemented in Visual C++ math.h  #   define DBL_EPSILON 2.2204460492503131E-16
15  // Note you will get a compile time error if any other header (including system ones) includes math.h whilst mathimf.h  #   define DBL_MAX 1.7976931348623157E+308
16  // has been included. As a result system_dep.h must be included FIRST at all times (this prevents math.h from being included).  #   define DBL_MIN 2.2250738585072014E-308
17  #  include <mathimf.h>  #else /* for the rest of the world */
18  # else  #   include <float.h>
19  #  include <math.h>  #endif
20  # endif  #include <limits.h>
21    
22  #ifdef _WIN32  # ifdef __INTEL_COMPILER
23    // The Intel compiler on windows has an "improved" math library compared to the usual Visual C++ one
24  #ifndef INTERFACE_STATIC_LIB  // In particular it has a acosh and other similar functions which aren't implemented in Visual C++ math.h
25  # ifdef ESCRIPT_EXPORTS  // Note you will get a compile time error if any other header (including system ones) includes math.h whilst mathimf.h
26  #   define ESCRIPT_DLL_API __declspec(dllexport)  // has been included. As a result system_dep.h must be included FIRST at all times (this prevents math.h from being included).
27  #  else  #  include <mathimf.h>
28  #   define ESCRIPT_DLL_API __declspec(dllimport)  # else
29  # endif  #  include <math.h>
30  #endif  # endif
31    
32  #else  #ifndef M_PI
33  # define ESCRIPT_DLL_API  #   define M_PI 3.14159265358979323846
34  #endif  #endif
35    
36  #endif  #ifndef SQRT_DBL_EPSILON
37    #   define SQRT_DBL_EPSILON   1.4901161193847656e-08
38    #endif
39    
40    #ifndef M_LN2
41    #   define M_LN2  0.69314718055994530942  /* log_e 2 */
42    #endif
43    
44    #ifdef NO_INV_HYPER
45    #   include "invhyp.h"
46    #   define asinh asinh_substitute
47    #   define acosh acosh_substitute
48    #   define atanh atanh_substitute
49    #endif
50    
51    #ifdef _WIN32
52    
53    #ifndef INTERFACE_STATIC_LIB
54    # ifdef ESCRIPT_EXPORTS
55    #   define ESCRIPT_DLL_API __declspec(dllexport)
56    #  else
57    #   define ESCRIPT_DLL_API __declspec(dllimport)
58    # endif
59    #endif
60    
61    #else
62    # define ESCRIPT_DLL_API
63    #endif
64    
65    #endif

Legend:
Removed from v.1030  
changed lines
  Added in v.1031

  ViewVC Help
Powered by ViewVC 1.1.26