$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
From: AlisdairM (alisdair.meredith_at_[hidden])
Date: 2006-02-26 06:53:46
The new Borland compiler requires updates to workarounds in 4 files,
for the new version number.
I have migrated the Borland tests to the BOOST_WORKAROUND syntax, so I
can use BOOST_TESTED_AT. This means the workarounds will apply for
updated compilers in the future, without waiting for another boost
cycle for more compatibility patches.
I also use the new library detection macros added to the Borland
compiler config last night.
Patches below, OK to commit?
Or would you prefer to review/apply yourself?
--
AlisdairM
cvs diff -u -wb -- boost\date_time\compiler_config.hpp
boost\date_time\locale_config.hpp boost\date_time\string_parse_tree.hpp
boost\date_time\time_system_split.hpp (in directory
E:\sourceforge\devel\boost\)
Index: boost/date_time/compiler_config.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/date_time/compiler_config.hpp,v
retrieving revision 1.43
diff -u -w -b -r1.43 compiler_config.hpp
--- boost/date_time/compiler_config.hpp 25 Aug 2005 16:27:20 -0000 1.43
+++ boost/date_time/compiler_config.hpp 26 Feb 2006 09:35:56 -0000
@@ -8,15 +8,18 @@
* $Date: 2005/08/25 16:27:20 $
*/
+ #include "boost/detail/workaround.hpp"
// With boost release 1.33, date_time will be using a different,
// more flexible, IO system. This new system is not compatible with
// old compilers. The original date_time IO system remains for those
// compilers. They must define this macro to use the legacy IO.
-#if ((defined(__GNUC__) && (__GNUC__ < 3)) || \
- (defined(_MSC_VER) && (_MSC_VER <= 1300) ) || \
- (defined(__BORLANDC__) && (__BORLANDC__ <= 0x0564) ) ) && \
- !defined(USE_DATE_TIME_PRE_1_33_FACET_IO)
+// (defined(__BORLANDC__) && (__BORLANDC__ <= 0x0581) ) ) &&
+ #if( BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) \
+ || BOOST_WORKAROUND( __GNUC__, < 3) \
+ || (BOOST_WORKAROUND( _MSC_VER, <= 1300) ) \
+ ) \
+ && !defined(USE_DATE_TIME_PRE_1_33_FACET_IO)
#define USE_DATE_TIME_PRE_1_33_FACET_IO
#endif
@@ -41,7 +44,7 @@
#undef BOOST_DATE_TIME_OPTIONAL_GREGORIAN_TYPES
#endif
-#if (defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) ||
(defined(__BORLANDC__)))
+#if (defined(BOOST_NO_INCLASS_MEMBER_INITIALIZATION) ||
BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) ) )
#define BOOST_DATE_TIME_NO_MEMBER_INIT
#endif
@@ -55,13 +58,13 @@
/* Workaround for Borland iterator error. Error was "Cannot convert
'istream *' to 'wistream *' in function
istream_iterator<>::istream_iterator() */
-#if defined(__BORLANDC__) && (__BORLANDC__ <= 0x0551)
+#if defined(__BORLANDC__) && defined(BOOST_BCB_WITH_RW_LIB)
#define BOOST_DATE_TIME_NO_WISTREAM_ITERATOR
#endif
// Borland v5.64 does not have the following in std namespace; v5.5.1
does
-#if defined(__BORLANDC__) && (__BORLANDC__ >= 0x0564)
+#if defined(__BORLANDC__) && defined(BOOST_BCB_WITH_STLPORT)
#include <locale>
namespace std {
using stlport::tolower;
@@ -78,7 +81,7 @@
#if (((defined(__GNUC__) && (__GNUC__ < 3)) || \
(defined(_MSC_VER) && (_MSC_VER < 1300)) ) && \
!defined(_STLP_OWN_IOSTREAMS) ) || \
- defined(__BORLANDC__)
+ BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) )
#define BOOST_DATE_TIME_INCLUDE_LIMITED_HEADERS
#endif
Index: boost/date_time/locale_config.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/date_time/locale_config.hpp,v
retrieving revision 1.4
diff -u -w -b -r1.4 locale_config.hpp
--- boost/date_time/locale_config.hpp 25 Aug 2005 16:27:20 -0000 1.4
+++ boost/date_time/locale_config.hpp 25 Feb 2006 20:29:22 -0000
@@ -19,9 +19,12 @@
#include "boost/config.hpp" //sets BOOST_NO_STD_LOCALE
//This file basically becomes a noop if locales are not properly
supported
-#if (defined(BOOST_NO_STD_LOCALE) || (defined(BOOST_MSVC) && (_MSC_VER
< 1300)) || (defined(__BORLANDC__) && (__BORLANDC__ < 0x564 )))
+#if (defined(BOOST_NO_STD_LOCALE) \
+ || (BOOST_WORKAROUND( BOOST_MSVC, < 1300)) \
+ || (BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x581 )) ) )
#define BOOST_DATE_TIME_NO_LOCALE
#endif
#endif
+
Index: boost/date_time/string_parse_tree.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/date_time/string_parse_tree.hpp,v
retrieving revision 1.6
diff -u -w -b -r1.6 string_parse_tree.hpp
--- boost/date_time/string_parse_tree.hpp 1 Jul 2005 02:58:57 -0000 1.6
+++ boost/date_time/string_parse_tree.hpp 26 Feb 2006 09:42:04 -0000
@@ -83,7 +83,11 @@
template<typename charT>
struct string_parse_tree
{
+#if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0x581) )
+ typedef std::multimap<charT, string_parse_tree< charT> > ptree_coll;
+#else
typedef std::multimap<charT, string_parse_tree> ptree_coll;
+#endif
typedef typename ptree_coll::value_type value_type;
typedef typename ptree_coll::iterator iterator;
typedef typename ptree_coll::const_iterator const_iterator;
Index: boost/date_time/time_system_split.hpp
===================================================================
RCS file: /cvsroot/boost/boost/boost/date_time/time_system_split.hpp,v
retrieving revision 1.13
diff -u -w -b -r1.13 time_system_split.hpp
--- boost/date_time/time_system_split.hpp 25 May 2005 14:15:40 -0000
1.13
+++ boost/date_time/time_system_split.hpp 26 Feb 2006 10:12:58 -0000
@@ -40,8 +40,12 @@
private:
BOOST_STATIC_CONSTANT(int_type, ticks_per_day = INT64_C(86400) *
config::tick_per_second);
public:
+# if BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT(0X581) )
+ typedef date_time::wrapping_int< split_timedate_system::int_type,
split_timedate_system::ticks_per_day> wrap_int_type;
+# else
typedef date_time::wrapping_int<int_type, ticks_per_day>
wrap_int_type;
#endif
+#endif
static time_rep_type get_time_rep(special_values sv)
{