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 #ifndef esysutils_system_dep_h 00024 #define esysutils_system_dep_h 00025 00026 #if defined(_WIN32) && defined(__INTEL_COMPILER) 00027 /* The Intel compiler on windows has an "improved" math library compared to the usual Visual C++ one 00028 * In particular it has a acosh and other similar functions which aren't implemented in Visual C++ math.h 00029 * Note you will get a compile time error if any other header (including system ones) include math.h before mathimf.h 00030 * has been included. As a result system_dep.h must be included FIRST at all times (this prevents math.h from being included). 00031 */ 00032 #include <mathimf.h> 00033 #else 00034 #include <math.h> 00035 #endif 00036 00037 #define ESYSUTILS_DLL_API 00038 00039 #ifdef _WIN32 00040 # ifndef ESYSUTILS_STATIC_LIB 00041 # undef ESYSUTILS_DLL_API 00042 # ifdef ESYSUTILS_EXPORTS 00043 # define ESYSUTILS_DLL_API __declspec(dllexport) 00044 # else 00045 # define ESYSUTILS_DLL_API __declspec(dllimport) 00046 # endif 00047 # endif 00048 00049 /* This is because of the different declarations of std::exception mentods 00050 * on windows. 00051 * Also, putting a "throw" in any declaration on windows causes a warning!!!!!! 00052 * If you wish to generate a throw() on other systems, please use 00053 * THROW(NO_ARG). This is because windows generates warnings if you say 00054 * THROW(), so the NO_ARG trick must be used to avoid the mass of warnings. 00055 */ 00056 00057 # define THROW(ARG) 00058 #else 00059 # define THROW(ARG) throw(ARG) 00060 #endif 00061 00062 #define NO_ARG 00063 00064 /* you'll need this one day. */ 00065 #ifndef __const 00066 # if (defined __STDC__ && __STDC__) || defined __cplusplus 00067 # define __const const 00068 # else 00069 # define __const 00070 # endif 00071 #endif 00072 00073 00074 00075 #endif