Boost logo

Boost :

From: AlisdairM (alisdair.meredith_at_[hidden])
Date: 2006-02-25 08:53:56


This is the second half of my proposed config update for the Borland
2006 compiler. Main changes are:

i/ pragma to warn users that old compiler support is deprecated in
Boost 1.34.
ii/ Unknown compiler test moved from end of file to start, where it
keeps company with the unsupported compiler tests.

iii/ Library detection macros should simplify workaround detection.
With 3 different vendors to support across different versions, and
library selection further controlled by _USE_OLD_RW_STL macro, we need
something simpler like this for library maintainers to test.

I will be posting further patches using these library macros once this
patch is accepted, and I see a test cycle from metacomm showing no
unexpected problems.

-- 
AlisdairM
cvs diff -u -wb -- boost\config\compiler\borland.hpp (in directory
E:\sourceforge\devel\boost\)
Index: boost/config/compiler/borland.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/config/compiler/borland.hpp,v
retrieving revision 1.37
diff -u -w -b -r1.37 borland.hpp
--- boost/config/compiler/borland.hpp	12 Feb 2006 10:42:10 -0000	1.37
+++ boost/config/compiler/borland.hpp	25 Feb 2006 13:24:48 -0000
@@ -14,8 +14,31 @@
 // we don't support Borland prior to version 5.4:
 #if __BORLANDC__ < 0x540
 #  error "Compiler not supported or configured - please reconfigure"
+#elif __BORLANDC__ < 0x581
+#  pragma message( "Support for Borland compilers older than BCB2006
is deprecated in Boost 1.34" )
 #endif
 
+// last known and checked version is 0x600 (Builder X preview)
+// Or 0x581 (Borland C++ Builder 2006 Update 1):
+#if (__BORLANDC__ > 0x581) && (__BORLANDC__ != 0x600)
+#  if defined(BOOST_ASSERT_CONFIG)
+#     error "Unknown compiler version - please run the configure tests
and report the results"
+#  else
+#     pragma message( "Unknown compiler version - please run the
configure tests and report the results")
+#  endif
+#endif
+
+//
+// Support macros to help with standard library detection
+#if (__BORLANDC__ < 0x560) || defined(_USE_OLD_RW_STL)
+#  define BOOST_BCB_WITH_ROGUE_WAVE
+#elif __BORLANDC__ < 0x570
+#  define BOOST_BCB_WITH_STLPORT
+#else
+#  define BOOST_BCB_WITH_DINKUMWARE
+#endif
+
+
 //
 // Version 5.0 and below:
 #   if __BORLANDC__ <= 0x0550
@@ -74,7 +97,7 @@
 
 //
 // new bug in 5.61:
-#if (__BORLANDC__ >= 0x561) //&& (__BORLANDC__ <= 0x570)
+#if (__BORLANDC__ >= 0x561) && (__BORLANDC__ <= 0x580)
    // this seems to be needed by the command line compiler, but not
the IDE:
 #  define BOOST_NO_MEMBER_FUNCTION_SPECIALIZATIONS
 #endif
@@ -105,7 +128,7 @@
 // Borland C++Builder 6 defaults to using STLPort.  If _USE_OLD_RW_STL
is
 // defined, then we have 0x560 or greater with the Rogue Wave
implementation
 // which presumably has the std::DBL_MAX bug.
-#if ((__BORLANDC__ >= 0x550) && (__BORLANDC__ < 0x560)) ||
defined(_USE_OLD_RW_STL)
+#if defined( BOOST_BCB_WITH_ROGUE_WAVE )
 // <climits> is partly broken, some macros define symbols that are
really in
 // namespace std, so you end up having to use illegal constructs like
 // std::DBL_MAX, as a fix we'll just include float.h and have done
with:
@@ -165,21 +188,3 @@
 
 #define BOOST_COMPILER "Borland C++ version "
BOOST_STRINGIZE(__BORLANDC__)
 
-// last known and checked version is 1536 (Builder X preview)
-// Or 0x581 (Borland C++ Builder 2006 Update 1):
-#if (__BORLANDC__ > 0x581) && (__BORLANDC__ != 0x600)
-#  if defined(BOOST_ASSERT_CONFIG)
-#     error "Unknown compiler version - please run the configure tests
and report the results"
-#  else
-#     pragma message( "Unknown compiler version - please run the
configure tests and report the results")
-#  endif
-#endif
-
-
-
-
-
-
-
-
-

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk