escript
Revision_
|
00001 00002 /***************************************************************************** 00003 * 00004 * Copyright (c) 2003-2014 by University of Queensland 00005 * http://www.uq.edu.au 00006 * 00007 * Primary Business: Queensland, Australia 00008 * Licensed under the Open Software License version 3.0 00009 * http://www.opensource.org/licenses/osl-3.0.php 00010 * 00011 * Development until 2012 by Earth Systems Science Computational Center (ESSCC) 00012 * Development 2012-2013 by School of Earth Sciences 00013 * Development from 2014 by Centre for Geoscience Computing (GeoComp) 00014 * 00015 *****************************************************************************/ 00016 00017 00022 /* 00023 * @(#) system_dep.h 00024 */ 00025 00026 #ifndef esysutils_system_dep_h 00027 #define esysutils_system_dep_h 00028 00029 #if defined(_WIN32) && defined(__INTEL_COMPILER) 00030 /* The Intel compiler on windows has an "improved" math library compared to the usual Visual C++ one 00031 * In particular it has a acosh and other similar functions which aren't implemented in Visual C++ math.h 00032 * Note you will get a compile time error if any other header (including system ones) include math.h before mathimf.h 00033 * has been included. As a result system_dep.h must be included FIRST at all times (this prevents math.h from being included). 00034 */ 00035 #include <mathimf.h> 00036 #else 00037 #include <cmath> 00038 #endif 00039 00040 #define ESYSUTILS_DLL_API 00041 00042 #ifdef _WIN32 00043 # ifndef ESYSUTILS_STATIC_LIB 00044 # undef ESYSUTILS_DLL_API 00045 # ifdef ESYSUTILS_EXPORTS 00046 # define ESYSUTILS_DLL_API __declspec(dllexport) 00047 # else 00048 # define ESYSUTILS_DLL_API __declspec(dllimport) 00049 # endif 00050 # endif 00051 00052 /* This is because of the different declarations of std::exception mentods 00053 * on windows. 00054 * Also, putting a "throw" in any declaration on windows causes a warning!!!!!! 00055 * If you wish to generate a throw() on other systems, please use 00056 * THROW(NO_ARG). This is because windows generates warnings if you say 00057 * THROW(), so the NO_ARG trick must be used to avoid the mass of warnings. 00058 */ 00059 00060 # define THROW(ARG) 00061 #else 00062 # define THROW(ARG) throw(ARG) 00063 #endif 00064 00065 #define NO_ARG 00066 00067 /* you'll need this one day. */ 00068 #ifndef __const 00069 # if (defined __STDC__ && __STDC__) || defined __cplusplus 00070 # define __const const 00071 # else 00072 # define __const 00073 # endif 00074 #endif 00075 00076 00077 00078 #endif