[ 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.4.0, Dec 21 2005 ) */ 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 #endif // _MSC_VER 00106 00107 /////////////////////////////////////////////////////////// 00108 // // 00109 // gcc // 00110 // // 00111 /////////////////////////////////////////////////////////// 00112 00113 #if defined(__GNUC__) 00114 #if __GNUC__ < 2 || ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 8)) 00115 #error "Need at least g++ 2.95" 00116 #endif 00117 #define HAS_HASH_CONTAINERS 00118 #endif // __GNUC__ 00119 00120 /////////////////////////////////////////////////////////// 00121 // // 00122 // MingW // 00123 // // 00124 /////////////////////////////////////////////////////////// 00125 00126 #if defined(__MINGW32__) 00127 #define VIGRA_NEED_BIN_STREAMS 00128 #endif // __MINGW32__ 00129 00130 /////////////////////////////////////////////////////////// 00131 // // 00132 // SGI C++ 7.2 // 00133 // // 00134 /////////////////////////////////////////////////////////// 00135 00136 #if defined(__sgi) && !defined(__GNUC__) 00137 #if _COMPILER_VERSION < 720 00138 #error "Need SGI C++ 7.2 or later" 00139 #endif 00140 #if (_COMPILER_VERSION == 720) || (_COMPILER_VERSION == 721) 00141 #define SPECIAL_STDEXCEPTION_DEFINITION_NEEDED 00142 00143 namespace vigra { 00144 typedef std::exception StdException; // must be above next #define !! 00145 } 00146 #define std 00147 #define NO_NAMESPACE_STD 00148 #endif // _COMPILER_VERSION 00149 #define HAS_HASH_CONTAINERS 00150 #endif // __sgi 00151 00152 /////////////////////////////////////////////////////////// 00153 // // 00154 // general // 00155 // // 00156 /////////////////////////////////////////////////////////// 00157 00158 #ifdef CMATH_NOT_IN_STD 00159 #define VIGRA_CSTD 00160 #else 00161 #define VIGRA_CSTD std 00162 #endif 00163 00164 #ifdef NO_TYPENAME 00165 #define typename 00166 #endif 00167 00168 #ifdef NO_EXPLICIT 00169 #define explicit 00170 #endif 00171 00172 namespace vigra { 00173 00174 #ifndef SPECIAL_STDEXCEPTION_DEFINITION_NEEDED 00175 typedef std::exception StdException; 00176 #endif 00177 00178 } // namespace vigra 00179 00180 #endif // VIGRA_CONFIG_HXX
© Ullrich Köthe (koethe@informatik.uni-hamburg.de) |
html generated using doxygen and Python
|