| 1 | // (C) Copyright John Maddock 2001 - 2003. |
|---|
| 2 | // (C) Copyright David Abrahams 2002 - 2003. |
|---|
| 3 | // (C) Copyright Aleksey Gurtovoy 2002. |
|---|
| 4 | // Use, modification and distribution are subject to the |
|---|
| 5 | // Boost Software License, Version 1.0. (See accompanying file |
|---|
| 6 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
|---|
| 7 | |
|---|
| 8 | // See http://www.boost.org for most recent version. |
|---|
| 9 | |
|---|
| 10 | // Borland C++ compiler setup: |
|---|
| 11 | |
|---|
| 12 | // |
|---|
| 13 | // versions check: |
|---|
| 14 | // we don't support Borland prior to version 5.4: |
|---|
| 15 | #if __BORLANDC__ < 0x540 |
|---|
| 16 | # error "Compiler not supported or configured - please reconfigure" |
|---|
| 17 | #elif __BORLANDC__ < 0x581 |
|---|
| 18 | # pragma message( "Support for Borland compilers older than BCB2006 is deprecated in Boost 1.34" ) |
|---|
| 19 | #endif |
|---|
| 20 | |
|---|
| 21 | // last known and checked version is 0x600 (Builder X preview) |
|---|
| 22 | // Or 0x582 (Borland C++ Builder 2006 Update 1): |
|---|
| 23 | #if (__BORLANDC__ > 0x582) && (__BORLANDC__ != 0x600) |
|---|
| 24 | # if defined(BOOST_ASSERT_CONFIG) |
|---|
| 25 | # error "Unknown compiler version - please run the configure tests and report the results" |
|---|
| 26 | # else |
|---|
| 27 | # pragma message( "Unknown compiler version - please run the configure tests and report the results") |
|---|
| 28 | # endif |
|---|
| 29 | #endif |
|---|
| 30 | |
|---|
| 31 | // |
|---|
| 32 | // Support macros to help with standard library detection |
|---|
| 33 | #if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL) |
|---|
| 34 | # define BOOST_BCB_WITH_ROGUE_WAVE |
|---|
| 35 | #elif __BORLANDC__ < 0x570 |
|---|
| 36 | # define BOOST_BCB_WITH_STLPORT |
|---|
| 37 | #else |
|---|
| 38 | # define BOOST_BCB_WITH_DINKUMWARE |
|---|
| 39 | #endif |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | // |
|---|
| 43 | // Version 5.0 and below: |
|---|
| 44 | # if __BORLANDC__ <= 0x0550 |
|---|
| 45 | // Borland C++Builder 4 and 5: |
|---|
| 46 | # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS |
|---|
| 47 | # if __BORLANDC__ == 0x0550 |
|---|
| 48 | // Borland C++Builder 5, command-line compiler 5.5: |
|---|
| 49 | # define BOOST_NO_OPERATORS_IN_NAMESPACE |
|---|
| 50 | # endif |
|---|
| 51 | # endif |
|---|
| 52 | |
|---|
| 53 | // Version 5.51 and below: |
|---|
| 54 | #if (__BORLANDC__ <= 0x551) |
|---|
| 55 | # define BOOST_NO_CV_SPECIALIZATIONS |
|---|
| 56 | # define BOOST_NO_CV_VOID_SPECIALIZATIONS |
|---|
| 57 | # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS |
|---|
| 58 | # define BOOST_NO_DEDUCED_TYPENAME |
|---|
| 59 | // workaround for missing WCHAR_MAX/WCHAR_MIN: |
|---|
| 60 | #include <climits> |
|---|
| 61 | #include <cwchar> |
|---|
| 62 | #ifndef WCHAR_MAX |
|---|
| 63 | # define WCHAR_MAX 0xffff |
|---|
| 64 | #endif |
|---|
| 65 | #ifndef WCHAR_MIN |
|---|
| 66 | # define WCHAR_MIN 0 |
|---|
| 67 | #endif |
|---|
| 68 | #endif |
|---|
| 69 | |
|---|
| 70 | // Borland C++ Builder 2006 Update 2 and below: |
|---|
| 71 | #if (__BORLANDC__ <= 0x582) |
|---|
| 72 | # define BOOST_NO_SFINAE |
|---|
| 73 | # define BOOST_NO_INTEGRAL_INT64_T |
|---|
| 74 | # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS |
|---|
| 75 | # define BOOST_NO_PRIVATE_IN_AGGREGATE |
|---|
| 76 | # define BOOST_NO_USING_TEMPLATE |
|---|
| 77 | # define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG |
|---|
| 78 | # define BOOST_NO_TEMPLATE_TEMPLATES |
|---|
| 79 | # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE |
|---|
| 80 | # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS |
|---|
| 81 | // we shouldn't really need this - but too many things choke |
|---|
| 82 | // without it, this needs more investigation: |
|---|
| 83 | # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS |
|---|
| 84 | # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL |
|---|
| 85 | # define BOOST_NO_IS_ABSTRACT |
|---|
| 86 | |
|---|
| 87 | # ifdef NDEBUG |
|---|
| 88 | // fix broken <cstring> so that Boost.test works: |
|---|
| 89 | # include <cstring> |
|---|
| 90 | # undef strcmp |
|---|
| 91 | # endif |
|---|
| 92 | // fix broken errno declaration: |
|---|
| 93 | # include <errno.h> |
|---|
| 94 | # ifndef errno |
|---|
| 95 | # define errno errno |
|---|
| 96 | # endif |
|---|
| 97 | |
|---|
| 98 | // |
|---|
| 99 | // new bug in 5.61: |
|---|
| 100 | #if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580) |
|---|
| 101 | // this seems to be needed by the command line compiler, but not the IDE: |
|---|
| 102 | # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS |
|---|
| 103 | #endif |
|---|
| 104 | |
|---|
| 105 | # ifdef _WIN32 |
|---|
| 106 | # define BOOST_NO_SWPRINTF |
|---|
| 107 | # elif defined(linux) || defined(__linux__) || defined(__linux) |
|---|
| 108 | // we should really be able to do without this |
|---|
| 109 | // but the wcs* functions aren't imported into std:: |
|---|
| 110 | # define BOOST_NO_STDC_NAMESPACE |
|---|
| 111 | // _CPPUNWIND doesn't get automatically set for some reason: |
|---|
| 112 | # pragma defineonoption BOOST_CPPUNWIND -x |
|---|
| 113 | # endif |
|---|
| 114 | #endif |
|---|
| 115 | |
|---|
| 116 | // |
|---|
| 117 | // Post 0x561 we have long long and stdint.h: |
|---|
| 118 | #if __BORLANDC__ >= 0x561 |
|---|
| 119 | # ifndef __NO_LONG_LONG |
|---|
| 120 | # define BOOST_HAS_LONG_LONG |
|---|
| 121 | # endif |
|---|
| 122 | // On non-Win32 platforms let the platform config figure this out: |
|---|
| 123 | # ifdef _WIN32 |
|---|
| 124 | # define BOOST_HAS_STDINT_H |
|---|
| 125 | # endif |
|---|
| 126 | #endif |
|---|
| 127 | |
|---|
| 128 | // Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is |
|---|
| 129 | // defined, then we have 0x560 or greater with the Rogue Wave implementation |
|---|
| 130 | // which presumably has the std::DBL_MAX bug. |
|---|
| 131 | #if defined( BOOST_BCB_WITH_ROGUE_WAVE ) |
|---|
| 132 | // <climits> is partly broken, some macros define symbols that are really in |
|---|
| 133 | // namespace std, so you end up having to use illegal constructs like |
|---|
| 134 | // std::DBL_MAX, as a fix we'll just include float.h and have done with: |
|---|
| 135 | #include <float.h> |
|---|
| 136 | #endif |
|---|
| 137 | // |
|---|
| 138 | // __int64: |
|---|
| 139 | // |
|---|
| 140 | #if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__) |
|---|
| 141 | # define BOOST_HAS_MS_INT64 |
|---|
| 142 | #endif |
|---|
| 143 | // |
|---|
| 144 | // check for exception handling support: |
|---|
| 145 | // |
|---|
| 146 | #if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) |
|---|
| 147 | # define BOOST_NO_EXCEPTIONS |
|---|
| 148 | #endif |
|---|
| 149 | // |
|---|
| 150 | // all versions have a <dirent.h>: |
|---|
| 151 | // |
|---|
| 152 | #ifndef __STRICT_ANSI__ |
|---|
| 153 | # define BOOST_HAS_DIRENT_H |
|---|
| 154 | #endif |
|---|
| 155 | // |
|---|
| 156 | // all versions support __declspec: |
|---|
| 157 | // |
|---|
| 158 | #ifndef __STRICT_ANSI__ |
|---|
| 159 | # define BOOST_HAS_DECLSPEC |
|---|
| 160 | #endif |
|---|
| 161 | // |
|---|
| 162 | // ABI fixing headers: |
|---|
| 163 | // |
|---|
| 164 | #if __BORLANDC__ < 0x600 // not implemented for version 6 compiler yet |
|---|
| 165 | #ifndef BOOST_ABI_PREFIX |
|---|
| 166 | # define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" |
|---|
| 167 | #endif |
|---|
| 168 | #ifndef BOOST_ABI_SUFFIX |
|---|
| 169 | # define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" |
|---|
| 170 | #endif |
|---|
| 171 | #endif |
|---|
| 172 | // |
|---|
| 173 | // Disable Win32 support in ANSI mode: |
|---|
| 174 | // |
|---|
| 175 | #if __BORLANDC__ < 0x600 |
|---|
| 176 | # pragma defineonoption BOOST_DISABLE_WIN32 -A |
|---|
| 177 | #elif defined(__STRICT_ANSI__) |
|---|
| 178 | # define BOOST_DISABLE_WIN32 |
|---|
| 179 | #endif |
|---|
| 180 | // |
|---|
| 181 | // MSVC compatibility mode does some nasty things: |
|---|
| 182 | // TODO: look up if this doesn't apply to the whole 12xx range |
|---|
| 183 | // |
|---|
| 184 | #if defined(_MSC_VER) && (_MSC_VER <= 1200) |
|---|
| 185 | # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP |
|---|
| 186 | # define BOOST_NO_VOID_RETURNS |
|---|
| 187 | #endif |
|---|
| 188 | |
|---|
| 189 | #define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) |
|---|
| 190 | |
|---|