source: NonGTP/Boost/boost/config/compiler/borland.hpp @ 857

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