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

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

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

revision 1811 by ksteube, Thu Sep 25 23:11:13 2008 UTC revision 2029 by phornby, Wed Nov 12 07:27:05 2008 UTC
# Line 23  Line 23 
23  #ifndef esysutils_system_dep_h  #ifndef esysutils_system_dep_h
24  #define esysutils_system_dep_h  #define esysutils_system_dep_h
25    
26  #ifdef __INTEL_COMPILER  #if defined(_WIN32) && defined(__INTEL_COMPILER)
27  // The Intel compiler on windows has an "improved" math library compared to the usual Visual C++ one  // The Intel compiler on windows has an "improved" math library compared to the usual Visual C++ one
28  // In particular it has a acosh and other similar functions which aren't implemented in Visual C++ math.h  // In particular it has a acosh and other similar functions which aren't implemented in Visual C++ math.h
29  // Note you will get a compile time error if any other header (including system ones) includes math.h whilst mathimf.h  // Note you will get a compile time error if any other header (including system ones) include math.h before mathimf.h
30  // has been included. As a result system_dep.h must be included FIRST at all times (this prevents math.h from being included).  // has been included. As a result system_dep.h must be included FIRST at all times (this prevents math.h from being included).
31  #include <mathimf.h>  #include <mathimf.h>
32  #else  #else
33  #include <math.h>  #include <math.h>
34  #endif  #endif
35    
36    #define ESYSUTILS_DLL_API
37    
38  #ifdef _WIN32  #ifdef _WIN32
39    #   ifndef INTERFACE_STATIC_LIB
40    #      undefine ESYSUTILS_DLL_API
41    #      ifdef ESYSUTILS_EXPORTS
42    #         define ESYSUTILS_DLL_API __declspec(dllexport)
43    #      else
44    #         define ESYSUTILS_DLL_API __declspec(dllimport)
45    #      endif
46    #   endif
47    
48    // This is because of the different declarations of std::exception mentods
49    // on windows.
50    // Also, putting a "throw" in any declaration on windows causes a warning!!!!!!
51    // If you wish to generate a throw() on other systems, please use
52    // THROW(NO_ARG). This is because windows generates warnings if you say
53    // THROW(), so the NO_ARG trick must be used to avoid the mass of warnings.
54    
 // Un-comment this block if you want it dynamic  
 // and comment out the line immediately after the block.  
 //#   ifndef INTERFACE_STATIC_LIB  
 //#      ifdef ESYSUTILS_EXPORTS  
 //#         define ESYSUTILS_DLL_API __declspec(dllexport)  
 //#      else  
 //#         define ESYSUTILS_DLL_API __declspec(dllimport)  
 //#      endif  
 //#   endif  
 #   define ESYSUTILS_DLL_API  
55  #   define THROW(ARG)  #   define THROW(ARG)
 #   define THROW_ANY // Stupid windows compilers complain about THROW()  
56  #else  #else
57  #   define ESYSUTILS_DLL_API  #   define ESYSUTILS_DLL_API
58  #   define THROW(ARG) throw(ARG)  #   define THROW(ARG) throw(ARG)
 #   define THROW_ANY throw()  
59  #endif  #endif
60    
61    #define NO_ARG
62    
63  #endif  #endif

Legend:
Removed from v.1811  
changed lines
  Added in v.2029

  ViewVC Help
Powered by ViewVC 1.1.26