[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]
vigra/config.hxx | ![]() |
00001 /************************************************************************/ 00002 /* */ 00003 /* Copyright 1998-2002 by Ullrich Koethe */ 00004 /* */ 00005 /* This file is part of the VIGRA computer vision library. */ 00006 /* The VIGRA Website is */ 00007 /* http://hci.iwr.uni-heidelberg.de/vigra/ */ 00008 /* Please direct questions, bug reports, and contributions to */ 00009 /* ullrich.koethe@iwr.uni-heidelberg.de or */ 00010 /* vigra@informatik.uni-hamburg.de */ 00011 /* */ 00012 /* Permission is hereby granted, free of charge, to any person */ 00013 /* obtaining a copy of this software and associated documentation */ 00014 /* files (the "Software"), to deal in the Software without */ 00015 /* restriction, including without limitation the rights to use, */ 00016 /* copy, modify, merge, publish, distribute, sublicense, and/or */ 00017 /* sell copies of the Software, and to permit persons to whom the */ 00018 /* Software is furnished to do so, subject to the following */ 00019 /* conditions: */ 00020 /* */ 00021 /* The above copyright notice and this permission notice shall be */ 00022 /* included in all copies or substantial portions of the */ 00023 /* Software. */ 00024 /* */ 00025 /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND */ 00026 /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES */ 00027 /* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND */ 00028 /* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT */ 00029 /* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, */ 00030 /* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING */ 00031 /* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR */ 00032 /* OTHER DEALINGS IN THE SOFTWARE. */ 00033 /* */ 00034 /************************************************************************/ 00035 00036 00037 #ifndef VIGRA_CONFIG_HXX 00038 #define VIGRA_CONFIG_HXX 00039 00040 #include <vigra/configVersion.hxx> 00041 #include <stdexcept> 00042 00043 /////////////////////////////////////////////////////////// 00044 // // 00045 // VisualC++ 5.0 // 00046 // // 00047 /////////////////////////////////////////////////////////// 00048 00049 #ifdef _MSC_VER 00050 #if(_MSC_VER < 1100) // before VisualC++ 5.0 00051 #error "Need VisualC++ 5.0, Service Pack 2, or later" 00052 #endif // _MSC_VER < 1100 00053 00054 #if (_MSC_VER < 1300) 00055 #define NO_TYPENAME // no 'typename' keyword 00056 #define TEMPLATE_COPY_CONSTRUCTOR_BUG 00057 #define NO_STL_MEMBER_TEMPLATES 00058 #define NO_INLINE_STATIC_CONST_DEFINITION 00059 #define CMATH_NOT_IN_STD 00060 #define NO_COVARIANT_RETURN_TYPES 00061 00062 #ifdef VIGRA_NO_STD_MINMAX // activate if necessary 00063 namespace std { 00064 00065 template<class T> 00066 const T& min(const T& x, const T& y) 00067 { 00068 return (y < x) 00069 ? y 00070 : x; 00071 } 00072 00073 template<class T> 00074 const T& max(const T& x, const T& y) 00075 { 00076 return (x < y) 00077 ? y 00078 : x; 00079 } 00080 } 00081 #endif // VIGRA_NO_STD_MINMAX 00082 #endif // (_MSC_VER < 1300) 00083 00084 #if _MSC_VER < 1310 00085 #pragma warning( disable : 4786 4250 4244 4305) 00086 00087 #define NO_PARTIAL_TEMPLATE_SPECIALIZATION 00088 #define NO_OUT_OF_LINE_MEMBER_TEMPLATES 00089 #include <cmath> 00090 00091 #ifdef _MSC_EXTENSIONS 00092 #ifndef CMATH_NOT_IN_STD 00093 namespace std { 00094 #endif // CMATH_NOT_IN_STD 00095 inline double abs(double v) { return fabs(v); } 00096 inline float abs(float v) { return fabs(v); } 00097 #ifndef CMATH_NOT_IN_STD 00098 } 00099 #endif // CMATH_NOT_IN_STD 00100 #endif // _MSC_EXTENSIONS 00101 #endif // _MSC_VER < 1310 00102 00103 #if _MSC_VER < 1400 00104 #define VIGRA_NO_WORKING_STRINGSTREAM 00105 #endif 00106 00107 #define VIGRA_NEED_BIN_STREAMS 00108 00109 #ifdef VIGRA_DLL 00110 #define VIGRA_EXPORT __declspec(dllexport) 00111 #elif defined(VIGRA_STATIC_LIB) 00112 #define VIGRA_EXPORT 00113 #else 00114 #define VIGRA_EXPORT __declspec(dllimport) 00115 #endif 00116 #endif // _MSC_VER 00117 00118 /////////////////////////////////////////////////////////// 00119 // // 00120 // gcc // 00121 // // 00122 /////////////////////////////////////////////////////////// 00123 00124 #if defined(__GNUC__) 00125 #if __GNUC__ < 2 || ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 8)) 00126 #error "Need at least g++ 2.95" 00127 #endif 00128 #if __GNUC__ < 3 00129 #define VIGRA_NO_WORKING_STRINGSTREAM 00130 #endif 00131 #define HAS_HASH_CONTAINERS 00132 00133 // these warnings produce too many false positives to be useful 00134 #pragma GCC diagnostic ignored "-Wstrict-aliasing" 00135 #pragma GCC diagnostic ignored "-Wshadow" 00136 00137 #endif // __GNUC__ 00138 00139 /////////////////////////////////////////////////////////// 00140 // // 00141 // MingW // 00142 // // 00143 /////////////////////////////////////////////////////////// 00144 00145 #if defined(__MINGW32__) 00146 #define VIGRA_NEED_BIN_STREAMS 00147 00148 #ifdef VIGRA_DLL 00149 #define VIGRA_EXPORT __declspec(dllexport) 00150 #elif defined(VIGRA_STATIC_LIB) 00151 #define VIGRA_EXPORT 00152 #else 00153 #define VIGRA_EXPORT __declspec(dllimport) 00154 #endif 00155 #endif // __MINGW32__ 00156 00157 /////////////////////////////////////////////////////////// 00158 // // 00159 // SGI C++ 7.2 // 00160 // // 00161 /////////////////////////////////////////////////////////// 00162 00163 #if defined(__sgi) && !defined(__GNUC__) 00164 #if _COMPILER_VERSION < 720 00165 #error "Need SGI C++ 7.2 or later" 00166 #endif 00167 #if (_COMPILER_VERSION == 720) || (_COMPILER_VERSION == 721) 00168 #define SPECIAL_STDEXCEPTION_DEFINITION_NEEDED 00169 00170 namespace vigra { 00171 typedef std::exception StdException; // must be above next #define !! 00172 } 00173 #define std 00174 #define NO_NAMESPACE_STD 00175 #endif // _COMPILER_VERSION 00176 #define HAS_HASH_CONTAINERS 00177 #endif // __sgi 00178 00179 /////////////////////////////////////////////////////////// 00180 // // 00181 // Sun C++ ??? // 00182 // // 00183 /////////////////////////////////////////////////////////// 00184 00185 #if defined(__sun) && !defined(__GNUC__) 00186 #define VIGRA_HAS_ERF 00187 #endif // __sun 00188 00189 /////////////////////////////////////////////////////////// 00190 // // 00191 // general // 00192 // // 00193 /////////////////////////////////////////////////////////// 00194 00195 #ifdef CMATH_NOT_IN_STD 00196 #define VIGRA_CSTD 00197 #else 00198 #define VIGRA_CSTD std 00199 #endif 00200 00201 #ifdef NO_TYPENAME 00202 #define typename 00203 #endif 00204 00205 #ifdef NO_EXPLICIT 00206 #define explicit 00207 #endif 00208 00209 #ifndef VIGRA_EXPORT 00210 #define VIGRA_EXPORT 00211 #endif 00212 00213 namespace vigra { 00214 00215 #ifndef SPECIAL_STDEXCEPTION_DEFINITION_NEEDED 00216 typedef std::exception StdException; 00217 #endif 00218 00219 } // namespace vigra 00220 00221 #ifdef DOXYGEN 00222 # define doxygen_overloaded_function(fun) fun(...); 00223 #else 00224 # define doxygen_overloaded_function(fun) 00225 #endif 00226 00227 00228 #endif // VIGRA_CONFIG_HXX
© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) |
html generated using doxygen and Python
|