Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r63010 - trunk/boost/test/impl
From: steven_at_[hidden]
Date: 2010-06-15 22:31:08


Author: steven_watanabe
Date: 2010-06-15 22:31:08 EDT (Tue, 15 Jun 2010)
New Revision: 63010
URL: http://svn.boost.org/trac/boost/changeset/63010

Log:
Fix Boost.Test on msvc 7.1 based on a patch from David Walthall
Text files modified:
   trunk/boost/test/impl/execution_monitor.ipp | 12 +++++++++++-
   1 files changed, 11 insertions(+), 1 deletions(-)

Modified: trunk/boost/test/impl/execution_monitor.ipp
==============================================================================
--- trunk/boost/test/impl/execution_monitor.ipp (original)
+++ trunk/boost/test/impl/execution_monitor.ipp 2010-06-15 22:31:08 EDT (Tue, 15 Jun 2010)
@@ -1083,7 +1083,7 @@
             reinterpret_cast<_invalid_parameter_handler>( &detail::invalid_param_handler ) );
     } else if( !p_detect_fp_exceptions ) {
 #if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
- _set_se_translator( &seh_catch_preventer );
+ _set_se_translator( &detail::seh_catch_preventer );
 #endif
     }
 
@@ -1323,6 +1323,10 @@
 #elif defined(BOOST_SEH_BASED_SIGNAL_HANDLING)
     _clearfp();
 
+#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
+ unsigned old_cw = ::_controlfp( 0, 0 );
+ ::_controlfp( old_cw & ~mask, BOOST_FPE_ALL );
+#else
     unsigned old_cw;
     if( ::_controlfp_s( &old_cw, 0, 0 ) != 0 )
                 return BOOST_FPE_INV;
@@ -1330,6 +1334,7 @@
     // Set the control word
     if( ::_controlfp_s( 0, old_cw & ~mask, BOOST_FPE_ALL ) != 0 )
                 return BOOST_FPE_INV;
+#endif
 
         return ~old_cw & BOOST_FPE_ALL;
 #elif defined(__GLIBC__) && defined(__USE_GNU)
@@ -1353,6 +1358,10 @@
 #elif defined(BOOST_SEH_BASED_SIGNAL_HANDLING)
     _clearfp();
 
+#if BOOST_WORKAROUND( BOOST_MSVC, <= 1310)
+ unsigned old_cw = ::_controlfp( 0, 0 );
+ ::_controlfp( old_cw | mask, BOOST_FPE_ALL );
+#else
     unsigned old_cw;
     if( ::_controlfp_s( &old_cw, 0, 0 ) != 0 )
                 return BOOST_FPE_INV;
@@ -1360,6 +1369,7 @@
     // Set the control word
     if( ::_controlfp_s( 0, old_cw | mask, BOOST_FPE_ALL ) != 0 )
                 return BOOST_FPE_INV;
+#endif
 
     return ~old_cw & BOOST_FPE_ALL;
 #elif defined(__GLIBC__) && defined(__USE_GNU)


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