$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r55477 - in branches/release: boost/wave boost/wave/cpplexer boost/wave/cpplexer/re2clex boost/wave/util libs/wave
From: hartmut.kaiser_at_[hidden]
Date: 2009-08-08 18:08:01
Author: hkaiser
Date: 2009-08-08 18:08:00 EDT (Sat, 08 Aug 2009)
New Revision: 55477
URL: http://svn.boost.org/trac/boost/changeset/55477
Log:
Wave: merged most urgent patches from trunk
Text files modified: 
   branches/release/boost/wave/cpplexer/cpp_lex_token.hpp          |     3                                         
   branches/release/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp |     6                                         
   branches/release/boost/wave/util/cpp_include_paths.hpp          |     8                                         
   branches/release/boost/wave/util/cpp_macromap.hpp               |    13 +                                       
   branches/release/boost/wave/util/flex_string.hpp                |   251 ++++++++++++++++++++++++++++++--------- 
   branches/release/boost/wave/util/unput_queue_iterator.hpp       |     4                                         
   branches/release/boost/wave/wave_config.hpp                     |    57 ++++----                                
   branches/release/boost/wave/wave_version.hpp                    |     4                                         
   branches/release/libs/wave/ChangeLog                            |    10 +                                       
   9 files changed, 252 insertions(+), 104 deletions(-)
Modified: branches/release/boost/wave/cpplexer/cpp_lex_token.hpp
==============================================================================
--- branches/release/boost/wave/cpplexer/cpp_lex_token.hpp	(original)
+++ branches/release/boost/wave/cpplexer/cpp_lex_token.hpp	2009-08-08 18:08:00 EDT (Sat, 08 Aug 2009)
@@ -23,6 +23,7 @@
 
 #include <boost/throw_exception.hpp>
 #include <boost/pool/singleton_pool.hpp>
+#include <boost/detail/atomic_count.hpp>
 
 // this must occur after all of the includes and before any code appears
 #ifdef BOOST_HAS_ABI_HEADERS
@@ -131,7 +132,7 @@
     token_id id;                // the token id
     string_type value;          // the text, which was parsed into this token
     position_type pos;          // the original file position
-    std::size_t refcnt;
+    boost::detail::atomic_count refcnt;
 };
 
 ///////////////////////////////////////////////////////////////////////////////
Modified: branches/release/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp
==============================================================================
--- branches/release/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp	(original)
+++ branches/release/boost/wave/cpplexer/re2clex/cpp_re2c_lexer.hpp	2009-08-08 18:08:00 EDT (Sat, 08 Aug 2009)
@@ -101,7 +101,11 @@
     include_guards<token_type> guards;
 #endif
         
+#if BOOST_WAVE_SUPPORT_THREADING == 0
     static token_cache<string_type> const cache;
+#else
+    token_cache<string_type> const cache;
+#endif
 };
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -344,11 +348,13 @@
     lexer<IteratorT, PositionT> re2c_lexer;
 };
 
+#if BOOST_WAVE_SUPPORT_THREADING == 0
 ///////////////////////////////////////////////////////////////////////////////
 template <typename IteratorT, typename PositionT>
 token_cache<typename lexer<IteratorT, PositionT>::string_type> const
     lexer<IteratorT, PositionT>::cache = 
         token_cache<typename lexer<IteratorT, PositionT>::string_type>();
+#endif
     
 }   // namespace re2clex
 
Modified: branches/release/boost/wave/util/cpp_include_paths.hpp
==============================================================================
--- branches/release/boost/wave/util/cpp_include_paths.hpp	(original)
+++ branches/release/boost/wave/util/cpp_include_paths.hpp	2009-08-08 18:08:00 EDT (Sat, 08 Aug 2009)
@@ -57,10 +57,10 @@
 {
     typedef std::pair<FromType, ToType> value_type;
 
-#if defined(BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS) ||\
-    defined(BOOST_MSVC)&&(BOOST_MSVC<1300) ||\
-    defined(BOOST_INTEL_CXX_VERSION)&&defined(_MSC_VER)&&\
-           (BOOST_INTEL_CXX_VERSION<=700)
+// _MSC_FULL_VER == 160020506 detects the VC10 Beta 1 compiler
+#if defined(BOOST_NO_POINTER_TO_MEMBER_TEMPLATE_PARAMETERS) || \
+    defined(BOOST_MSVC) && ((BOOST_MSVC < 1300) || (_MSC_FULL_VER == 160020506)) || \
+    defined(BOOST_INTEL_CXX_VERSION) && defined(_MSC_VER) && (BOOST_INTEL_CXX_VERSION <= 700) 
 
     BOOST_STATIC_CONSTANT(unsigned, from_offset = offsetof(value_type, first));
     BOOST_STATIC_CONSTANT(unsigned, to_offset   = offsetof(value_type, second));
Modified: branches/release/boost/wave/util/cpp_macromap.hpp
==============================================================================
--- branches/release/boost/wave/util/cpp_macromap.hpp	(original)
+++ branches/release/boost/wave/util/cpp_macromap.hpp	2009-08-08 18:08:00 EDT (Sat, 08 Aug 2009)
@@ -862,12 +862,13 @@
         gen_type;
     typedef typename gen_type::return_type iterator_type;
 
-iterator_type first_it = gen_type::generate(first);
-iterator_type last_it = gen_type::generate(last);
-
-on_exit::assign<IteratorT, iterator_type> on_exit(first, first_it);
-ContainerT pending_queue;
-bool seen_newline;
+    ContainerT empty;
+    iterator_type first_it = gen_type::generate(empty, first);
+    iterator_type last_it = gen_type::generate(last);
+
+    on_exit::assign<IteratorT, iterator_type> on_exit(first, first_it);
+    ContainerT pending_queue;
+    bool seen_newline;
     
     while (!pending_queue.empty() || first_it != last_it) {
         expanded.push_back(
Modified: branches/release/boost/wave/util/flex_string.hpp
==============================================================================
--- branches/release/boost/wave/util/flex_string.hpp	(original)
+++ branches/release/boost/wave/util/flex_string.hpp	2009-08-08 18:08:00 EDT (Sat, 08 Aug 2009)
@@ -26,6 +26,10 @@
 // #HK070307:
 //      - Once again incorporated the changes from Andrei's latest version of 
 //        this class
+//
+// #HK090523:
+//      - Incorporated the changes from latest version of flex_string as 
+//        maintained in Loki
 
 #ifndef FLEX_STRING_INC_
 #define FLEX_STRING_INC_
@@ -1442,9 +1446,10 @@
         }
     private:
         const flex_string& s_;
+        Invariant& operator=(const Invariant&);
     };
 #endif
-    
+
 public:
     // types
     typedef T traits_type;
@@ -1646,8 +1651,7 @@
 #ifndef NDEBUG
         Invariant checker(*this); 
 #endif
-        static std::less_equal<const value_type*> le;
-        if (le(&*begin(), s) && le(s, &*end())) // aliasing
+        if (IsAliasedRange(s, s + n))
         {
             const size_type offset = s - &*begin();
             Storage::reserve(size() + n);
@@ -1760,6 +1764,51 @@
     }
     
 private:
+    // Care must be taken when dereferencing some iterator types.
+    //
+    // Users can implement this function in their namespace if their storage 
+    // uses a special iterator type, the function will be found through ADL.
+    template<class Iterator>
+    const typename std::iterator_traits<Iterator>::value_type* 
+    DereferenceValidIterator(Iterator it) const
+    {
+        return &*it;
+    }
+
+    // Care must be taken when dereferencing a reverse iterators, hence this 
+    // special case. This isn't in the std namespace so as not to pollute it or 
+    // create name clashes.
+    template<typename Iterator>
+    const typename std::iterator_traits<Iterator>::value_type* 
+    DereferenceValidIterator(std::reverse_iterator<Iterator> it) const
+    {
+        return &*--it;
+    }
+
+    // Determine if the range aliases the current string.
+    //
+    // This method cannot be const because calling begin/end on copy-on-write 
+    // implementations must have side effects.
+    // A const version wouldn't make the string unique through this call.
+    template<class Iterator>
+    bool IsAliasedRange(Iterator beginIterator, Iterator endIterator)
+    {
+        if(!empty() && beginIterator != endIterator)
+        {
+            typedef const typename std::iterator_traits<Iterator>::value_type * 
+                pointer;
+
+            pointer myBegin(&*begin());
+            pointer myEnd(&*begin() + size());
+            pointer rangeBegin(DereferenceValidIterator(beginIterator));
+
+            const std::less_equal<pointer> less_equal = std::less_equal<pointer>();
+            if(less_equal(myBegin, rangeBegin) && less_equal(rangeBegin, myEnd))
+                return true;
+        }
+        return false;
+    }
+
     template <int i> class Selector {};
 
     flex_string& InsertImplDiscr(iterator p, 
@@ -1768,24 +1817,32 @@
 #ifndef NDEBUG
         Invariant checker(*this); 
 #endif
-        assert(p >= begin() && p <= end());
-        if (capacity() - size() < n)
+        assert(begin() <= p && p <= end());
+        const size_type insertOffset(p - begin());
+        const size_type originalSize(size());
+        if(n < originalSize - insertOffset)
+        {
+            // The new characters fit within the original string.
+            // The characters that are pushed back need to be moved because 
+            // they're aliased.
+            // The appended characters will all be overwritten by the move.
+            append(n, value_type(0));
+            value_type* begin(&*begin());
+            flex_string_details::pod_move(begin + insertOffset, 
+                begin + originalSize, begin + insertOffset + n);
+            std::fill(begin + insertOffset, begin + insertOffset + n, c);
+        }
+        else
         {
-            const size_type sz = p - begin();
-            reserve(size() + n);
-            p = begin() + sz;
-        }
-        const iterator oldEnd = end();
-        if (p + n < oldEnd)
-        {
-            append(oldEnd - n, oldEnd);
-            flex_string_details::pod_move(&*p, &*oldEnd - n, &*p + n);
-            std::fill(p, p + n, c);
-        }
-        else {
-            append(n - (end() - p), c);
-            append(p, oldEnd);
-            std::fill(p, oldEnd, c);
+            // The new characters exceed the original string.
+            // The characters that are pushed back can simply be copied since 
+            // they aren't aliased.
+            // The appended characters will partly be overwritten by the copy.
+            append(n, c);
+            value_type* begin(&*begin());
+            flex_string_details::pod_copy(begin + insertOffset, 
+                begin + originalSize, begin + insertOffset + n);
+            std::fill(begin + insertOffset, begin + originalSize, c);
         }
         return *this;
     }
@@ -1795,7 +1852,7 @@
         InputIterator b, InputIterator e, Selector<0>)
     { 
         InsertImpl(i, b, e, 
-            std::iterator_traits<InputIterator>::iterator_category());
+            typename std::iterator_traits<InputIterator>::iterator_category());
         return *this;
     }
 
@@ -1803,12 +1860,29 @@
     void InsertImpl(iterator i,
         FwdIterator s1, FwdIterator s2, std::forward_iterator_tag)
     { 
+        if(s1 == s2)
+        {
+            // Insert an empty range.
+            return;
+        }
+
+        if(IsAliasedRange(s1, s2))
+        {
+            // The source range is contained in the current string, copy it 
+            // and recurse.
+            const flex_string temporary(s1, s2);
+            InsertImpl(i, temporary.begin(), temporary.end(),
+                typename std::iterator_traits<FwdIterator>::iterator_category());
+            return;
+        }
+
 #ifndef NDEBUG
         Invariant checker(*this); 
 #endif
         const size_type pos = i - begin();
         const typename std::iterator_traits<FwdIterator>::difference_type n2 = 
             std::distance(s1, s2);
+
         assert(n2 >= 0);
         using namespace flex_string_details;
         assert(pos <= size());
@@ -1817,10 +1891,8 @@
             capacity() - size();
         if (maxn2 < n2)
         {
-            // realloc the string
-            static const std::less_equal<const value_type*> le = 
-                std::less_equal<const value_type*>();
-            assert(!(le(&*begin(), &*s1) && le(&*s1, &*end())));
+            // Reallocate the string.
+            assert(!IsAliasedRange(s1, s2));
             reserve(size() + n2);
             i = begin() + pos;
         }
@@ -1845,16 +1917,17 @@
     }
 
     template <class InputIterator>
-    void InsertImpl(iterator i1, iterator i2,
-        InputIterator b, InputIterator e, std::input_iterator_tag)
-    { 
-        flex_string temp(begin(), i1);
-        for (; b != e; ++b)
+    void InsertImpl(iterator insertPosition,
+        InputIterator inputBegin, InputIterator inputEnd, 
+        std::input_iterator_tag)
+    {
+        flex_string temporary(begin(), insertPosition);
+        for (; inputBegin != inputEnd; ++inputBegin)
         {
-            temp.push_back(*b);
+            temporary.push_back(*inputBegin);
         }
-        temp.append(i2, end());
-        swap(temp);
+        temporary.append(insertPosition, end());
+        swap(temporary);
     }
 
 public:
@@ -1965,7 +2038,7 @@
         InputIterator b, InputIterator e, Selector<0>)
     { 
         ReplaceImpl(i1, i2, b, e, 
-            std::iterator_traits<InputIterator>::iterator_category());
+            typename std::iterator_traits<InputIterator>::iterator_category());
         return *this;
     }
 
@@ -1983,29 +2056,25 @@
         std::distance(s1, s2);
         assert(n2 >= 0);
 
-        // Handle aliased replace
-        static const std::less_equal<const value_type*> le = 
-            std::less_equal<const value_type*>();
-        const bool aliased = le(&*begin(), &*s1) && le(&*s1, &*end());
-        if (aliased /* && capacity() < size() - n1 + n2 */)
-        {
-            // Aliased replace, copy to new string
-            flex_string temp;
-            temp.reserve(size() - n1 + n2);
-            temp.append(begin(), i1).append(s1, s2).append(i2, end());
-            swap(temp);
+        if (IsAliasedRange(s1, s2))
+        {
+            // Aliased replace, copy to new string.
+            flex_string temporary;
+            temporary.reserve(size() - n1 + n2);
+            temporary.append(begin(), i1).append(s1, s2).append(i2, end());
+            swap(temporary);
             return;
         }
 
         if (n1 > n2)
         {
-            // shrinks
+            // Shrinks
             std::copy(s1, s2, i1);
             erase(i1 + n2, i2);
         }
         else
         {
-            // grows
+            // Grows
             flex_string_details::copy_n(s1, n1, i1);
             std::advance(s1, n1);
             insert(i2, s1, s2);
@@ -2063,10 +2132,13 @@
     
     size_type find(const flex_string& str, size_type pos = 0) const
     { return find(str.data(), pos, str.length()); }
-    
+
     size_type find (const value_type* s, size_type pos, size_type n) const
     {
-        for (; pos <= size(); ++pos)
+        const size_type size_(size());
+        if (n + pos > size_) 
+            return npos; 
+        for (; pos < size_; ++pos)
         {
             if (traits_type::compare(&*begin() + pos, s, n) == 0)
             {
@@ -2255,12 +2327,8 @@
     {
         Enforce(pos1 <= size(), (std::out_of_range*)0, "");
         Procust(n1, size() - pos1);
-        const int r = traits_type::compare(data()+pos1, s, Min(n1, n2));
-        return 
-            r != 0 ? r :
-            n1 > n2 ? 1 :
-            n1 < n2 ? -1 :
-            0;
+        const int r = traits_type::compare(pos1 + data(), s, Min(n1, n2));
+        return r != 0 ? r : n1 > n2 ? 1 : n1 < n2 ? -1 : 0;
     }
 
     std::ptrdiff_t compare(size_type pos1, size_type n1,
@@ -2273,7 +2341,11 @@
 
     std::ptrdiff_t compare(const value_type* s) const
     { 
-        return traits_type::compare(data(), s, traits_type::length(s)); 
+        // Could forward to compare(0, size(), s, traits_type::length(s)) 
+        // but that does two extra checks 
+        const size_type n1(size()), n2(traits_type::length(s)); 
+        const int r = traits_type::compare(data(), s, Min(n1, n2)); 
+        return r != 0 ? r : n1 > n2 ? 1 : n1 < n2 ? -1 : 0; 
     }
 };
 
@@ -2427,8 +2499,12 @@
     const flex_string<E, T, A, S>& rhs)
 { return !(lhs < rhs); }
 
-// subclause 21.3.7.8:
-//void swap(flex_string<E, T, A, S>& lhs, flex_string<E, T, A, S>& rhs);    // to do
+template <typename E, class T, class A, class S>
+void swap(flex_string<E, T, A, S>& lhs, flex_string<E, T, A, S>& rhs)
+{
+    // subclause 21.3.7.8:
+    lhs.swap(rhs);
+}
 
 template <typename E, class T, class A, class S>
 inline std::basic_istream<typename flex_string<E, T, A, S>::value_type, 
@@ -2447,6 +2523,23 @@
     const flex_string<E, T, A, S>& str)
 { return os << str.c_str(); }
 
+
+// The getline below implementations are from the SGI STL (http://www.sgi.com/tech/stl/) 
+// and come with the following copyright:
+// 
+// Permission to use, copy, modify, distribute and sell this software and its 
+// documentation for any purpose is hereby granted without fee, provided that 
+// the below copyright notice appears in all copies and that both the copyright 
+// notice and this permission notice appear in supporting documentation. Silicon 
+// Graphics makes no representations about the suitability of this software for 
+// any purpose. It is provided "as is" without express or implied warranty.
+// 
+// Copyright © 1997-1999
+// Silicon Graphics Computer Systems, Inc.
+// 
+// Copyright © 1994
+// Hewlett-Packard Company 
+
 template <typename E, class T, class A, class S>
 std::basic_istream<typename flex_string<E, T, A, S>::value_type,
     typename flex_string<E, T, A, S>::traits_type>&
@@ -2454,7 +2547,42 @@
     std::basic_istream<typename flex_string<E, T, A, S>::value_type, 
         typename flex_string<E, T, A, S>::traits_type>& is,
     flex_string<E, T, A, S>& str,
-    typename flex_string<E, T, A, S>::value_type delim);
+    typename flex_string<E, T, A, S>::value_type delim)
+{
+    size_t nread = 0;
+    typename std::basic_istream<typename flex_string<E, T, A, S>::value_type,
+        typename flex_string<E, T, A, S>::traits_type>::sentry sentry(is, true);
+
+    if (sentry) {
+        std::basic_streambuf<typename flex_string<E, T, A, S>::value_type,
+            typename flex_string<E, T, A, S>::traits_type>* buf = is.rdbuf();
+        str.clear();
+
+        while (nread < str.max_size()) {
+            int c1 = buf->sbumpc();
+            if (flex_string<E, T, A, S>::traits_type::eq_int_type(c1,
+                flex_string<E, T, A, S>::traits_type::eof()))
+            {
+                is.setstate(std::ios_base::eofbit);
+                break;
+            }
+            else {
+                ++nread;
+                typename flex_string<E, T, A, S>::value_type c =
+                    flex_string<E, T, A, S>::traits_type::to_char_type(c1);
+
+                if (!flex_string<E, T, A, S>::traits_type::eq(c, delim))
+                    str.push_back(c);
+                else
+                    break;         // Character is extracted but not appended.
+            }
+        }
+    }
+    if (nread == 0 || nread >= str.max_size())
+        is.setstate(std::ios_base::failbit);
+
+    return is;
+}
 
 template <typename E, class T, class A, class S>
 std::basic_istream<typename flex_string<E, T, A, S>::value_type, 
@@ -2462,7 +2590,10 @@
 getline(
     std::basic_istream<typename flex_string<E, T, A, S>::value_type, 
         typename flex_string<E, T, A, S>::traits_type>& is,
-    flex_string<E, T, A, S>& str);
+    flex_string<E, T, A, S>& str)
+{
+    return getline(is, str, is.widen('\n'));
+}
 
 template <typename E1, class T, class A, class S>
 const typename flex_string<E1, T, A, S>::size_type
Modified: branches/release/boost/wave/util/unput_queue_iterator.hpp
==============================================================================
--- branches/release/boost/wave/util/unput_queue_iterator.hpp	(original)
+++ branches/release/boost/wave/util/unput_queue_iterator.hpp	2009-08-08 18:08:00 EDT (Sat, 08 Aug 2009)
@@ -283,13 +283,13 @@
         static return_type 
         generate(iterator_type &it)
         {
-            return return_t(it.base(), last);
+            return return_type(it.base(), last);
         }
 
         static return_type 
         generate(ContainerT &queue, iterator_type &it)
         {
-            return return_t(it.base(), queue);
+            return return_type(it.base(), queue);
         }
     };
     
Modified: branches/release/boost/wave/wave_config.hpp
==============================================================================
--- branches/release/boost/wave/wave_config.hpp	(original)
+++ branches/release/boost/wave/wave_config.hpp	2009-08-08 18:08:00 EDT (Sat, 08 Aug 2009)
@@ -158,20 +158,45 @@
 #endif 
 
 ///////////////////////////////////////////////////////////////////////////////
+//  Configure Wave thread support, Boost.Spirit and Boost.Pool are configured 
+//  based on these settings automatically
+//
+//  If BOOST_WAVE_SUPPORT_THREADING is not defined, Wave will use the global 
+//  Boost build settings (BOOST_HAS_THREADS), if it is defined its value
+//  defines, whether threading will be enabled or not (should be set to '0' 
+//  or '1').
+#if !defined(BOOST_WAVE_SUPPORT_THREADING)
+#if defined(BOOST_HAS_THREADS)
+#define BOOST_WAVE_SUPPORT_THREADING 1
+#else
+#define BOOST_WAVE_SUPPORT_THREADING 0
+#endif
+#endif
+
+#if BOOST_WAVE_SUPPORT_THREADING != 0 
+#define BOOST_SPIRIT_THREADSAFE 1
+#define PHOENIX_THREADSAFE 1
+#else
+// disable thread support in Boost.Pool
+#define BOOST_NO_MT 1
+#endif
+
+///////////////////////////////////////////////////////////////////////////////
 //  Define the string type to be used to store the token values and the file 
 //  names inside a file_position template class
 //
 #if !defined(BOOST_WAVE_STRINGTYPE)
 
+// VC7 isn't able to compile the flex_string class, fall back to std::string 
+// CW up to 8.3 chokes as well *sigh*
+// Tru64/CXX has linker problems when using flex_string
 #if BOOST_WORKAROUND(BOOST_MSVC, <= 1300) || \
     BOOST_WORKAROUND(__MWERKS__, < 0x3200) || \
     (defined(__DECCXX) && defined(__alpha)) || \
     defined(BOOST_WAVE_STRINGTYPE_USE_STDSTRING)
     
-// VC7 isn't able to compile the flex_string class, fall back to std::string 
-// CW up to 8.3 chokes as well *sigh*
-// Tru64/CXX has linker problems when using flex_string
 #define BOOST_WAVE_STRINGTYPE std::string
+
 #if !defined(BOOST_WAVE_STRINGTYPE_USE_STDSTRING)
 #define BOOST_WAVE_STRINGTYPE_USE_STDSTRING 1
 #endif
@@ -332,7 +357,7 @@
 //  Decide, whether to support long long integers in the preprocessor.
 //
 //  The C++ standard requires the preprocessor to use one of the following 
-//  types for integer literals: long or unsigned long depending on a optional 
+//  types for integer literals: long or unsigned long depending on an optional 
 //  suffix ('u', 'l', 'ul', or 'lu')
 //
 //  Sometimes it's required to preprocess integer literals bigger than that
@@ -366,30 +391,6 @@
 }}
 
 ///////////////////////////////////////////////////////////////////////////////
-//  Configure Wave thread support, Boost.Spirit and Boost.Pool are configured 
-//  based on these settings automatically
-//
-//  If BOOST_WAVE_SUPPORT_THREADING is not defined, Wave will use the global 
-//  Boost build settings (BOOST_HAS_THREADS), if it is defined its value
-//  defines, whether threading will be enabled or not (should be set to '0' 
-//  or '1').
-#if !defined(BOOST_WAVE_SUPPORT_THREADING)
-#if defined(BOOST_HAS_THREADS)
-#define BOOST_WAVE_SUPPORT_THREADING 1
-#else
-#define BOOST_WAVE_SUPPORT_THREADING 0
-#endif
-#endif
-
-#if BOOST_WAVE_SUPPORT_THREADING != 0 
-#define BOOST_SPIRIT_THREADSAFE 1
-#define PHOENIX_THREADSAFE 1
-#else
-// disable thread support in Boost.Pool
-#define BOOST_NO_MT 1
-#endif
-
-///////////////////////////////////////////////////////////////////////////////
 //  Wave needs at least 4 parameters for phoenix actors
 #if !defined(PHOENIX_LIMIT)
 #define PHOENIX_LIMIT 6
Modified: branches/release/boost/wave/wave_version.hpp
==============================================================================
--- branches/release/boost/wave/wave_version.hpp	(original)
+++ branches/release/boost/wave/wave_version.hpp	2009-08-08 18:08:00 EDT (Sat, 08 Aug 2009)
@@ -16,11 +16,11 @@
 //  BOOST_WAVE_VERSION & 0x0000FF is the sub-minor version
 //  BOOST_WAVE_VERSION & 0x00FF00 is the minor version
 //  BOOST_WAVE_VERSION & 0xFF0000 is the major version
-#define BOOST_WAVE_VERSION                 0x020000
+#define BOOST_WAVE_VERSION                 0x020002
 
 //  The following defines contain the same information as above
 #define BOOST_WAVE_VERSION_MAJOR           2
 #define BOOST_WAVE_VERSION_MINOR           0
-#define BOOST_WAVE_VERSION_SUBMINOR        0
+#define BOOST_WAVE_VERSION_SUBMINOR        2
 
 #endif // !defined(WAVE_VERSION_H_9D79ABDB_AC54_4C0A_89B1_F70A2DCFE21E_INCLUDED)
Modified: branches/release/libs/wave/ChangeLog
==============================================================================
--- branches/release/libs/wave/ChangeLog	(original)
+++ branches/release/libs/wave/ChangeLog	2009-08-08 18:08:00 EDT (Sat, 08 Aug 2009)
@@ -22,10 +22,18 @@
 
 CHANGELOG
 
+Boost V1.40.0
+- V2.0.2
+- Fixed a long standing race condition inhibiting to use Wave in multi threaded 
+  environments.
+- Incorporated the changes from latest version of the flex_string class (#2946).
+- Fixed another race condition triggering problems using Wave in multi-threaded
+  environments.
+
 Boost V1.39.0
 - V2.0.1
 - Fixed Wave to compile with BOOST_FILESYSTEM_NO_DEPRECATED defined (i.e. the 
-  library doesn't use the depracated filesystem interface anymore).
+  library doesn't use the deprecated filesystem interface anymore).
 
 Boost V1.37.0
 - Updated examples to reflect the recent changes in the used multi_pass