Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r64719 - in sandbox/chrono/libs/chrono/src: . mac posix win
From: vicente.botet_at_[hidden]
Date: 2010-08-10 03:24:12


Author: viboes
Date: 2010-08-10 03:23:59 EDT (Tue, 10 Aug 2010)
New Revision: 64719
URL: http://svn.boost.org/trac/boost/changeset/64719

Log:
* Take care of Boost.System break on version 1.44

Text files modified:
   sandbox/chrono/libs/chrono/src/mac/chrono.cpp | 8 ++++----
   sandbox/chrono/libs/chrono/src/mac/process_clock.cpp | 4 ++--
   sandbox/chrono/libs/chrono/src/posix/chrono.cpp | 8 ++++----
   sandbox/chrono/libs/chrono/src/posix/process_clock.cpp | 4 ++--
   sandbox/chrono/libs/chrono/src/posix/thread_clock.cpp | 4 ++--
   sandbox/chrono/libs/chrono/src/run_timer.cpp | 2 +-
   sandbox/chrono/libs/chrono/src/win/chrono.cpp | 4 ++--
   sandbox/chrono/libs/chrono/src/win/process_clock.cpp | 2 +-
   sandbox/chrono/libs/chrono/src/win/thread_clock.cpp | 4 ++--
   9 files changed, 20 insertions(+), 20 deletions(-)

Modified: sandbox/chrono/libs/chrono/src/mac/chrono.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/mac/chrono.cpp (original)
+++ sandbox/chrono/libs/chrono/src/mac/chrono.cpp 2010-08-10 03:23:59 EDT (Tue, 10 Aug 2010)
@@ -104,7 +104,7 @@
     static const double factor = compute_monotonic_factor(err);
     if (err != 0)
       boost::throw_exception(
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
         system::system_error( err, system::system_category, "chrono::monotonic_clock" ));
 #else
         system::system_error( err, system::system_category(), "chrono::monotonic_clock" ));
@@ -119,7 +119,7 @@
     static kern_return_t err;
     static const double factor = compute_monotonic_factor(err);
     if (err != 0) {
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
       ec.assign( errno, system::system_category );
 #else
       ec.assign( errno, system::system_category() );
@@ -170,7 +170,7 @@
     static kern_return_t err;
     static FP fp = init_monotonic_clock(err);
     if( err != 0 ) boost::throw_exception(
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
         system::system_error( err, system::system_category, "chrono::monotonic_clock" ));
 #else
         system::system_error( err, system::system_category(), "chrono::monotonic_clock" ));
@@ -184,7 +184,7 @@
     static kern_return_t err;
     static FP_ec fp = init_monotonic_clock(err);
     if( err != 0 ) {
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
         ec.assign( err, system::system_category );
 #else
         ec.assign( err, system::system_category() );

Modified: sandbox/chrono/libs/chrono/src/mac/process_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/mac/process_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/src/mac/process_clock.cpp 2010-08-10 03:23:59 EDT (Tue, 10 Aug 2010)
@@ -60,7 +60,7 @@
       {
         assert( 0 && "error handling not implemented yet" );
 
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
           ec.assign( errno, system::system_category );
 #else
           ec.assign( errno, system::system_category() );
@@ -82,7 +82,7 @@
         else
         {
           assert( 0 && "error handling not implemented yet" );
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
           ec.assign( errno, system::system_category );
 #else
           ec.assign( errno, system::system_category() );

Modified: sandbox/chrono/libs/chrono/src/posix/chrono.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/posix/chrono.cpp (original)
+++ sandbox/chrono/libs/chrono/src/posix/chrono.cpp 2010-08-10 03:23:59 EDT (Tue, 10 Aug 2010)
@@ -24,7 +24,7 @@
     if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
     {
       boost::throw_exception(
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
         system::system_error( errno, system::system_category, "chrono::system_clock" ));
 #else
         system::system_error( errno, system::system_category(), "chrono::system_clock" ));
@@ -40,7 +40,7 @@
     timespec ts;
     if ( ::clock_gettime( CLOCK_REALTIME, &ts ) )
     {
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
       ec.assign( errno, system::system_category );
 #else
       ec.assign( errno, system::system_category() );
@@ -71,7 +71,7 @@
     if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
     {
       boost::throw_exception(
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
         system::system_error( errno, system::system_category, "chrono::monotonic_clock" ));
 #else
         system::system_error( errno, system::system_category(), "chrono::monotonic_clock" ));
@@ -87,7 +87,7 @@
     timespec ts;
     if ( ::clock_gettime( CLOCK_MONOTONIC, &ts ) )
     {
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
       ec.assign( errno, system::system_category );
 #else
       ec.assign( errno, system::system_category() );

Modified: sandbox/chrono/libs/chrono/src/posix/process_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/posix/process_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/src/posix/process_clock.cpp 2010-08-10 03:23:59 EDT (Tue, 10 Aug 2010)
@@ -51,7 +51,7 @@
         if ( c == clock_t(-1) ) // error
         {
             assert( 0 && "error handling not implemented yet" );
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
             ec.assign( errno, system::system_category );
 #else
             ec.assign( errno, system::system_category() );
@@ -72,7 +72,7 @@
             else
             {
                 assert( 0 && "error handling not implemented yet" );
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
                 ec.assign( errno, system::system_category );
 #else
                 ec.assign( errno, system::system_category() );

Modified: sandbox/chrono/libs/chrono/src/posix/thread_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/posix/thread_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/src/posix/thread_clock.cpp 2010-08-10 03:23:59 EDT (Tue, 10 Aug 2010)
@@ -34,7 +34,7 @@
         if ( ::clock_gettime( clock_id, &ts ) )
         {
             boost::throw_exception(
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
             system::system_error( errno, system::system_category, "chrono::thread_clock" ));
 #else
             system::system_error( errno, system::system_category(), "chrono::thread_clock" ));
@@ -56,7 +56,7 @@
         struct timespec ts;
         if ( ::clock_gettime( clock_id, &ts ) )
         {
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
           ec.assign( errno, system::system_category );
 #else
           ec.assign( errno, system::system_category() );

Modified: sandbox/chrono/libs/chrono/src/run_timer.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/run_timer.cpp (original)
+++ sandbox/chrono/libs/chrono/src/run_timer.cpp 2010-08-10 03:23:59 EDT (Tue, 10 Aug 2010)
@@ -154,7 +154,7 @@
         catch (...) // eat any exceptions
         {
           assert( 0 && "error reporting not fully implemented yet" );
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
           ec.assign(system::errc::success, system::generic_category);
 #else
           ec.assign(system::errc::success, system::generic_category());

Modified: sandbox/chrono/libs/chrono/src/win/chrono.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/win/chrono.cpp (original)
+++ sandbox/chrono/libs/chrono/src/win/chrono.cpp 2010-08-10 03:23:59 EDT (Tue, 10 Aug 2010)
@@ -37,7 +37,7 @@
     {
       DWORD cause = (nanosecs_per_tic <= 0.0L ? ERROR_NOT_SUPPORTED : ::GetLastError());
       boost::throw_exception(
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
         system::system_error( cause, system::system_category, "chrono::monotonic_clock" ));
 #else
         system::system_error( cause, system::system_category(), "chrono::monotonic_clock" ));
@@ -56,7 +56,7 @@
     if ( (nanosecs_per_tic <= 0.0L) || (!QueryPerformanceCounter( &pcount )) )
     {
       DWORD cause = ((nanosecs_per_tic <= 0.0L) ? ERROR_NOT_SUPPORTED : ::GetLastError());
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
       ec.assign( cause, system::system_category );
 #else
       ec.assign( cause, system::system_category() );

Modified: sandbox/chrono/libs/chrono/src/win/process_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/win/process_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/src/win/process_clock.cpp 2010-08-10 03:23:59 EDT (Tue, 10 Aug 2010)
@@ -48,7 +48,7 @@
       else
       {
         //~ assert( 0 && "error handling not implemented yet" );
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
         ec.assign( ::GetLastError(), system::system_category );
 #else
         ec.assign( ::GetLastError(), system::system_category() );

Modified: sandbox/chrono/libs/chrono/src/win/thread_clock.cpp
==============================================================================
--- sandbox/chrono/libs/chrono/src/win/thread_clock.cpp (original)
+++ sandbox/chrono/libs/chrono/src/win/thread_clock.cpp 2010-08-10 03:23:59 EDT (Tue, 10 Aug 2010)
@@ -48,7 +48,7 @@
       else
       {
         //~ assert( 0 && "error handling not implemented yet" );
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
         ec.assign( ::GetLastError(), system::system_category );
 #else
         ec.assign( ::GetLastError(), system::system_category() );
@@ -82,7 +82,7 @@
       else
       {
         boost::throw_exception(
-#if (BOOST_VERSION / 100 % 1000) < 44
+#if ((BOOST_VERSION / 100000) < 2) && ((BOOST_VERSION / 100 % 1000) < 44)
             system::system_error( ::GetLastError(), system::system_category, "chrono::monotonic_clock" ));
 #else
             system::system_error( ::GetLastError(), system::system_category(), "chrono::monotonic_clock" ));


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk