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 and checked version is 0x600 (Builder X preview)
|
---|
20 | // or 0x593 (CodeGear C++ Builder 2007 December 2007 update):
|
---|
21 | #if (__BORLANDC__ > 0x593) && (__BORLANDC__ != 0x600)
|
---|
22 | //# if defined(BOOST_ASSERT_CONFIG)
|
---|
23 | # error "Unknown compiler version - please run the configure tests and report the results"
|
---|
24 | //# else
|
---|
25 | //# pragma message( "Unknown compiler version - please run the configure tests and report the results")
|
---|
26 | //# endif
|
---|
27 | #elif (__BORLANDC__ == 0x600)
|
---|
28 | # error "CBuilderX preview compiler is no longer supported"
|
---|
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 | // Version 5.0 and below:
|
---|
43 | # if __BORLANDC__ <= 0x0550
|
---|
44 | // Borland C++Builder 4 and 5:
|
---|
45 | # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
---|
46 | # if __BORLANDC__ == 0x0550
|
---|
47 | // Borland C++Builder 5, command-line compiler 5.5:
|
---|
48 | # define BOOST_NO_OPERATORS_IN_NAMESPACE
|
---|
49 | # endif
|
---|
50 | # endif
|
---|
51 |
|
---|
52 | // Version 5.51 and below:
|
---|
53 | #if (__BORLANDC__ <= 0x551)
|
---|
54 | # define BOOST_NO_CV_SPECIALIZATIONS
|
---|
55 | # define BOOST_NO_CV_VOID_SPECIALIZATIONS
|
---|
56 | # define BOOST_NO_DEDUCED_TYPENAME
|
---|
57 | // workaround for missing WCHAR_MAX/WCHAR_MIN:
|
---|
58 | #include <climits>
|
---|
59 | #include <cwchar>
|
---|
60 | #ifndef WCHAR_MAX
|
---|
61 | # define WCHAR_MAX 0xffff
|
---|
62 | #endif
|
---|
63 | #ifndef WCHAR_MIN
|
---|
64 | # define WCHAR_MIN 0
|
---|
65 | #endif
|
---|
66 | #endif
|
---|
67 |
|
---|
68 | // Borland C++ Builder 6 and below:
|
---|
69 | #if (__BORLANDC__ <= 0x564)
|
---|
70 | # define BOOST_NO_INTEGRAL_INT64_T
|
---|
71 |
|
---|
72 | # ifdef NDEBUG
|
---|
73 | // fix broken <cstring> so that Boost.test works:
|
---|
74 | # include <cstring>
|
---|
75 | # undef strcmp
|
---|
76 | # endif
|
---|
77 | // fix broken errno declaration:
|
---|
78 | # include <errno.h>
|
---|
79 | # ifndef errno
|
---|
80 | # define errno errno
|
---|
81 | # endif
|
---|
82 |
|
---|
83 | #endif
|
---|
84 |
|
---|
85 | //
|
---|
86 | // new bug in 5.61:
|
---|
87 | #if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580)
|
---|
88 | // this seems to be needed by the command line compiler, but not the IDE:
|
---|
89 | # define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
|
---|
90 | #endif
|
---|
91 |
|
---|
92 | // Borland C++ Builder 2006 Update 2 and below:
|
---|
93 | #if (__BORLANDC__ <= 0x582)
|
---|
94 | # define BOOST_NO_SFINAE
|
---|
95 | # define BOOST_BCB_PARTIAL_SPECIALIZATION_BUG
|
---|
96 | # define BOOST_NO_TEMPLATE_TEMPLATES
|
---|
97 |
|
---|
98 | # define BOOST_NO_PRIVATE_IN_AGGREGATE
|
---|
99 |
|
---|
100 | # ifdef _WIN32
|
---|
101 | # define BOOST_NO_SWPRINTF
|
---|
102 | # elif defined(linux) || defined(__linux__) || defined(__linux)
|
---|
103 | // we should really be able to do without this
|
---|
104 | // but the wcs* functions aren't imported into std::
|
---|
105 | # define BOOST_NO_STDC_NAMESPACE
|
---|
106 | // _CPPUNWIND doesn't get automatically set for some reason:
|
---|
107 | # pragma defineonoption BOOST_CPPUNWIND -x
|
---|
108 | # endif
|
---|
109 | #endif
|
---|
110 |
|
---|
111 | // Borland C++ Builder 2007 December 2007 Update and below:
|
---|
112 | #if (__BORLANDC__ <= 0x593)
|
---|
113 | // we shouldn't really need this - but too many things choke
|
---|
114 | // without it, this needs more investigation:
|
---|
115 | # define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
|
---|
116 | # define BOOST_NO_IS_ABSTRACT
|
---|
117 | # define BOOST_NO_FUNCTION_TYPE_SPECIALIZATIONS
|
---|
118 |
|
---|
119 | // Temporary workaround
|
---|
120 | #define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
|
---|
121 | #endif
|
---|
122 |
|
---|
123 | // Borland C++ Builder 2008 and below:
|
---|
124 | #if (__BORLANDC__ <= 0x601)
|
---|
125 | # define BOOST_FUNCTION_SCOPE_USING_DECLARATION_BREAKS_ADL
|
---|
126 | # define BOOST_ILLEGAL_CV_REFERENCES
|
---|
127 | # define BOOST_NO_DEPENDENT_NESTED_DERIVATIONS
|
---|
128 | # define BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
---|
129 | # define BOOST_NO_TWO_PHASE_NAME_LOOKUP
|
---|
130 | # define BOOST_NO_USING_TEMPLATE
|
---|
131 | # define BOOST_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
|
---|
132 | #endif
|
---|
133 |
|
---|
134 | //
|
---|
135 | // Positive Feature detection
|
---|
136 | //
|
---|
137 | // Borland C++ Builder 2008 and below:
|
---|
138 | #if (__BORLANDC__ >= 0x599)
|
---|
139 | # pragma defineonoption BOOST_CODEGEAR_0X_SUPPORT -Ax
|
---|
140 | #endif
|
---|
141 |
|
---|
142 | #if defined( BOOST_CODEGEAR_0X_SUPPORT )
|
---|
143 | # #if __BORLANDC__ >= 0x610
|
---|
144 | # define BOOST_HAS_ALIGNOF
|
---|
145 | # define BOOST_HAS_CHAR16_T
|
---|
146 | # define BOOST_HAS_CHAR32_T
|
---|
147 | # define BOOST_HAS_DECLTYPE
|
---|
148 | //# define BOOST_HAS_DEFAULTED_FN
|
---|
149 | //# define BOOST_HAS_DELETED_FN
|
---|
150 | # define BOOST_HAS_EXPLICIT_CONVERSION_OPS
|
---|
151 | //# define BOOST_HAS_NULLPTR
|
---|
152 | //# define BOOST_HAS_RAW_STRING
|
---|
153 | # define BOOST_HAS_REF_QUALIFIER
|
---|
154 | # define BOOST_HAS_RVALUE_REFS
|
---|
155 | //# define BOOST_HAS_SCOPED_ENUM
|
---|
156 | # define BOOST_HAS_STATIC_ASSERT
|
---|
157 | //# define BOOST_HAS_VARIADIC_TMPL
|
---|
158 | # #endif //__BORLANDC__ >= 0x610
|
---|
159 | #endif
|
---|
160 |
|
---|
161 | #if __BORLANDC__ >= 0x590
|
---|
162 | # define BOOST_HAS_TR1_HASH
|
---|
163 |
|
---|
164 | # define BOOST_HAS_MACRO_USE_FACET
|
---|
165 | #endif
|
---|
166 |
|
---|
167 | //
|
---|
168 | // Post 0x561 we have long long and stdint.h:
|
---|
169 | #if __BORLANDC__ >= 0x561
|
---|
170 | # ifndef __NO_LONG_LONG
|
---|
171 | # define BOOST_HAS_LONG_LONG
|
---|
172 | # endif
|
---|
173 | // On non-Win32 platforms let the platform config figure this out:
|
---|
174 | # ifdef _WIN32
|
---|
175 | # define BOOST_HAS_STDINT_H
|
---|
176 | # endif
|
---|
177 | #endif
|
---|
178 |
|
---|
179 | // Borland C++Builder 6 defaults to using STLPort. If _USE_OLD_RW_STL is
|
---|
180 | // defined, then we have 0x560 or greater with the Rogue Wave implementation
|
---|
181 | // which presumably has the std::DBL_MAX bug.
|
---|
182 | #if defined( BOOST_BCB_WITH_ROGUE_WAVE )
|
---|
183 | // <climits> is partly broken, some macros define symbols that are really in
|
---|
184 | // namespace std, so you end up having to use illegal constructs like
|
---|
185 | // std::DBL_MAX, as a fix we'll just include float.h and have done with:
|
---|
186 | #include <float.h>
|
---|
187 | #endif
|
---|
188 | //
|
---|
189 | // __int64:
|
---|
190 | //
|
---|
191 | #if (__BORLANDC__ >= 0x530) && !defined(__STRICT_ANSI__)
|
---|
192 | # define BOOST_HAS_MS_INT64
|
---|
193 | #endif
|
---|
194 | //
|
---|
195 | // check for exception handling support:
|
---|
196 | //
|
---|
197 | #if !defined(_CPPUNWIND) && !defined(BOOST_CPPUNWIND) && !defined(__EXCEPTIONS)
|
---|
198 | # define BOOST_NO_EXCEPTIONS
|
---|
199 | #endif
|
---|
200 | //
|
---|
201 | // all versions have a <dirent.h>:
|
---|
202 | //
|
---|
203 | #ifndef __STRICT_ANSI__
|
---|
204 | # define BOOST_HAS_DIRENT_H
|
---|
205 | #endif
|
---|
206 | //
|
---|
207 | // all versions support __declspec:
|
---|
208 | //
|
---|
209 | #ifndef __STRICT_ANSI__
|
---|
210 | # define BOOST_HAS_DECLSPEC
|
---|
211 | #endif
|
---|
212 | //
|
---|
213 | // ABI fixing headers:
|
---|
214 | //
|
---|
215 | #if __BORLANDC__ < 0x600 // not implemented for version 6 compiler yet
|
---|
216 | #ifndef BOOST_ABI_PREFIX
|
---|
217 | # define BOOST_ABI_PREFIX "boost/config/abi/borland_prefix.hpp"
|
---|
218 | #endif
|
---|
219 | #ifndef BOOST_ABI_SUFFIX
|
---|
220 | # define BOOST_ABI_SUFFIX "boost/config/abi/borland_suffix.hpp"
|
---|
221 | #endif
|
---|
222 | #endif
|
---|
223 | //
|
---|
224 | // Disable Win32 support in ANSI mode:
|
---|
225 | //
|
---|
226 | #if __BORLANDC__ < 0x600
|
---|
227 | # pragma defineonoption BOOST_DISABLE_WIN32 -A
|
---|
228 | #elif defined(__STRICT_ANSI__)
|
---|
229 | # define BOOST_DISABLE_WIN32
|
---|
230 | #endif
|
---|
231 | //
|
---|
232 | // MSVC compatibility mode does some nasty things:
|
---|
233 | // TODO: look up if this doesn't apply to the whole 12xx range
|
---|
234 | //
|
---|
235 | #if defined(_MSC_VER) && (_MSC_VER <= 1200)
|
---|
236 | # define BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP
|
---|
237 | # define BOOST_NO_VOID_RETURNS
|
---|
238 | #endif
|
---|
239 |
|
---|
240 | #define BOOST_COMPILER "Borland C++ version " BOOST_STRINGIZE(__BORLANDC__)
|
---|
241 |
|
---|
242 |
|
---|
243 |
|
---|