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