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 | #endif |
---|
18 | |
---|
19 | // last known compiler version: |
---|
20 | #if (__BORLANDC__ > 0x613) |
---|
21 | //# if defined(BOOST_ASSERT_CONFIG) |
---|
22 | # error "Unknown compiler version - please run the configure tests and report the results" |
---|
23 | //# else |
---|
24 | //# pragma message( "Unknown compiler version - please run the configure tests and report the results") |
---|
25 | //# endif |
---|
26 | #elif (__BORLANDC__ == 0x600) |
---|
27 | # error "CBuilderX preview compiler is no longer supported" |
---|
28 | #endif |
---|
29 | |
---|
30 | // |
---|
31 | // Support macros to help with standard library detection |
---|
32 | #if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL) |
---|
33 | # define BOOST_BCB_WITH_ROGUE_WAVE |
---|
34 | #elif __BORLANDC__ < 0x570 |
---|
35 | # define BOOST_BCB_WITH_STLPORT |
---|
36 | #else |
---|
37 | # define BOOST_BCB_WITH_DINKUMWARE |
---|
38 | #endif |
---|
39 | |
---|
40 | // |
---|
41 | // Version 5.0 and below: |
---|
42 | # if __BORLANDC__ <= 0x0550 |
---|
43 | // Borland C++Builder 4 and 5: |
---|
44 | # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS |
---|
45 | # if __BORLANDC__ == 0x0550 |
---|
46 | // Borland C++Builder 5, command-line compiler 5.5: |
---|
47 | # define BOOST_NO_OPERATORS_IN_NAMESPACE |
---|
48 | # endif |
---|
49 | # endif |
---|
50 | |
---|
51 | // Version 5.51 and below: |
---|
52 | #if (__BORLANDC__ <= 0x551) |
---|
53 | # define BOOST_NO_CV_SPECIALIZATIONS |
---|
54 | # define BOOST_NO_CV_VOID_SPECIALIZATIONS |
---|
55 | # define BOOST_NO_DEDUCED_TYPENAME |
---|
56 | // workaround for missing WCHAR_MAX/WCHAR_MIN: |
---|
57 | #include <climits> |
---|
58 | #include <cwchar> |
---|
59 | #ifndef WCHAR_MAX |
---|
60 | # define WCHAR_MAX 0xffff |
---|
61 | #endif |
---|
62 | #ifndef WCHAR_MIN |
---|
63 | # define WCHAR_MIN 0 |
---|
64 | #endif |
---|
65 | #endif |
---|
66 | |
---|
67 | // Borland C++ Builder 6 and below: |
---|
68 | #if (__BORLANDC__ <= 0x564) |
---|
69 | |
---|
70 | # ifdef NDEBUG |
---|
71 | // fix broken <cstring> so that Boost.test works: |
---|
72 | # include <cstring> |
---|
73 | # undef strcmp |
---|
74 | # endif |
---|
75 | // fix broken errno declaration: |
---|
76 | # include <errno.h> |
---|
77 | # ifndef errno |
---|
78 | # define errno errno |
---|
79 | # endif |
---|
80 | |
---|
81 | #endif |
---|
82 | |
---|
83 | // |
---|
84 | // new bug in 5.61: |
---|
85 | #if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580) |
---|
86 | // this seems to be needed by the command line compiler, but not the IDE: |
---|
87 | # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS |
---|
88 | #endif |
---|
89 | |
---|
90 | // Borland C++ Builder 2006 Update 2 and below: |
---|
91 | #if (__BORLANDC__ <= 0x582) |
---|
92 | # define BOOST_NO_SFINAE |
---|
93 | # define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG |
---|
94 | # define BOOST_NO_TEMPLATE_TEMPLATES |
---|
95 | |
---|
96 | # define BOOST_NO_PRIVATE_IN_AGGREGATE |
---|
97 | |
---|
98 | # ifdef _WIN32 |
---|
99 | # define BOOST_NO_SWPRINTF |
---|
100 | # elif defined(linux) || defined(__linux__) || defined(__linux) |
---|
101 | // we should really be able to do without this |
---|
102 | // but the wcs* functions aren't imported into std:: |
---|
103 | # define BOOST_NO_STDC_NAMESPACE |
---|
104 | // _CPPUNWIND doesn't get automatically set for some reason: |
---|
105 | # pragma defineonoption BOOST_CPPUNWIND -x |
---|
106 | # endif |
---|
107 | #endif |
---|
108 | |
---|
109 | #if (__BORLANDC__ <= 0x613) // Beman has asked Alisdair for more info |
---|
110 | // we shouldn't really need this - but too many things choke |
---|
111 | // without it, this needs more investigation: |
---|
112 | # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS |
---|
113 | # define BOOST_NO_IS_ABSTRACT |
---|
114 | # define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS |
---|
115 | # define BOOST_NO_USING_TEMPLATE |
---|
116 | # define BOOST_SP_NO_SP_CONVERTIBLE |
---|
117 | |
---|
118 | // Temporary workaround |
---|
119 | #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS |
---|
120 | #endif |
---|
121 | |
---|
122 | // Borland C++ Builder 2008 and below: |
---|
123 | # define BOOST_NO_INTEGRAL_INT64_T |
---|
124 | # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL |
---|
125 | # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS |
---|
126 | # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS |
---|
127 | # define BOOST_NO_TWO_PHASE_NAME_LOOKUP |
---|
128 | # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE |
---|
129 | # define BOOST_NO_NESTED_FRIENDSHIP |
---|
130 | # define BOOST_NO_TYPENAME_WITH_CTOR |
---|
131 | #if (__BORLANDC__ < 0x600) |
---|
132 | # define BOOST_ILLEGAL_CV_REFERENCES |
---|
133 | #endif |
---|
134 | |
---|
135 | // |
---|
136 | // Positive Feature detection |
---|
137 | // |
---|
138 | // Borland C++ Builder 2008 and below: |
---|
139 | #if (__BORLANDC__ >= 0x599) |
---|
140 | # pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax |
---|
141 | #endif |
---|
142 | // |
---|
143 | // C++0x Macros: |
---|
144 | // |
---|
145 | #if !defined( BOOST_CODEGEAR_0X_SUPPORT ) || (__BORLANDC__ < 0x610) |
---|
146 | # define BOOST_NO_CHAR16_T |
---|
147 | # define BOOST_NO_CHAR32_T |
---|
148 | # define BOOST_NO_DECLTYPE |
---|
149 | # define BOOST_NO_EXPLICIT_CONVERSION_OPERATORS |
---|
150 | # define BOOST_NO_EXTERN_TEMPLATE |
---|
151 | # define BOOST_NO_RVALUE_REFERENCES |
---|
152 | # define BOOST_NO_SCOPED_ENUMS |
---|
153 | # define BOOST_NO_STATIC_ASSERT |
---|
154 | #else |
---|
155 | # define BOOST_HAS_ALIGNOF |
---|
156 | # define BOOST_HAS_CHAR16_T |
---|
157 | # define BOOST_HAS_CHAR32_T |
---|
158 | # define BOOST_HAS_DECLTYPE |
---|
159 | # define BOOST_HAS_EXPLICIT_CONVERSION_OPS |
---|
160 | # define BOOST_HAS_REF_QUALIFIER |
---|
161 | # define BOOST_HAS_RVALUE_REFS |
---|
162 | # define BOOST_HAS_STATIC_ASSERT |
---|
163 | #endif |
---|
164 | |
---|
165 | #define BOOST_NO_AUTO_DECLARATIONS |
---|
166 | #define BOOST_NO_AUTO_MULTIDECLARATIONS |
---|
167 | #define BOOST_NO_CONCEPTS |
---|
168 | #define BOOST_NO_CONSTEXPR |
---|
169 | #define BOOST_NO_DEFAULTED_FUNCTIONS |
---|
170 | #define BOOST_NO_DELETED_FUNCTIONS |
---|
171 | #define BOOST_NO_FUNCTION_TEMPLATE_DEFAULT_ARGS |
---|
172 | #define BOOST_NO_INITIALIZER_LISTS |
---|
173 | #define BOOST_NO_LAMBDAS |
---|
174 | #define BOOST_NO_NULLPTR |
---|
175 | #define BOOST_NO_RAW_LITERALS |
---|
176 | #define BOOST_NO_RVALUE_REFERENCES |
---|
177 | #define BOOST_NO_SCOPED_ENUMS |
---|
178 | #define BOOST_NO_SFINAE_EXPR |
---|
179 | #define BOOST_NO_TEMPLATE_ALIASES |
---|
180 | #define BOOST_NO_UNICODE_LITERALS // UTF-8 still not supported |
---|
181 | #define BOOST_NO_VARIADIC_TEMPLATES |
---|
182 | |
---|
183 | #if __BORLANDC__ >= 0x590 |
---|
184 | # define BOOST_HAS_TR1_HASH |
---|
185 | |
---|
186 | # define BOOST_HAS_MACRO_USE_FACET |
---|
187 | #endif |
---|
188 | |
---|
189 | // |
---|
190 | // Post 0x561 we have long long and stdint.h: |
---|
191 | #if __BORLANDC__ >= 0x561 |
---|
192 | # ifndef __NO_LONG_LONG |
---|
193 | # define BOOST_HAS_LONG_LONG |
---|
194 | # else |
---|
195 | # define BOOST_NO_LONG_LONG |
---|
196 | # endif |
---|
197 | // On non-Win32 platforms let the platform config figure this out: |
---|
198 | # ifdef _WIN32 |
---|
199 | # define BOOST_HAS_STDINT_H |
---|
200 | # endif |
---|
201 | #endif |
---|
202 | |
---|
203 | // Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is |
---|
204 | // defined, then we have 0x560 or greater with the Rogue Wave implementation |
---|
205 | // which presumably has the std::DBL_MAX bug. |
---|
206 | #if defined( BOOST_BCB_WITH_ROGUE_WAVE ) |
---|
207 | // <climits> is partly broken, some macros define symbols that are really in |
---|
208 | // namespace std, so you end up having to use illegal constructs like |
---|
209 | // std::DBL_MAX, as a fix we'll just include float.h and have done with: |
---|
210 | #include <float.h> |
---|
211 | #endif |
---|
212 | // |
---|
213 | // __int64: |
---|
214 | // |
---|
215 | #if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__) |
---|
216 | # define BOOST_HAS_MS_INT64 |
---|
217 | #endif |
---|
218 | // |
---|
219 | // check for exception handling support: |
---|
220 | // |
---|
221 | #if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS) && !defined(BOOST_NO_EXCEPTIONS) |
---|
222 | # define BOOST_NO_EXCEPTIONS |
---|
223 | #endif |
---|
224 | // |
---|
225 | // all versions have a <dirent.h>: |
---|
226 | // |
---|
227 | #ifndef __STRICT_ANSI__ |
---|
228 | # define BOOST_HAS_DIRENT_H |
---|
229 | #endif |
---|
230 | // |
---|
231 | // all versions support __declspec: |
---|
232 | // |
---|
233 | #if defined(__STRICT_ANSI__) |
---|
234 | // config/platform/win32.hpp will define BOOST_SYMBOL_EXPORT, etc., unless already defined |
---|
235 | # define BOOST_SYMBOL_EXPORT |
---|
236 | #endif |
---|
237 | // |
---|
238 | // ABI fixing headers: |
---|
239 | // |
---|
240 | #if __BORLANDC__ != 0x600 // not implemented for version 6 compiler yet |
---|
241 | #ifndef BOOST_ABI_PREFIX |
---|
242 | # define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp" |
---|
243 | #endif |
---|
244 | #ifndef BOOST_ABI_SUFFIX |
---|
245 | # define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp" |
---|
246 | #endif |
---|
247 | #endif |
---|
248 | // |
---|
249 | // Disable Win32 support in ANSI mode: |
---|
250 | // |
---|
251 | #if __BORLANDC__ < 0x600 |
---|
252 | # pragma defineonoption BOOST_DISABLE_WIN32 -A |
---|
253 | #elif defined(__STRICT_ANSI__) |
---|
254 | # define BOOST_DISABLE_WIN32 |
---|
255 | #endif |
---|
256 | // |
---|
257 | // MSVC compatibility mode does some nasty things: |
---|
258 | // TODO: look up if this doesn't apply to the whole 12xx range |
---|
259 | // |
---|
260 | #if defined(_MSC_VER) && (_MSC_VER <= 1200) |
---|
261 | # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP |
---|
262 | # define BOOST_NO_VOID_RETURNS |
---|
263 | #endif |
---|
264 | |
---|
265 | // Borland did not implement value-initialization completely, as I reported |
---|
266 | // in 2007, Borland Report 51854, "Value-initialization: POD struct should be |
---|
267 | // zero-initialized", http://qc.embarcadero.com/wc/qcmain.aspx?d=51854 |
---|
268 | // See also: http://www.boost.org/libs/utility/value_init.htm#compiler_issues |
---|
269 | // (Niels Dekker, LKEB, April 2010) |
---|
270 | #define BOOST_NO_COMPLETE_VALUE_INITIALIZATION |
---|
271 | |
---|
272 | #define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__) |
---|
273 | |
---|
274 | |
---|
275 | |
---|