$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: eric_at_[hidden]
Date: 2007-11-28 17:04:03
Author: eric_niebler
Date: 2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
New Revision: 41444
URL: http://svn.boost.org/trac/boost/changeset/41444
Log:
Merged revisions 41399-41442 via svnmerge from 
https://svn.boost.org/svn/boost/trunk
........
  r41400 | igaztanaga | 2007-11-26 08:34:13 -0800 (Mon, 26 Nov 2007) | 1 line
  
  Added missing #include <typeinfo>
........
  r41401 | anthonyw | 2007-11-26 09:01:08 -0800 (Mon, 26 Nov 2007) | 1 line
  
  once_flag uses zero-initialization on POSIX as well as windows
........
  r41402 | niels_dekker | 2007-11-26 09:36:52 -0800 (Mon, 26 Nov 2007) | 1 line
  
  Marked value_init_test failures on Borland C++ as "expected failures", as discussed with Fernando Cacciola.
........
  r41404 | rwgk | 2007-11-26 12:46:28 -0800 (Mon, 26 Nov 2007) | 1 line
  
  g++ 4.3.0 compatibility (4.3.0 20071125 (experimental))
........
  r41405 | anthonyw | 2007-11-26 13:15:04 -0800 (Mon, 26 Nov 2007) | 1 line
  
  reverted accidental checkin of new timed_wait functions on condition_variable
........
  r41406 | nasonov | 2007-11-26 13:29:04 -0800 (Mon, 26 Nov 2007) | 3 lines
  
  Remove redundant BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION.
........
  r41407 | chris_kohlhoff | 2007-11-26 13:29:38 -0800 (Mon, 26 Nov 2007) | 3 lines
  
  WinCE doesn't work with all multicast addresses, and even though it doesn't
  support the multicast::enable_loopback option you can still get the value.
........
  r41408 | dave | 2007-11-26 14:01:50 -0800 (Mon, 26 Nov 2007) | 2 lines
  
  Try to extend the workaround to SunPro 5.9, since we're marked as not working on 5.8
........
  r41409 | dave | 2007-11-26 17:40:01 -0800 (Mon, 26 Nov 2007) | 3 lines
  
  Allow Sun-5.7 and Sun-5.8 to fail loudly for Boost.Python so I can see
  what's really wrong.
........
  r41413 | anthonyw | 2007-11-27 06:24:29 -0800 (Tue, 27 Nov 2007) | 1 line
  
  add support for relative timeouts to condition timed_wait
........
  r41414 | grafik | 2007-11-27 09:53:56 -0800 (Tue, 27 Nov 2007) | 1 line
  
  Remove non-existent option info.
........
  r41415 | grafik | 2007-11-27 09:55:13 -0800 (Tue, 27 Nov 2007) | 1 line
  
  Add some utility output formatting functions.
........
  r41416 | grafik | 2007-11-27 09:57:15 -0800 (Tue, 27 Nov 2007) | 1 line
  
  Check empty string invariants, instead of assuming all strings are allocated. And reset strings when they are freed.
........
  r41417 | grafik | 2007-11-27 09:58:50 -0800 (Tue, 27 Nov 2007) | 1 line
  
  Fix buffer overrun bug in expanding @() subexpressions.
........
  r41418 | hkaiser | 2007-11-27 10:18:10 -0800 (Tue, 27 Nov 2007) | 1 line
  
  Wave: Fixed gcc warning, bumped version number.
........
  r41419 | djenkins | 2007-11-27 10:57:48 -0800 (Tue, 27 Nov 2007) | 1 line
  
  Changes for msvc-9.0 /clr flag
........
  r41420 | djenkins | 2007-11-27 10:59:06 -0800 (Tue, 27 Nov 2007) | 1 line
  
  Changes for msvc-9.0 /clr flag
........
  r41423 | niels_dekker | 2007-11-27 13:34:08 -0800 (Tue, 27 Nov 2007) | 1 line
  
  Added value_init test for struct as used in MSVC bug report regarding value-initialization.
........
  r41429 | noel_belcourt | 2007-11-27 18:27:13 -0800 (Tue, 27 Nov 2007) | 3 lines
  
  Fix pathscale rpath issue per Alain Minussi's suggestion.
........
  r41430 | grafik | 2007-11-27 23:08:13 -0800 (Tue, 27 Nov 2007) | 1 line
  
  Add test for result status values of simple actions, i.e. empty actions.
........
  r41431 | grafik | 2007-11-27 23:21:49 -0800 (Tue, 27 Nov 2007) | 19 lines
  
  build-system.jam
  * Reflect added start/end timestamps for actions in xml output. And update action rules for new args.
  
  execcmd.h
  * Add start/end timestamps to action timing info.
  
  execnt.c
  * Fix filetime_seconds calculation when time is larger than low 32 bit value.
  * Add calc of C time_t from Windows FILETIME.
  * Add start/end timestamps recording to action timing info.
  
  execunix.c
  * Add start/end timestamps recording to action timing info.
  
  jam.c
  * Change JAMDATE to use common ISO date format.
  
  make1.c
  * Redo __TIMING_RULE__ and __ACTION__RULE__ invocations to new argument ordering and added end/result timestamp values.
........
  r41432 | chris_kohlhoff | 2007-11-28 05:26:33 -0800 (Wed, 28 Nov 2007) | 3 lines
  
  Make async operations fail with an error if the socket descriptor doesn't
  fit into the select call's fd_set.
........
  r41433 | bgubenko | 2007-11-28 07:33:16 -0800 (Wed, 28 Nov 2007) | 1 line
  
  add "gcc*hpux*" toolset for serialization library bug on big endian platforms
........
  r41436 | niels_dekker | 2007-11-28 09:19:37 -0800 (Wed, 28 Nov 2007) | 1 line
  
  Added tests for two more struct types to value_init_test -- discussed with Fernando Cacciola
........
  r41439 | bgubenko | 2007-11-28 11:04:53 -0800 (Wed, 28 Nov 2007) | 1 line
  
  add "<linkflags>-lrt" for acc* toolsets
........
  r41440 | grafik | 2007-11-28 12:24:17 -0800 (Wed, 28 Nov 2007) | 1 line
  
  Fix for latest Doxygen namespace file names. And support for method groups. From Samuel Debionne.
........
Added:
   branches/proto/v3/tools/jam/test/action_status.jam
      - copied unchanged from r41440, /trunk/tools/jam/test/action_status.jam
Properties modified: 
   branches/proto/v3/   (props changed)
Text files modified: 
   branches/proto/v3/boost/asio/detail/posix_fd_set_adapter.hpp         |    13 +                                       
   branches/proto/v3/boost/asio/detail/reactor_op_queue.hpp             |     7                                         
   branches/proto/v3/boost/asio/detail/win_fd_set_adapter.hpp           |     8                                         
   branches/proto/v3/boost/asio/error.hpp                               |     7                                         
   branches/proto/v3/boost/lexical_cast.hpp                             |     5                                         
   branches/proto/v3/boost/python/object_protocol.hpp                   |     4                                         
   branches/proto/v3/boost/thread/pthread/condition_variable.hpp        |     8                                         
   branches/proto/v3/boost/thread/pthread/condition_variable_fwd.hpp    |     8 +                                       
   branches/proto/v3/boost/thread/pthread/once.hpp                      |    12                                         
   branches/proto/v3/boost/thread/win32/condition_variable.hpp          |   134 ++++++++++++++++--                      
   branches/proto/v3/boost/thread/win32/thread_primitives.hpp           |     3                                         
   branches/proto/v3/boost/wave/util/flex_string.hpp                    |     6                                         
   branches/proto/v3/boost/wave/wave_version.hpp                        |     4                                         
   branches/proto/v3/boost/xpressive/detail/core/access.hpp             |     1                                         
   branches/proto/v3/boost/xpressive/detail/core/action.hpp             |     1                                         
   branches/proto/v3/boost/xpressive/detail/dynamic/matchable.hpp       |     1                                         
   branches/proto/v3/libs/asio/test/ip/multicast.cpp                    |    20 +                                       
   branches/proto/v3/libs/interprocess/test/Jamfile.v2                  |     2                                         
   branches/proto/v3/libs/interprocess/test/named_creation_template.hpp |     1                                         
   branches/proto/v3/libs/python/src/object/function.cpp                |     9                                         
   branches/proto/v3/libs/thread/src/pthread/once.cpp                   |     5                                         
   branches/proto/v3/libs/thread/test/test_condition.cpp                |    50 ++++++                                  
   branches/proto/v3/libs/utility/value_init_test.cpp                   |    76 ++++++++++                              
   branches/proto/v3/libs/xpressive/test/regress.ipp                    |    16 +-                                      
   branches/proto/v3/libs/xpressive/test/test.hpp                       |     6                                         
   branches/proto/v3/status/explicit-failures-markup.xml                |    30 +++                                     
   branches/proto/v3/tools/build/v2/build-system.jam                    |    10                                         
   branches/proto/v3/tools/build/v2/tools/doxproc.py                    |    10 +                                       
   branches/proto/v3/tools/build/v2/tools/pathscale.jam                 |     4                                         
   branches/proto/v3/tools/jam/src/execcmd.h                            |    24 ++-                                     
   branches/proto/v3/tools/jam/src/execnt.c                             |    43 ++++-                                   
   branches/proto/v3/tools/jam/src/execunix.c                           |    13 +                                       
   branches/proto/v3/tools/jam/src/jam.c                                |    20 --                                      
   branches/proto/v3/tools/jam/src/make1.c                              |    85 ++++++-----                             
   branches/proto/v3/tools/jam/src/output.c                             |    24 +++                                     
   branches/proto/v3/tools/jam/src/output.h                             |     6                                         
   branches/proto/v3/tools/jam/src/strings.c                            |     9 +                                       
   branches/proto/v3/tools/jam/src/variable.c                           |   282 ++++++++++++++++++++------------------- 
   branches/proto/v3/tools/jam/test/test.jam                            |     1                                         
   39 files changed, 669 insertions(+), 299 deletions(-)
Modified: branches/proto/v3/boost/asio/detail/posix_fd_set_adapter.hpp
==============================================================================
--- branches/proto/v3/boost/asio/detail/posix_fd_set_adapter.hpp	(original)
+++ branches/proto/v3/boost/asio/detail/posix_fd_set_adapter.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -36,11 +36,16 @@
     FD_ZERO(&fd_set_);
   }
 
-  void set(socket_type descriptor)
+  bool set(socket_type descriptor)
   {
-    if (max_descriptor_ == invalid_socket || descriptor > max_descriptor_)
-      max_descriptor_ = descriptor;
-    FD_SET(descriptor, &fd_set_);
+    if (descriptor < FD_SETSIZE)
+    {
+      if (max_descriptor_ == invalid_socket || descriptor > max_descriptor_)
+        max_descriptor_ = descriptor;
+      FD_SET(descriptor, &fd_set_);
+      return true;
+    }
+    return false;
   }
 
   bool is_set(socket_type descriptor) const
Modified: branches/proto/v3/boost/asio/detail/reactor_op_queue.hpp
==============================================================================
--- branches/proto/v3/boost/asio/detail/reactor_op_queue.hpp	(original)
+++ branches/proto/v3/boost/asio/detail/reactor_op_queue.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -174,8 +174,13 @@
     typename operation_map::iterator i = operations_.begin();
     while (i != operations_.end())
     {
-      descriptors.set(i->first);
+      Descriptor descriptor = i->first;
       ++i;
+      if (!descriptors.set(descriptor))
+      {
+        boost::system::error_code ec(error::fd_set_failure);
+        dispatch_all_operations(descriptor, ec);
+      }
     }
   }
 
Modified: branches/proto/v3/boost/asio/detail/win_fd_set_adapter.hpp
==============================================================================
--- branches/proto/v3/boost/asio/detail/win_fd_set_adapter.hpp	(original)
+++ branches/proto/v3/boost/asio/detail/win_fd_set_adapter.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -37,13 +37,17 @@
     fd_set_.fd_count = 0;
   }
 
-  void set(socket_type descriptor)
+  bool set(socket_type descriptor)
   {
     for (u_int i = 0; i < fd_set_.fd_count; ++i)
       if (fd_set_.fd_array[i] == descriptor)
-        return;
+        return true;
     if (fd_set_.fd_count < win_fd_set_size)
+    {
       fd_set_.fd_array[fd_set_.fd_count++] = descriptor;
+      return true;
+    }
+    return false;
   }
 
   bool is_set(socket_type descriptor) const
Modified: branches/proto/v3/boost/asio/error.hpp
==============================================================================
--- branches/proto/v3/boost/asio/error.hpp	(original)
+++ branches/proto/v3/boost/asio/error.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -195,7 +195,10 @@
   eof,
 
   /// Element not found.
-  not_found
+  not_found,
+
+  /// The descriptor cannot fit into the select system call's fd_set.
+  fd_set_failure
 };
 
 enum ssl_errors
@@ -301,6 +304,8 @@
       return "End of file";
     if (value == error::not_found)
       return "Element not found";
+    if (value == error::fd_set_failure)
+      return "The descriptor does not fit into the select call's fd_set";
     return "asio.misc error";
   }
 };
Modified: branches/proto/v3/boost/lexical_cast.hpp
==============================================================================
--- branches/proto/v3/boost/lexical_cast.hpp	(original)
+++ branches/proto/v3/boost/lexical_cast.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -1117,12 +1117,9 @@
             BOOST_DEDUCED_TYPENAME boost::call_traits<Source>::param_type arg,
             CharT* buf, std::size_t src_len)
         {
-#ifndef BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
             typedef BOOST_DEDUCED_TYPENAME
                 deduce_char_traits<CharT,Target,Source>::type traits;
-#else
-            typedef std::char_traits<CharT> traits;
-#endif
+
             typedef BOOST_DEDUCED_TYPENAME boost::mpl::if_c<
                 lcast_streambuf_for_target<Target>::value ||
                 lcast_streambuf_for_source<Source>::value
Modified: branches/proto/v3/boost/python/object_protocol.hpp
==============================================================================
--- branches/proto/v3/boost/python/object_protocol.hpp	(original)
+++ branches/proto/v3/boost/python/object_protocol.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -10,9 +10,11 @@
 # include <boost/python/object_protocol_core.hpp>
 # include <boost/python/object_core.hpp>
 
+# include <boost/detail/workaround.hpp>
+
 namespace boost { namespace python { namespace api {
 
-# if BOOST_WORKAROUND(__SUNPRO_CC, <= 0x580)
+# if BOOST_WORKAROUND(__SUNPRO_CC, BOOST_TESTED_AT(0x590))
 // attempt to use SFINAE to prevent functions accepting T const& from
 // coming up as ambiguous with the one taking a char const* when a
 // string literal is passed
Modified: branches/proto/v3/boost/thread/pthread/condition_variable.hpp
==============================================================================
--- branches/proto/v3/boost/thread/pthread/condition_variable.hpp	(original)
+++ branches/proto/v3/boost/thread/pthread/condition_variable.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -5,11 +5,9 @@
 // http://www.boost.org/LICENSE_1_0.txt)
 // (C) Copyright 2007 Anthony Williams
 
-#include <boost/thread/mutex.hpp>
 #include <limits.h>
 #include <boost/assert.hpp>
 #include <algorithm>
-#include <boost/thread/thread_time.hpp>
 #include <pthread.h>
 #include "timespec.hpp"
 #include "pthread_mutex_scoped_lock.hpp"
@@ -150,6 +148,12 @@
             return true;
         }
 
+        template<typename lock_type,typename predicate_type>
+        bool timed_wait(lock_type& m,xtime const& wait_until,predicate_type pred)
+        {
+            return timed_wait(m,system_time(wait_until),pred);
+        }
+
         template<typename lock_type,typename duration_type,typename predicate_type>
         bool timed_wait(lock_type& m,duration_type const& wait_duration,predicate_type pred)
         {
Modified: branches/proto/v3/boost/thread/pthread/condition_variable_fwd.hpp
==============================================================================
--- branches/proto/v3/boost/thread/pthread/condition_variable_fwd.hpp	(original)
+++ branches/proto/v3/boost/thread/pthread/condition_variable_fwd.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -6,8 +6,10 @@
 // (C) Copyright 2007 Anthony Williams
 
 #include <pthread.h>
+#include <boost/thread/mutex.hpp>
 #include <boost/thread/locks.hpp>
 #include <boost/thread/thread_time.hpp>
+#include <boost/thread/xtime.hpp>
 
 namespace boost
 {
@@ -44,6 +46,12 @@
             return true;
         }
 
+        template<typename predicate_type>
+        bool timed_wait(unique_lock<mutex>& m,xtime const& wait_until,predicate_type pred)
+        {
+            return timed_wait(m,system_time(wait_until),pred);
+        }
+
         template<typename duration_type,typename predicate_type>
         bool timed_wait(unique_lock<mutex>& m,duration_type const& wait_duration,predicate_type pred)
         {
Modified: branches/proto/v3/boost/thread/pthread/once.hpp
==============================================================================
--- branches/proto/v3/boost/thread/pthread/once.hpp	(original)
+++ branches/proto/v3/boost/thread/pthread/once.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -14,8 +14,8 @@
 #include <pthread.h>
 #include <boost/assert.hpp>
 #include "pthread_mutex_scoped_lock.hpp"
-#include <boost/cstdint.hpp>
 #include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
+#include <boost/cstdint.hpp>
 
 namespace boost {
 
@@ -32,7 +32,7 @@
         BOOST_THREAD_DECL extern pthread_cond_t once_epoch_cv;
     }
     
-#define BOOST_ONCE_INITIAL_FLAG_VALUE -1
+#define BOOST_ONCE_INITIAL_FLAG_VALUE 0
 #define BOOST_ONCE_INIT {BOOST_ONCE_INITIAL_FLAG_VALUE}
 
 
@@ -42,15 +42,15 @@
     void call_once(once_flag& flag,Function f)
     {
         static boost::uintmax_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
-        static boost::uintmax_t const being_initialized=uninitialized_flag-1;
+        static boost::uintmax_t const being_initialized=uninitialized_flag+1;
         boost::uintmax_t const epoch=flag.epoch;
         boost::uintmax_t& this_thread_epoch=detail::get_once_per_thread_epoch();
         
-        if(epoch>this_thread_epoch)
+        if(epoch<this_thread_epoch)
         {
             pthread::pthread_mutex_scoped_lock lk(&detail::once_epoch_mutex);
 
-            while(flag.epoch>=being_initialized)
+            while(flag.epoch<=being_initialized)
             {
                 if(flag.epoch==uninitialized_flag)
                 {
@@ -66,7 +66,7 @@
                         BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv));
                         throw;
                     }
-                    flag.epoch=++detail::once_global_epoch;
+                    flag.epoch=--detail::once_global_epoch;
                     BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv));
                 }
                 else
Modified: branches/proto/v3/boost/thread/win32/condition_variable.hpp
==============================================================================
--- branches/proto/v3/boost/thread/win32/condition_variable.hpp	(original)
+++ branches/proto/v3/boost/thread/win32/condition_variable.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -13,6 +13,8 @@
 #include <boost/thread/thread.hpp>
 #include <boost/thread/thread_time.hpp>
 #include "interlocked_read.hpp"
+#include <boost/cstdint.hpp>
+#include <boost/thread/xtime.hpp>
 
 namespace boost
 {
@@ -111,8 +113,78 @@
             
 
         protected:
+            struct timeout
+            {
+                unsigned long start;
+                uintmax_t milliseconds;
+                bool relative;
+                boost::system_time abs_time;
+
+                static unsigned long const max_non_infinite_wait=0xfffffffe;
+
+                timeout(uintmax_t milliseconds_):
+                    start(win32::GetTickCount()),
+                    milliseconds(milliseconds_),
+                    relative(true),
+                    abs_time(boost::get_system_time())
+                {}
+
+                timeout(boost::system_time const& abs_time_):
+                    start(win32::GetTickCount()),
+                    milliseconds(0),
+                    relative(false),
+                    abs_time(abs_time_)
+                {}
+
+                struct remaining_time
+                {
+                    bool more;
+                    unsigned long milliseconds;
+
+                    remaining_time(uintmax_t remaining):
+                        more(remaining>max_non_infinite_wait),
+                        milliseconds(more?max_non_infinite_wait:(unsigned long)remaining)
+                    {}
+                };
+
+                remaining_time remaining_milliseconds() const
+                {
+                    if(milliseconds==~uintmax_t(0))
+                    {
+                        return remaining_time(win32::infinite);
+                    }
+                    else if(relative)
+                    {
+                        unsigned long const now=win32::GetTickCount();
+                        unsigned long const elapsed=now-start;
+                        return remaining_time((elapsed<milliseconds)?(milliseconds-elapsed):0);
+                    }
+                    else
+                    {
+                        system_time const now=get_system_time();
+                        if(abs_time<now)
+                        {
+                            return remaining_time(0);
+                        }
+                        return remaining_time((abs_time-get_system_time()).total_milliseconds()+1);
+                    }
+                }
+
+                static timeout sentinel()
+                {
+                    return timeout(sentinel_type());
+                }
+            private:
+                struct sentinel_type
+                {};
+                
+                explicit timeout(sentinel_type):
+                    start(0),milliseconds(~uintmax_t(0)),relative(true)
+                {}
+            };
+
             template<typename lock_type>
-            bool do_wait(lock_type& lock,::boost::system_time const& wait_until)
+            bool do_wait(lock_type& lock,timeout wait_until)
             {
                 detail::win32::handle_manager local_wake_sem;
                 detail::win32::handle_manager sem;
@@ -155,9 +227,21 @@
                         ++generations[0].count;
                         sem=detail::win32::duplicate_handle(generations[0].semaphore);
                     }
-                    if(!this_thread::interruptible_wait(sem,::boost::detail::get_milliseconds_until(wait_until)))
+                    while(true)
                     {
-                        break;
+                        timeout::remaining_time const remaining=wait_until.remaining_milliseconds();
+                        if(this_thread::interruptible_wait(sem,remaining.milliseconds))
+                        {
+                            break;
+                        }
+                        else if(!remaining.more)
+                        {
+                            return false;
+                        }
+                        if(wait_until.relative)
+                        {
+                            wait_until.milliseconds-=timeout::max_non_infinite_wait;
+                        }
                     }
                 
                     unsigned long const woken_result=detail::win32::WaitForSingleObject(local_wake_sem,0);
@@ -167,6 +251,17 @@
                 }
                 return woken;
             }
+
+            template<typename lock_type,typename predicate_type>
+            bool do_wait(lock_type& m,timeout const& wait_until,predicate_type pred)
+            {
+                while (!pred())
+                {
+                    if(!do_wait(m, wait_until))
+                        return false;
+                }
+                return true;
+            }
         
             basic_condition_variable(const basic_condition_variable& other);
             basic_condition_variable& operator=(const basic_condition_variable& other);
@@ -238,7 +333,7 @@
     public:
         void wait(unique_lock<mutex>& m)
         {
-            do_wait(m,::boost::detail::get_system_time_sentinel());
+            do_wait(m,timeout::sentinel());
         }
 
         template<typename predicate_type>
@@ -256,17 +351,17 @@
         template<typename predicate_type>
         bool timed_wait(unique_lock<mutex>& m,boost::system_time const& wait_until,predicate_type pred)
         {
-            while (!pred())
-            {
-                if(!timed_wait(m, wait_until))
-                    return false;
-            }
-            return true;
+            return do_wait(m,wait_until,pred);
+        }
+        template<typename predicate_type>
+        bool timed_wait(unique_lock<mutex>& m,boost::xtime const& wait_until,predicate_type pred)
+        {
+            return do_wait(m,system_time(wait_until),pred);
         }
         template<typename duration_type,typename predicate_type>
         bool timed_wait(unique_lock<mutex>& m,duration_type const& wait_duration,predicate_type pred)
         {
-            return timed_wait(m,get_system_time()+wait_duration,pred);
+            return do_wait(m,wait_duration.total_milliseconds(),pred);
         }
     };
     
@@ -277,7 +372,7 @@
         template<typename lock_type>
         void wait(lock_type& m)
         {
-            do_wait(m,::boost::detail::get_system_time_sentinel());
+            do_wait(m,timeout::sentinel());
         }
 
         template<typename lock_type,typename predicate_type>
@@ -295,18 +390,19 @@
         template<typename lock_type,typename predicate_type>
         bool timed_wait(lock_type& m,boost::system_time const& wait_until,predicate_type pred)
         {
-            while (!pred())
-            {
-                if(!timed_wait(m, wait_until))
-                    return false;
-            }
-            return true;
+            return do_wait(m,wait_until,pred);
+        }
+
+        template<typename lock_type,typename predicate_type>
+        bool timed_wait(lock_type& m,boost::xtime const& wait_until,predicate_type pred)
+        {
+            return do_wait(m,system_time(wait_until),pred);
         }
 
         template<typename lock_type,typename duration_type,typename predicate_type>
         bool timed_wait(lock_type& m,duration_type const& wait_duration,predicate_type pred)
         {
-            return timed_wait(m,get_system_time()+wait_duration,pred);
+            return timed_wait(m,wait_duration.total_milliseconds(),pred);
         }
     };
 
Modified: branches/proto/v3/boost/thread/win32/thread_primitives.hpp
==============================================================================
--- branches/proto/v3/boost/thread/win32/thread_primitives.hpp	(original)
+++ branches/proto/v3/boost/thread/win32/thread_primitives.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -53,6 +53,7 @@
             using ::SleepEx;
             using ::Sleep;
             using ::QueueUserAPC;
+            using ::GetTickCount;
         }
     }
 }
@@ -120,6 +121,8 @@
                 typedef void (__stdcall *queue_user_apc_callback_function)(ulong_ptr);
                 __declspec(dllimport) unsigned long __stdcall QueueUserAPC(queue_user_apc_callback_function,void*,ulong_ptr);
 
+                __declspec(dllimport) unsigned long __stdcall GetTickCount();
+
 # ifndef UNDER_CE
                 __declspec(dllimport) unsigned long __stdcall GetCurrentProcessId();
                 __declspec(dllimport) unsigned long __stdcall GetCurrentThreadId();
Modified: branches/proto/v3/boost/wave/util/flex_string.hpp
==============================================================================
--- branches/proto/v3/boost/wave/util/flex_string.hpp	(original)
+++ branches/proto/v3/boost/wave/util/flex_string.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -24,7 +24,7 @@
 //      - Incorporated the changes from Andrei's latest version of this class
 //
 // #HK070307:
-//      - One again incorporated the changes from Andrei's latest version of 
+//      - Once again incorporated the changes from Andrei's latest version of 
 //        this class
 
 #ifndef FLEX_STRING_INC_
@@ -705,8 +705,8 @@
 
         if (capacity() < neededCapacity)
         {
-            static std::less_equal<const E*> le;
-            BOOST_ASSERT(!(le(begin(), &*b) && le(&*b, end())));
+            typedef std::less_equal<const E*> le_type;
+            BOOST_ASSERT(!(le_type()(begin(), &*b) && le_type()(&*b, end())));
             reserve(neededCapacity);
         }
         std::copy(b, e, end());
Modified: branches/proto/v3/boost/wave/wave_version.hpp
==============================================================================
--- branches/proto/v3/boost/wave/wave_version.hpp	(original)
+++ branches/proto/v3/boost/wave/wave_version.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -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                 0x010300
+#define BOOST_WAVE_VERSION                 0x010400
 
 //  The following defines contain the same information as above
 #define BOOST_WAVE_VERSION_MAJOR           1
-#define BOOST_WAVE_VERSION_MINOR           3
+#define BOOST_WAVE_VERSION_MINOR           4
 #define BOOST_WAVE_VERSION_SUBMINOR        0
 
 #endif // !defined(WAVE_VERSION_H_9D79ABDB_AC54_4C0A_89B1_F70A2DCFE21E_INCLUDED)
Modified: branches/proto/v3/boost/xpressive/detail/core/access.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/core/access.hpp	(original)
+++ branches/proto/v3/boost/xpressive/detail/core/access.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -17,6 +17,7 @@
 #include <boost/shared_ptr.hpp>
 #include <boost/xpressive/detail/detail_fwd.hpp>
 #include <boost/xpressive/detail/dynamic/matchable.hpp>
+#include <boost/xpressive/match_results.hpp> // for type_info_less
 
 namespace boost { namespace xpressive { namespace detail
 {
Modified: branches/proto/v3/boost/xpressive/detail/core/action.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/core/action.hpp	(original)
+++ branches/proto/v3/boost/xpressive/detail/core/action.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -14,6 +14,7 @@
 #endif
 
 #include <boost/xpressive/detail/detail_fwd.hpp>
+#include <boost/xpressive/match_results.hpp> // for type_info_less
 
 namespace boost { namespace xpressive { namespace detail
 {
Modified: branches/proto/v3/boost/xpressive/detail/dynamic/matchable.hpp
==============================================================================
--- branches/proto/v3/boost/xpressive/detail/dynamic/matchable.hpp	(original)
+++ branches/proto/v3/boost/xpressive/detail/dynamic/matchable.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -21,6 +21,7 @@
 #include <boost/xpressive/detail/core/quant_style.hpp>
 #include <boost/xpressive/detail/utility/counted_base.hpp>
 #include <boost/xpressive/detail/detail_fwd.hpp>
+#include <boost/xpressive/detail/dynamic/sequence.hpp>
 #include <boost/xpressive/regex_error.hpp>
 
 namespace boost { namespace xpressive { namespace detail
Modified: branches/proto/v3/libs/asio/test/ip/multicast.cpp
==============================================================================
--- branches/proto/v3/libs/asio/test/ip/multicast.cpp	(original)
+++ branches/proto/v3/libs/asio/test/ip/multicast.cpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -106,7 +106,7 @@
 
 #if defined(__hpux)
 // HP-UX doesn't declare this function extern "C", so it is declared again here
-// to avoid a linker errors about an undefined symbol.
+// to avoid a linker error about an undefined symbol.
 extern "C" unsigned int if_nametoindex(const char*);
 #endif // defined(__hpux)
 
@@ -132,8 +132,16 @@
 
   BOOST_CHECK(have_v4 || have_v6);
 
+#if defined(BOOST_WINDOWS) && defined(UNDER_CE)
+  // Windows CE seems to have problems with some multicast group addresses.
+  // The following address works on CE, but as it is not a private multicast
+  // address it will not be used on other platforms.
+  const ip::address multicast_address_v4 =
+    ip::address::from_string("239.0.0.4", ec);
+#else // defined(BOOST_WINDOWS) && defined(UNDER_CE)
   const ip::address multicast_address_v4 =
     ip::address::from_string("239.255.0.1", ec);
+#endif // defined(BOOST_WINDOWS) && defined(UNDER_CE)
   BOOST_CHECK(!have_v4 || !ec);
 
   const ip::address multicast_address_v6 =
@@ -261,9 +269,8 @@
     ip::multicast::enable_loopback enable_loopback2;
     sock_v4.get_option(enable_loopback2, ec);
 #if defined(BOOST_WINDOWS) && defined(UNDER_CE)
-    // Option is not supported under Windows CE.
-    BOOST_CHECK_MESSAGE(ec == boost::asio::error::no_protocol_option,
-        ec.value() << ", " << ec.message());
+    // Not supported under Windows CE but can get value.
+    BOOST_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message());
 #else // defined(BOOST_WINDOWS) && defined(UNDER_CE)
     BOOST_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message());
     BOOST_CHECK(enable_loopback2.value());
@@ -287,9 +294,8 @@
     ip::multicast::enable_loopback enable_loopback4;
     sock_v4.get_option(enable_loopback4, ec);
 #if defined(BOOST_WINDOWS) && defined(UNDER_CE)
-    // Option is not supported under Windows CE.
-    BOOST_CHECK_MESSAGE(ec == boost::asio::error::no_protocol_option,
-        ec.value() << ", " << ec.message());
+    // Not supported under Windows CE but can get value.
+    BOOST_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message());
 #else // defined(BOOST_WINDOWS) && defined(UNDER_CE)
     BOOST_CHECK_MESSAGE(!ec, ec.value() << ", " << ec.message());
     BOOST_CHECK(!enable_loopback4.value());
Modified: branches/proto/v3/libs/interprocess/test/Jamfile.v2
==============================================================================
--- branches/proto/v3/libs/interprocess/test/Jamfile.v2	(original)
+++ branches/proto/v3/libs/interprocess/test/Jamfile.v2	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -25,6 +25,8 @@
       :  # additional args
       :  # test-files
       :  # requirements
+        <toolset>acc:<linkflags>-lrt
+        <toolset>acc-pa_risc:<linkflags>-lrt
       ] ;
    }
 
Modified: branches/proto/v3/libs/interprocess/test/named_creation_template.hpp
==============================================================================
--- branches/proto/v3/libs/interprocess/test/named_creation_template.hpp	(original)
+++ branches/proto/v3/libs/interprocess/test/named_creation_template.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -15,6 +15,7 @@
 #include <boost/interprocess/exceptions.hpp>
 #include "boost_interprocess_check.hpp"
 #include <iostream>
+#include <typeinfo>
 #include <boost/interprocess/creation_tags.hpp>
 
 namespace boost { namespace interprocess { namespace test {
Modified: branches/proto/v3/libs/python/src/object/function.cpp
==============================================================================
--- branches/proto/v3/libs/python/src/object/function.cpp	(original)
+++ branches/proto/v3/libs/python/src/object/function.cpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -565,7 +565,11 @@
 }
 
 
-namespace
+namespace detail
+/* Cannot be anonymous namespace:
+     http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34094
+     http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34229
+ */
 {
   struct bind_return
   {
@@ -610,7 +614,8 @@
     function_call(PyObject *func, PyObject *args, PyObject *kw)
     {
         PyObject* result = 0;
-        handle_exception(bind_return(result, static_cast<function*>(func), args, kw));
+        handle_exception(
+          detail::bind_return(result, static_cast<function*>(func), args, kw));
         return result;
     }
 
Modified: branches/proto/v3/libs/thread/src/pthread/once.cpp
==============================================================================
--- branches/proto/v3/libs/thread/src/pthread/once.cpp	(original)
+++ branches/proto/v3/libs/thread/src/pthread/once.cpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -3,6 +3,7 @@
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
 
+#define __STDC_CONSTANT_MACROS
 #include <boost/thread/once.hpp>
 #include <boost/assert.hpp>
 #include <pthread.h>
@@ -12,7 +13,7 @@
 {
     namespace detail
     {
-        BOOST_THREAD_DECL boost::uintmax_t once_global_epoch=0;
+        BOOST_THREAD_DECL boost::uintmax_t once_global_epoch=UINTMAX_C(~0);
         BOOST_THREAD_DECL pthread_mutex_t once_epoch_mutex=PTHREAD_MUTEX_INITIALIZER;
         BOOST_THREAD_DECL pthread_cond_t once_epoch_cv = PTHREAD_COND_INITIALIZER;
 
@@ -41,7 +42,7 @@
             {
                 data=malloc(sizeof(boost::uintmax_t));
                 BOOST_VERIFY(!pthread_setspecific(epoch_tss_key,data));
-                *static_cast<boost::uintmax_t*>(data)=0;
+                *static_cast<boost::uintmax_t*>(data)=UINTMAX_C(~0);
             }
             return *static_cast<boost::uintmax_t*>(data);
         }
Modified: branches/proto/v3/libs/thread/test/test_condition.cpp
==============================================================================
--- branches/proto/v3/libs/thread/test/test_condition.cpp	(original)
+++ branches/proto/v3/libs/thread/test/test_condition.cpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -1,5 +1,6 @@
 // Copyright (C) 2001-2003
 // William E. Kempf
+// Copyright (C) 2007 Anthony Williams
 //
 //  Distributed under the Boost Software License, Version 1.0. (See accompanying 
 //  file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
@@ -19,7 +20,7 @@
     condition_test_data() : notified(0), awoken(0) { }
 
     boost::mutex mutex;
-    boost::condition condition;
+    boost::condition_variable condition;
     int notified;
     int awoken;
 };
@@ -82,6 +83,15 @@
     BOOST_CHECK_EQUAL(data->notified, 4);
     data->awoken++;
     data->condition.notify_one();
+
+    // Test predicate timed_wait with relative timeout
+    cond_predicate pred_rel(data->notified, 5);
+    BOOST_CHECK(data->condition.timed_wait(lock, boost::posix_time::seconds(10), pred_rel));
+    BOOST_CHECK(lock ? true : false);
+    BOOST_CHECK(pred_rel());
+    BOOST_CHECK_EQUAL(data->notified, 5);
+    data->awoken++;
+    data->condition.notify_one();
 }
 
 void do_test_condition_notify_one()
@@ -185,10 +195,19 @@
             data.condition.wait(lock);
         BOOST_CHECK(lock ? true : false);
         BOOST_CHECK_EQUAL(data.awoken, 4);
+
+
+        boost::thread::sleep(delay(1));
+        data.notified++;
+        data.condition.notify_one();
+        while (data.awoken != 5)
+            data.condition.wait(lock);
+        BOOST_CHECK(lock ? true : false);
+        BOOST_CHECK_EQUAL(data.awoken, 5);
     }
 
     thread.join();
-    BOOST_CHECK_EQUAL(data.awoken, 4);
+    BOOST_CHECK_EQUAL(data.awoken, 5);
 }
 
 void test_condition_waits()
@@ -216,6 +235,32 @@
     timed_test(&do_test_condition_wait_is_a_interruption_point, 1);
 }
 
+bool fake_predicate()
+{
+    return false;
+}
+
+
+void do_test_timed_wait_times_out()
+{
+    boost::condition_variable cond;
+    boost::mutex m;
+
+    boost::posix_time::seconds const delay(5);
+    boost::mutex::scoped_lock lock(m);
+    boost::system_time const start=boost::get_system_time();
+    bool const res=cond.timed_wait(lock,delay,fake_predicate);
+    boost::system_time const end=boost::get_system_time();
+    BOOST_CHECK(!res);
+    BOOST_CHECK((delay-boost::posix_time::milliseconds(10))<=(end-start));
+}
+
+
+void test_timed_wait_times_out()
+{
+    timed_test(&do_test_timed_wait_times_out, 15);
+}
+
 
 boost::unit_test_framework::test_suite* init_unit_test_suite(int, char*[])
 {
@@ -226,6 +271,7 @@
     test->add(BOOST_TEST_CASE(&test_condition_notify_all));
     test->add(BOOST_TEST_CASE(&test_condition_waits));
     test->add(BOOST_TEST_CASE(&test_condition_wait_is_a_interruption_point));
+    test->add(BOOST_TEST_CASE(&test_timed_wait_times_out));
 
     return test;
 }
Modified: branches/proto/v3/libs/utility/value_init_test.cpp
==============================================================================
--- branches/proto/v3/libs/utility/value_init_test.cpp	(original)
+++ branches/proto/v3/libs/utility/value_init_test.cpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -73,6 +73,58 @@
 bool operator == ( AggregatePODStruct const& lhs, AggregatePODStruct const& rhs )
 { return lhs.f == rhs.f && lhs.c == rhs.c && lhs.i == rhs.i ; }
 
+//
+// An aggregate struct that contains an std::string and an int.
+// Pavel Kuznetsov (MetaCommunications Engineering) used a struct like
+// this to reproduce the Microsoft Visual C++ compiler bug, reported as
+// Feedback ID 100744, "Value-initialization in new-expression"
+// https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=100744
+//
+struct StringAndInt
+{
+  std::string s;
+  int i;
+};
+
+bool operator == ( StringAndInt const& lhs, StringAndInt const& rhs )
+{ return lhs.s == rhs.s && lhs.i == rhs.i ; }
+
+
+//
+// A struct that has an explicit (user defined) destructor.
+// Some compilers do not correctly value-initialize such a struct, for example:
+// Microsoft Visual C++, Feedback ID 100744, "Value-initialization in new-expression"
+// https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=100744
+//
+struct StructWithDestructor
+{
+  int i;
+  ~StructWithDestructor() {}
+};
+
+bool operator == ( StructWithDestructor const& lhs, StructWithDestructor const& rhs )
+{ return lhs.i == rhs.i ; }
+
+
+//
+// A struct that has a virtual function.
+// Some compilers do not correctly value-initialize such a struct either, for example:
+// Microsoft Visual C++, Feedback ID 100744, "Value-initialization in new-expression"
+// https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=100744
+//
+struct StructWithVirtualFunction
+{
+  int i;
+  virtual void VirtualFunction(); 
+};
+
+void StructWithVirtualFunction::VirtualFunction()
+{
+}
+
+bool operator == ( StructWithVirtualFunction const& lhs, StructWithVirtualFunction const& rhs )
+{ return lhs.i == rhs.i ; }
+
 
 //
 // This test function tests boost::value_initialized<T> for a specific type T.
@@ -123,13 +175,27 @@
   AggregatePODStruct nonZeroInitializedAggregatePODStruct = { 1.25f, 'a', -1 };
   BOOST_CHECK ( test(zeroInitializedAggregatePODStruct, nonZeroInitializedAggregatePODStruct) );
 
+  StringAndInt stringAndInt0;
+  StringAndInt stringAndInt1;
+  stringAndInt0.i = 0;
+  stringAndInt1.i = 1;
+  stringAndInt1.s = std::string("1");
+  BOOST_CHECK ( test(stringAndInt0, stringAndInt1) );
+
+  StructWithDestructor structWithDestructor0;
+  StructWithDestructor structWithDestructor1;
+  structWithDestructor0.i = 0;
+  structWithDestructor1.i = 1;
+  BOOST_CHECK ( test(structWithDestructor0, structWithDestructor1) );
+
+  StructWithVirtualFunction structWithVirtualFunction0;
+  StructWithVirtualFunction structWithVirtualFunction1;
+  structWithVirtualFunction0.i = 0;
+  structWithVirtualFunction1.i = 1;
+  BOOST_CHECK ( test(structWithVirtualFunction0, structWithVirtualFunction1) );
+
   return 0;
 }
 
 
 unsigned int expected_failures = 0;
-
-
-
-
-
Modified: branches/proto/v3/libs/xpressive/test/regress.ipp
==============================================================================
--- branches/proto/v3/libs/xpressive/test/regress.ipp	(original)
+++ branches/proto/v3/libs/xpressive/test/regress.ipp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -84,14 +84,6 @@
 // The global object that contains the current test case
 xpr_test_case<char> test;
 
-sregex const rx_sec = '[' >> (s1= +_) >> ']';
-sregex const rx_str = "str=" >> (s1= *_);
-sregex const rx_pat = "pat=" >> (s1= *_);
-sregex const rx_flg = "flg=" >> (s1= *_);
-sregex const rx_sub = "sub=" >> (s1= *_);
-sregex const rx_res = "res=" >> (s1= *_);
-sregex const rx_br = "br" >> (s1= +digit) >> '=' >> (s2= *_);
-
 struct test_case_formatter
 {
     friend std::ostream &operator <<(std::ostream &sout, test_case_formatter)
@@ -169,6 +161,14 @@
     std::string line;
     smatch what;
 
+    sregex const rx_sec = '[' >> (s1= +_) >> ']';
+    sregex const rx_str = "str=" >> (s1= *_);
+    sregex const rx_pat = "pat=" >> (s1= *_);
+    sregex const rx_flg = "flg=" >> (s1= *_);
+    sregex const rx_sub = "sub=" >> (s1= *_);
+    sregex const rx_res = "res=" >> (s1= *_);
+    sregex const rx_br = "br" >> (s1= +digit) >> '=' >> (s2= *_);
+
     while(in.good())
     {
         std::getline(in, line);
Modified: branches/proto/v3/libs/xpressive/test/test.hpp
==============================================================================
--- branches/proto/v3/libs/xpressive/test/test.hpp	(original)
+++ branches/proto/v3/libs/xpressive/test/test.hpp	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -35,6 +35,9 @@
 ///////////////////////////////////////////////////////////////////////////////
 // backrefs
 //
+#if defined(__cplusplus_cli)
+#pragma managed(push, off)
+#endif
 template<typename Char>
 inline std::vector<std::basic_string<Char> > backrefs(Char const *br0, ...)
 {
@@ -54,6 +57,9 @@
     }
     return backrefs;
 }
+#if defined(__cplusplus_cli)
+#pragma managed(pop)
+#endif
 
 ///////////////////////////////////////////////////////////////////////////////
 //
Modified: branches/proto/v3/status/explicit-failures-markup.xml
==============================================================================
--- branches/proto/v3/status/explicit-failures-markup.xml	(original)
+++ branches/proto/v3/status/explicit-failures-markup.xml	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -2629,6 +2629,7 @@
             <test name="test_demo_portable_archive"/>
             <test name="test_demo_portable_archive_dll"/>
             <toolset name="acc*"/>
+            <toolset name="gcc*hpux*"/>
             <note author="Boris Gubenko">
               This failure is caused by serialization library bug in the
               code visible only on big endian platforms.
@@ -3925,11 +3926,18 @@
             </note>
         </mark-unusable>
         <mark-unusable>
-            <toolset name="sun-5.8*"/>
+            <toolset name="sun-5.6*"/>
             <note author="David Abrahams">
-            This compiler seems to be having trouble digesting
+              The old reasoning given for this markup, which applied
+              to sun-5.8*, was as follows.  However, tuple's tests
+              seem to use the test library, which is apparently
+              completely broken on Sun.  Therefore, I've backed off
+              the version number to sun-5.6 so I can see the actual
+              state of the failures.
+
+            <blockquote>This compiler seems to be having trouble digesting
             Boost.Tuple.  Until it can handle Boost.Tuple there's
-            little chance it will handle Boost.Python
+            little chance it will handle Boost.Python</blockquote>
             </note>
         </mark-unusable>
         <mark-expected-failures>
@@ -5409,6 +5417,22 @@
             </note>
         </mark-expected-failures>
         <mark-expected-failures>
+            <test name="value_init_test"/>
+            <toolset name="borland-5.6*"/>
+            <toolset name="borland-5.8*"/>
+            <toolset name="borland-5.9*"/>
+            <note author="Niels Dekker">
+                This test typically fails on Borland C++, because of an issue described by
+                <a href="http://svn.boost.org/trac/boost/ticket/1459">
+                ticket #1459, "value_initialized leaves data uninitialized,
+                when using Borland"</a>. The issue is caused by a 
+                compiler bug, reported at the website of Codegear/Borland:
+                <a href="http://qc.codegear.com/wc/qcmain.aspx?d=51854">
+                Report #51854, "Value-initialization: POD struct
+                should be zero-initialized"</a>.
+            </note>
+        </mark-expected-failures>
+        <mark-expected-failures>
             <test name="operators_test"/>
             <toolset name="gcc-3.4.5_linux_x86_64"/>
             <note author="Vladimir Prus">
Modified: branches/proto/v3/tools/build/v2/build-system.jam
==============================================================================
--- branches/proto/v3/tools/build/v2/build-system.jam	(original)
+++ branches/proto/v3/tools/build/v2/build-system.jam	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -578,8 +578,8 @@
     # actions clause we would have to form a valid command line
     # containing the result of @(...) below (the name of the XML file).
     rule out-xml.generate-action (
-        xml-file args * :
-        status : user : system : command : output ? )
+        args * : xml-file :
+        command status start end user system : output ? )
     {
         local contents =
             [ on $(xml-file) return $(.header) $(.contents) $(.footer) ] ;
@@ -598,14 +598,14 @@
     # statistics about each actual target in a variable "on" the
     # --out-xml target.
     rule out-xml.collect (
-        xml-file target :
-        status : user : system : command : output ? )
+        xml-file : target :
+        command status start end user system : output ? )
     {
         local nl = "
 " ;
         # Open the action with some basic info.
         .contents on $(xml-file) +=
-            "$(nl)  <action status=\"$(status)\" user=\"$(user)\" system=\"$(system)\">"
+            "$(nl)  <action status=\"$(status)\" start=\"$(start)\" end=\"$(end)\" user=\"$(user)\" system=\"$(system)\">"
             ;
         
         # If we have an action object we can print out more detailed info.
Modified: branches/proto/v3/tools/build/v2/tools/doxproc.py
==============================================================================
--- branches/proto/v3/tools/build/v2/tools/doxproc.py	(original)
+++ branches/proto/v3/tools/build/v2/tools/doxproc.py	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -530,6 +530,12 @@
     def _translate_sectiondef_private_func( self, sectiondef, target=None, **kwargs ):
         return self._translate_sectiondef_func_(sectiondef,
             name='private member functions',target=target,**kwargs)
+
+    #~ Translate:
+    #~   <sectiondef kind="user-defined"><header>...</header>...</sectiondef>
+    def _translate_sectiondef_user_defined( self, sectiondef, target=None, **kwargs ):
+        return self._translate_sectiondef_func_(sectiondef,
+            name=self._getChildData('header', root=sectiondef),target=target,**kwargs)
     
     #~ Translate:
     #~   <memberdef kind="typedef" id="?">
@@ -829,11 +835,11 @@
     #~ and definitions so that lookup is unambiguous when reading in the definitions.
     namespace_files = filter(
         lambda x:
-            os.path.basename(x).startswith('namespace_'),
+            os.path.basename(x).startswith('namespace'),
         input)
     decl_files = filter(
         lambda x:
-            not os.path.basename(x).startswith('namespace_') and not os.path.basename(x).startswith('_'),
+            not os.path.basename(x).startswith('namespace') and not os.path.basename(x).startswith('_'),
         input)
     for dox in namespace_files:
         #~ print '--|',os.path.basename(dox)
Modified: branches/proto/v3/tools/build/v2/tools/pathscale.jam
==============================================================================
--- branches/proto/v3/tools/build/v2/tools/pathscale.jam	(original)
+++ branches/proto/v3/tools/build/v2/tools/pathscale.jam	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -129,7 +129,7 @@
 
 actions link bind LIBRARIES
 {
-    "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -Wl,-rpath,"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST)
+    "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST)
 }
 
 # Slight mods for dlls
@@ -140,7 +140,7 @@
 
 actions link.dll bind LIBRARIES
 {
-    "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -Wl,-rpath,"$(RPATH)" -o "$(<)" -Wl,-soname$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST)
+    "$(CONFIG_COMMAND)" $(OPTIONS) -L"$(LINKPATH)" -Wl,$(RPATH_OPTION:E=-R)$(SPACE)-Wl,"$(RPATH)" -o "$(<)" -Wl,-soname$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST)
 }
 
 # Declare action for creating static libraries
Modified: branches/proto/v3/tools/jam/src/execcmd.h
==============================================================================
--- branches/proto/v3/tools/jam/src/execcmd.h	(original)
+++ branches/proto/v3/tools/jam/src/execcmd.h	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -10,23 +10,31 @@
  * 05/04/94 (seiwald) - async multiprocess interface
  */
 
+#ifndef EXECCMD_H
+#define EXECCMD_H
+
+#include <time.h>
+
 typedef struct timing_info
 {
-    /* double elapsed; */  /* We don't know how to get this number on Unix */
     double system;
     double user;
+    time_t start;
+    time_t end;
 } timing_info;
 
 void execcmd(
-	char *string,
-	void (*func)( void *closure, int status, timing_info*, char *, char * ),
-	void *closure,
-	LIST *shell,
+    char *string,
+    void (*func)( void *closure, int status, timing_info*, char *, char * ),
+    void *closure,
+    LIST *shell,
         char *action,
         char *target);
 
 int execwait();
 
-# define EXEC_CMD_OK	0
-# define EXEC_CMD_FAIL	1
-# define EXEC_CMD_INTR	2
+# define EXEC_CMD_OK    0
+# define EXEC_CMD_FAIL  1
+# define EXEC_CMD_INTR  2
+
+#endif
Modified: branches/proto/v3/tools/jam/src/execnt.c
==============================================================================
--- branches/proto/v3/tools/jam/src/execnt.c	(original)
+++ branches/proto/v3/tools/jam/src/execnt.c	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -21,6 +21,7 @@
 # include <assert.h>
 # include <ctype.h>
 # include <time.h>
+# include <math.h>
 
 # ifdef USE_EXECNT
 
@@ -758,7 +759,35 @@
 /* Convert a FILETIME to a number of seconds */
 static double filetime_seconds(FILETIME t)
 {
-    return t.dwHighDateTime * (double)(1UL << 31) * 2 + t.dwLowDateTime * 1.0e-7;
+    return t.dwHighDateTime * ((double)(1UL << 31) * 2.0 * 1.0e-7) + t.dwLowDateTime * 1.0e-7;
+}
+
+/* What should be a simple conversion, turns out to be horribly
+ complicated by the defficiencies of MSVC and the Win32 API. */
+static time_t filetime_dt(FILETIME t_utc)
+{
+    static int calc_time_diff = 1;
+    static double time_diff;
+    if ( calc_time_diff )
+    {
+        struct tm t0_;
+        FILETIME f0_local,f0_;
+        SYSTEMTIME s0_;
+        GetSystemTime(&s0_);
+        t0_.tm_year = s0_.wYear-1900;
+        t0_.tm_mon = s0_.wMonth-1;
+        t0_.tm_wday = s0_.wDayOfWeek;
+        t0_.tm_mday = s0_.wDay;
+        t0_.tm_hour = s0_.wHour;
+        t0_.tm_min = s0_.wMinute;
+        t0_.tm_sec = s0_.wSecond;
+        t0_.tm_isdst = 0;
+        SystemTimeToFileTime(&s0_,&f0_local);
+        LocalFileTimeToFileTime(&f0_local,&f0_);
+        time_diff = filetime_seconds(f0_)-((double)mktime(&t0_));
+        calc_time_diff = 0;
+    }
+    return ceil(filetime_seconds(t_utc)-time_diff);
 }
 
 static void record_times(HANDLE process, timing_info* time)
@@ -767,17 +796,11 @@
     
     if (GetProcessTimes(process, &creation, &exit, &kernel, &user))
     {
-        /* Compute the elapsed time */
-        #if 0 /* We don't know how to get this number on Unix */
-        time->elapsed = filetime_seconds(
-            add_FILETIME( exit, negate_FILETIME(creation) )
-            );
-        #endif 
         time->system = filetime_seconds(kernel);
-        time->user = filetime_seconds(user);            
+        time->user = filetime_seconds(user);
+        time->start = filetime_dt(creation);
+        time->end = filetime_dt(exit);
     }
-        
-    /* CloseHandle((HANDLE)pid); */
 }
 
 #define IO_BUFFER_SIZE (16*1024)
Modified: branches/proto/v3/tools/jam/src/execunix.c
==============================================================================
--- branches/proto/v3/tools/jam/src/execunix.c	(original)
+++ branches/proto/v3/tools/jam/src/execunix.c	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -85,6 +85,7 @@
     char   *buffer[2];        /* buffer to hold stdout and stderr, if any */
     void    (*func)( void *closure, int status, timing_info*, char *, char * );
     void   *closure;
+    time_t  start_dt;         /* start of command timestamp */
 } cmdtab[ MAXJOBS ] = {{0}};
 
 /*
@@ -194,6 +195,8 @@
 
         /* Start the command */
 
+        cmdtab[ slot ].start_dt = time(0);
+
         if (0 < globs.timeout) {
             /* 
              * handle hung processes by manually tracking elapsed 
@@ -418,7 +421,7 @@
     int i, ret, fd_max;
     int pid, status, finished;
     int rstat;
-    timing_info time;
+    timing_info time_info;
     fd_set fds;
     struct tms new_time;
 
@@ -491,8 +494,10 @@
 
                         times(&new_time);
 
-                        time.system = (double)(new_time.tms_cstime - old_time.tms_cstime) / CLOCKS_PER_SEC;
-                        time.user = (double)(new_time.tms_cutime - old_time.tms_cutime) / CLOCKS_PER_SEC;
+                        time_info.system = (double)(new_time.tms_cstime - old_time.tms_cstime) / CLOCKS_PER_SEC;
+                        time_info.user = (double)(new_time.tms_cutime - old_time.tms_cutime) / CLOCKS_PER_SEC;
+                        time_info.start = cmdtab[i].start_dt;
+                        time_info.end = time(0);
     
                         old_time = new_time;
 
@@ -508,7 +513,7 @@
                             rstat = EXEC_CMD_OK;
 
                         /* assume -p0 in effect so only pass buffer[0] containing merged output */
-                        (*cmdtab[ i ].func)( cmdtab[ i ].closure, rstat, &time, cmdtab[i].command, cmdtab[i].buffer[0] );
+                        (*cmdtab[ i ].func)( cmdtab[ i ].closure, rstat, &time_info, cmdtab[i].command, cmdtab[i].buffer[0] );
 
                         BJAM_FREE(cmdtab[i].buffer[OUT]);
                         cmdtab[i].buffer[OUT] = 0;
Modified: branches/proto/v3/tools/jam/src/jam.c
==============================================================================
--- branches/proto/v3/tools/jam/src/jam.c	(original)
+++ branches/proto/v3/tools/jam/src/jam.c	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -122,6 +122,7 @@
 # include "strings.h"
 # include "expand.h"
 # include "filesys.h"
+# include "output.h"
 
 /* Macintosh is "special" */
 
@@ -249,9 +250,8 @@
         printf( "-lx     Limit actions to x number of seconds after which they are stopped.\n" );
         printf( "-n      Don't actually execute the updating actions.\n" );
         printf( "-ox     Write the updating actions to file x.\n" );
-	printf( "-px     x=0, pipes action stdout and stderr merged into action output.\n" );
-	printf( "-q      Quit quickly as soon as a target fails.\n" );
-	printf( "-r      Enable Dart results.\n" );
+        printf( "-px     x=0, pipes action stdout and stderr merged into action output.\n" );
+        printf( "-q      Quit quickly as soon as a target fails.\n" );
         printf( "-sx=y   Set variable x=y, overriding environment.\n" );
         printf( "-tx     Rebuild x, even if it is up-to-date.\n" );
         printf( "-v      Print the version of jam and exit.\n" );
@@ -373,19 +373,7 @@
 
     /* Set JAMDATE first */
 
-    {
-        char *date;
-        time_t clock;
-        time( &clock );
-        date = newstr( ctime( &clock ) );
-
-        /* Trim newline from date */
-
-        if( strlen( date ) == 25 )
-            date[ 24 ] = 0;
-
-        var_set( "JAMDATE", list_new( L0, newstr( date ) ), VAR_SET );
-    }
+    var_set( "JAMDATE", list_new( L0, outf_time(time(0)) ), VAR_SET );
 
  
     var_set( "JAM_VERSION",
Modified: branches/proto/v3/tools/jam/src/make1.c
==============================================================================
--- branches/proto/v3/tools/jam/src/make1.c	(original)
+++ branches/proto/v3/tools/jam/src/make1.c	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -664,16 +664,6 @@
         }
 }
 
-/* To l, append a 1-element list containing the string representation
- * of x
- */
-static void append_double_string( LOL *l, double x )
-{
-    char buffer[50];
-    sprintf(buffer, "%f", x);
-    lol_add( l, list_new( L0, newstr( buffer ) ) );
-}
-
 /* Look up the __TIMING_RULE__ variable on the given target, and if
  * non-empty, invoke the rule it names, passing the given
  * timing_info
@@ -688,33 +678,37 @@
 
     if (timing_rule)
     {
-        /* We'll prepend $(__TIMING_RULE__[2-]) to the first argument */
-        LIST* initial_args = list_copy( L0, timing_rule->next );
-            
+        /* rule timing-rule (
+            args * :
+            target :
+            start end user system ) */
+
         /* Prepare the argument list */
         FRAME frame[1];
         frame_init( frame );
 
-        /* First argument is the name of the timed target */
-        lol_add( frame->args, list_new( initial_args, target->name ) );
-        append_double_string(frame->args, time->user);
-        append_double_string(frame->args, time->system);
-
-        if( lol_get( frame->args, 2 ) )
-            evaluate_rule( timing_rule->string, frame );
-            
+        /* args * :: $(__ACTION_RULE__[2-]) */
+        lol_add( frame->args, list_copy( L0, timing_rule->next ) );
+
+        /* target :: the name of the target */
+        lol_add( frame->args, list_new( L0, target->name ) );
+
+        /* start end user system :: info about the action command */
+        lol_add( frame->args,
+            list_new( list_new( list_new( list_new( L0,
+                outf_time(time->start) ),
+                outf_time(time->end) ),
+                outf_double(time->user) ),
+                outf_double(time->system) ) );
+
+        /* Call the rule. */
+        evaluate_rule( timing_rule->string, frame );
+
         /* Clean up */
         frame_free( frame );
     }
 }
 
-static void append_int_string(LOL *l, int x)
-{
-    char buffer[50];
-    sprintf(buffer, "%i", x);
-    lol_add(l, list_new(L0, newstr(buffer)));
-}
-
 /* Look up the __ACTION_RULE__ variable on the given target, and if
  * non-empty, invoke the rule it names, passing the given info, 
  * timing_info, executed command and command output
@@ -730,27 +724,40 @@
 
     if (action_rule)
     {
-        /* We'll prepend $(__ACTION_RULE__[2-]) to the first argument */
-        LIST* initial_args = list_copy( L0, action_rule->next );
-            
+        /* rule action-rule (
+            args * :
+            target :
+            command status start end user system :
+            output ? ) */
+
         /* Prepare the argument list */
         FRAME frame[1];
         frame_init( frame );
 
-        /* First argument is the name of the target */
-        lol_add( frame->args, list_new( initial_args, target->name ) );
-        append_int_string(frame->args, status);
-        append_double_string(frame->args, time->user);
-        append_double_string(frame->args, time->system);
-        lol_add(frame->args, list_new(L0, newstr(executed_command)));
+        /* args * :: $(__ACTION_RULE__[2-]) */
+        lol_add( frame->args, list_copy( L0, action_rule->next ) );
+
+        /* target :: the name of the target */
+        lol_add( frame->args, list_new( L0, target->name ) );
+
+        /* command status start end user system :: info about the action command */
+        lol_add( frame->args,
+            list_new( list_new( list_new( list_new( list_new( list_new( L0,
+                newstr(executed_command) ),
+                outf_int(status) ),
+                outf_time(time->start) ),
+                outf_time(time->end) ),
+                outf_double(time->user) ),
+                outf_double(time->system) ) );
 
+        /* output ? :: the output of the action command */
         if (command_output)
             lol_add(frame->args, list_new(L0, newstr(command_output)));
         else
             lol_add(frame->args, L0);
 
-        if( lol_get( frame->args, 2 ) )
-            evaluate_rule( action_rule->string, frame );
+        /* Call the rule. */
+        evaluate_rule( action_rule->string, frame );
 
         /* Clean up */
         frame_free( frame );
Modified: branches/proto/v3/tools/jam/src/output.c
==============================================================================
--- branches/proto/v3/tools/jam/src/output.c	(original)
+++ branches/proto/v3/tools/jam/src/output.c	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -6,6 +6,7 @@
 
 #include "jam.h"
 #include "output.h"
+#include "newstr.h"
 #include <stdio.h>
 
 #define bjam_out (stdout)
@@ -95,3 +96,26 @@
     fflush(bjam_err);
     fflush(globs.cmdout);
 }
+
+
+char * outf_int( int value )
+{
+    char buffer[50];
+    sprintf(buffer, "%i", value);
+    return newstr(buffer);
+}
+
+char * outf_double( double value )
+{
+    char buffer[50];
+    sprintf(buffer, "%f", value);
+    return newstr(buffer);
+}
+
+char * outf_time( time_t value )
+{
+    char buffer[50];
+    strftime(buffer,49,"%Y-%m-%d %H:%M:%SZ",gmtime(&value));
+    return newstr(buffer);
+}
+
Modified: branches/proto/v3/tools/jam/src/output.h
==============================================================================
--- branches/proto/v3/tools/jam/src/output.h	(original)
+++ branches/proto/v3/tools/jam/src/output.h	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -7,6 +7,8 @@
 #ifndef BJAM_OUTPUT_H
 #define BJAM_OUTPUT_H
 
+#include <time.h>
+
 #define EXIT_OK 0
 #define EXIT_FAIL 1
 #define EXIT_TIMEOUT 2
@@ -20,4 +22,8 @@
     int exit_reason
     );
 
+char * outf_int( int value );
+char * outf_double( double value );
+char * outf_time( time_t value );
+
 #endif
Modified: branches/proto/v3/tools/jam/src/strings.c
==============================================================================
--- branches/proto/v3/tools/jam/src/strings.c	(original)
+++ branches/proto/v3/tools/jam/src/strings.c	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -16,6 +16,14 @@
 static void assert_invariants( string* self )
 {
     int i;
+
+    if ( self->value == 0 )
+    {
+        assert( self->size == 0 );
+        assert( self->capacity == 0 );
+        assert( self->opt[0] == 0 );
+        return;
+    }
     
     assert( self->size < self->capacity );
     assert( ( self->capacity <= sizeof(self->opt) ) == ( self->value == self->opt ) );
@@ -49,6 +57,7 @@
     assert_invariants( s );
     if ( s->value != s->opt )
         BJAM_FREE( s->value );
+    string_new( s );
 }
 
 static void string_reserve_internal( string* self, size_t capacity )
Modified: branches/proto/v3/tools/jam/src/variable.c
==============================================================================
--- branches/proto/v3/tools/jam/src/variable.c	(original)
+++ branches/proto/v3/tools/jam/src/variable.c	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -177,143 +177,147 @@
 
 int
 var_string(
-	char	*in,
-	char	*out,
-	int	outsize,
-	LOL	*lol )
+    char *in,
+    char *out,
+    int outsize,
+    LOL *lol )
 {
-	char 	*out0 = out;
-	char	*oute = out + outsize - 1;
+    char *out0 = out;
+    char *oute = out + outsize - 1;
 
-	while( *in )
-	{
-	    char	*lastword;
-	    int		dollar = 0;
+    while( *in )
+    {
+        char	*lastword;
+        int		dollar = 0;
 
-	    /* Copy white space */
+        /* Copy white space */
 
-	    while( isspace( *in ) )
-	    {
-		if( out >= oute )
-		    return -1;
+        while( isspace( *in ) )
+        {
+            if( out >= oute )
+                return -1;
 
-		*out++ = *in++;
-	    }
+            *out++ = *in++;
+        }
 
-	    lastword = out;
+        lastword = out;
 
-	    /* Copy non-white space, watching for variables */
+        /* Copy non-white space, watching for variables */
 
-	    while( *in && !isspace( *in ) )
-	    {
-	        if( out >= oute )
-		    return -1;
+        while( *in && !isspace( *in ) )
+        {
+            if( out >= oute )
+                return -1;
 
-		if( in[0] == '$' && in[1] == '(' )
-		    dollar++;
-                #ifdef OPT_AT_FILES
-                else if ( in[0] == '@' && in[1] == '(' )
+            if( in[0] == '$' && in[1] == '(' )
+            {
+                dollar++;
+                *out++ = *in++;
+            }
+            #ifdef OPT_AT_FILES
+            else if ( in[0] == '@' && in[1] == '(' )
+            {
+                int depth = 1;
+                char *ine = in + 2;
+                char *split = 0;
+                
+                /* Scan the content of the response file @() section. */
+                
+                while( *ine && depth > 0 )
                 {
-                    int depth = 1;
-                    char *ine = in + 2;
-                    char *split = 0;
-                    
-                    /* Scan the content of the response file @() section. */
-                    
-                    while( *ine && depth > 0 )
+                    switch( *ine )
                     {
-                        switch( *ine )
+                    case '(':
+                        ++depth;
+                        break;
+                    case ')':
+                        --depth;
+                        break;
+                    case ':':
+                        if( depth == 1 && ine[1] == 'E' && ine[2] == '=' )
                         {
-                        case '(':
-                            ++depth;
-                            break;
-                        case ')':
-                            --depth;
-                            break;
-                        case ':':
-                            if( depth == 1 && ine[1] == 'E' && ine[2] == '=' )
-                            {
-                                split = ine;
-                            }
-                           break;
+                            split = ine;
                         }
-                        ++ine;
+                        break;
                     }
+                    ++ine;
+                }
+                
+                if (!split)
+                {
+                    /*  the @() reference doesn't match the @(foo:E=bar) format.
+                        hence we leave it alone by copying directly to output. */
+                    int l = 0;
+                    if ( out+2 >= oute ) return -1;
+                    *(out++) = '@';
+                    *(out++) = '(';
+                    l = var_string(in+2,out,oute-out,lol);
+                    if ( l < 0 ) return -1;
+                    out += l;
+                    if ( out+1 >= oute ) return -1;
+                    *(out++) = ')';
+                }
+                
+                else if ( depth == 0 )
+                {
+                    string file_name_v;
+                    int file_name_l = 0;
+                    const char * file_name_s = 0;
                     
-                    if (!split)
-                    {
-                        /*  the @() reference doesn't match the @(foo:E=bar) format.
-                            hence we leave it alone by copying directly to output. */
-                        int l = 0;
-                        if ( out+2 >= oute ) return -1;
-                        *(out++) = '@';
-                        *(out++) = '(';
-                        l = var_string(in+2,out,oute-out,lol);
-                        if ( l < 0 ) return -1;
-                        out += l;
-                        if ( out+1 >= oute ) return -1;
-                        *(out++) = ')';
-                        in = ine;
-                    }
+                    /* expand the temporary file name var inline */
+                    #if 0
+                    string_copy(&file_name_v,"$(");
+                    string_append_range(&file_name_v,in+2,split);
+                    string_push_back(&file_name_v,')');
+                    #else
+                    string_new(&file_name_v);
+                    string_append_range(&file_name_v,in+2,split);
+                    #endif
+                    file_name_l = var_string(file_name_v.value,out,oute-out+1,lol);
+                    string_free(&file_name_v);
+                    if ( file_name_l < 0 ) return -1;
+                    file_name_s = out;
                     
-                    else if ( depth == 0 )
+                    /* for stdout/stderr we will create a temp file and generate
+                       a command that outputs the content as needed. */
+                    if ( strcmp( "STDOUT", out ) == 0 || strcmp( "STDERR", out ) == 0 )
                     {
-                        string file_name_v;
-                        int file_name_l = 0;
-                        const char * file_name_s = 0;
-                        
-                        /* expand the temporary file name var inline */
-                        #if 0
-                        string_copy(&file_name_v,"$(");
-                        string_append_range(&file_name_v,in+2,split);
-                        string_push_back(&file_name_v,')');
+                        int err_redir = strcmp( "STDERR", out ) == 0;
+                        out[0] = '\0';
+                        file_name_s = path_tmpfile();
+                        file_name_l = strlen(file_name_s);
+                        #ifdef OS_NT
+                        if ( (out+7+file_name_l+(err_redir?5:0)) >= oute ) return -1;
+                        sprintf( out,"type \"%s\"%s",
+                            file_name_s,
+                            err_redir ? " 1>&2" : "" );
                         #else
-                        string_new(&file_name_v);
-                        string_append_range(&file_name_v,in+2,split);
+                        if ( (out+6+file_name_l+(err_redir?5:0)) >= oute ) return -1;
+                        sprintf( out,"cat \"%s\"%s",
+                            file_name_s,
+                            err_redir ? " 1>&2" : "" );
                         #endif
-                        file_name_l = var_string(file_name_v.value,out,oute-out+1,lol);
-                        string_free(&file_name_v);
-                        if ( file_name_l < 0 ) return -1;
-                        file_name_s = out;
-                        
-                        /* for stdout/stderr we will create a temp file and generate
-                           a command that outputs the content as needed. */
-                        if ( strcmp( "STDOUT", out ) == 0 || strcmp( "STDERR", out ) == 0 )
-                        {
-                            int err_redir = strcmp( "STDERR", out ) == 0;
-                            out[0] = '\0';
-                            file_name_s = path_tmpfile();
-                            file_name_l = strlen(file_name_s);
-                            #ifdef OS_NT
-                            if ( (out+7+file_name_l+(err_redir?5:0)) >= oute ) return -1;
-                            sprintf( out,"type \"%s\"%s",
-                                file_name_s,
-                                err_redir ? " 1>&2" : "" );
-                            #else
-                            if ( (out+6+file_name_l+(err_redir?5:0)) >= oute ) return -1;
-                            sprintf( out,"cat \"%s\"%s",
-                                file_name_s,
-                                err_redir ? " 1>&2" : "" );
-                            #endif
-                            /* we also make sure that the temp files created by this
-                               get nuked eventually. */
-                            file_remove_atexit( file_name_s );
-                        }
-                        
-                        /* expand the file value into the file reference */
-                        var_string_to_file( split+3, ine-split-4, file_name_s, lol );
-                        
-                        /* continue on with the expansion */
-                        out += strlen(out);
+                        /* we also make sure that the temp files created by this
+                           get nuked eventually. */
+                        file_remove_atexit( file_name_s );
                     }
                     
-                    /* and continue with the parsing just past the @() reference */
-                    in = ine;
+                    /* expand the file value into the file reference */
+                    var_string_to_file( split+3, ine-split-4, file_name_s, lol );
+                    
+                    /* continue on with the expansion */
+                    out += strlen(out);
                 }
-                #endif
-
-		*out++ = *in++;
-	    }
+                
+                /* and continue with the parsing just past the @() reference */
+                in = ine;
+            }
+            #endif
+            else
+            {
+                *out++ = *in++;
+            }
+        }
 
         /* Add zero to 'out' so that 'lastword' is correctly zero-terminated. */
         if (out >= oute)
@@ -321,40 +325,40 @@
         /* Don't increment, intentionally. */
         *out= '\0';
            
-	    /* If a variable encountered, expand it and and embed the */
-	    /* space-separated members of the list in the output. */
+        /* If a variable encountered, expand it and and embed the */
+        /* space-separated members of the list in the output. */
 
-	    if( dollar )
-	    {
-		LIST	*l;
+        if( dollar )
+        {
+            LIST *l;
 
-		l = var_expand( L0, lastword, out, lol, 0 );
+            l = var_expand( L0, lastword, out, lol, 0 );
 
-		out = lastword;
+            out = lastword;
 
-		while ( l )
-		{
-		    int so = strlen( l->string );
+            while ( l )
+            {
+                int so = strlen( l->string );
 
-		    if( out + so >= oute )
-			return -1;
+                if( out + so >= oute )
+                return -1;
 
-		    strcpy( out, l->string );
-		    out += so;
-		    l = list_next( l );
-		    if ( l ) *out++ = ' ';
-		}
+                strcpy( out, l->string );
+                out += so;
+                l = list_next( l );
+                if ( l ) *out++ = ' ';
+            }
 
-		list_free( l );
-	    }
-	}
+            list_free( l );
+        }
+    }
 
-	if( out >= oute )
-	    return -1;
+    if( out >= oute )
+        return -1;
 
-	*out++ = '\0';
+    *out++ = '\0';
 
-	return out - out0;
+    return out - out0;
 }
 
 void var_string_to_file( const char * in, int insize, const char * out, LOL * lol )
Modified: branches/proto/v3/tools/jam/test/test.jam
==============================================================================
--- branches/proto/v3/tools/jam/test/test.jam	(original)
+++ branches/proto/v3/tools/jam/test/test.jam	2007-11-28 17:03:59 EST (Wed, 28 Nov 2007)
@@ -41,6 +41,7 @@
     }
 }
 
+include action_status.jam ;
 include actions_quietly.jam ;
 include builtin_shell.jam ;
 include builtin_w32_getregnames.jam ;