From b5c87084afaef42b2d058f68091be31988a6a874 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 13 Sep 2017 11:08:07 +0900 Subject: Imported Upstream version 1.64.0 Change-Id: Id9212edd016dd55f21172c427aa7894d1d24148b Signed-off-by: DongHun Kwak --- boost/test/impl/execution_monitor.ipp | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) (limited to 'boost/test/impl/execution_monitor.ipp') diff --git a/boost/test/impl/execution_monitor.ipp b/boost/test/impl/execution_monitor.ipp index 3ddcf67137..0c5690ca89 100644 --- a/boost/test/impl/execution_monitor.ipp +++ b/boost/test/impl/execution_monitor.ipp @@ -32,7 +32,7 @@ #include // for exit codes #include // for workarounds #include // for ignore_unused -#ifndef BOOST_NO_EXCEPTION +#ifndef BOOST_NO_EXCEPTIONS #include // for get_error_info #include // for current_exception_cast #endif @@ -196,7 +196,7 @@ namespace boost { // ************** throw_exception ************** // // ************************************************************************** // -#ifdef BOOST_NO_EXCEPTION +#ifdef BOOST_NO_EXCEPTIONS void throw_exception( std::exception const & e ) { abort(); } #endif @@ -216,7 +216,7 @@ namespace detail { # define BOOST_TEST_VSNPRINTF( a1, a2, a3, a4 ) vsnprintf( (a1), (a2), (a3), (a4) ) #endif -#ifndef BOOST_NO_EXCEPTION +#ifndef BOOST_NO_EXCEPTIONS template typename ErrorInfo::value_type @@ -1285,7 +1285,7 @@ execution_monitor::execute( boost::function const& F ) catch( ... ) { detail::report_error( execution_exception::cpp_exception_error, "unknown type" ); } -#endif // !BOOST_NO_EXCEPTION +#endif // !BOOST_NO_EXCEPTIONS return 0; // never reached; supplied to quiet compiler warnings } // execute @@ -1354,11 +1354,7 @@ unsigned enable( unsigned mask ) { boost::ignore_unused(mask); - -#if defined(UNDER_CE) - /* Not Implemented in Windows CE */ - return BOOST_FPE_OFF; -#elif defined(BOOST_SEH_BASED_SIGNAL_HANDLING) +#if defined(BOOST_TEST_FPE_SUPPORT_WITH_SEH__) _clearfp(); #if BOOST_WORKAROUND( BOOST_MSVC, <= 1310) @@ -1373,9 +1369,10 @@ enable( unsigned mask ) 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) + +#elif defined(BOOST_TEST_FPE_SUPPORT_WITH_GLIBC_EXTENSIONS__) + // same macro definition as in execution_monitor.hpp if (BOOST_FPE_ALL == BOOST_FPE_OFF) /* Not Implemented */ return BOOST_FPE_OFF; @@ -1395,12 +1392,8 @@ disable( unsigned mask ) { boost::ignore_unused(mask); -#if defined(UNDER_CE) - /* Not Implemented in Windows CE */ - return BOOST_FPE_INV; -#elif defined(BOOST_SEH_BASED_SIGNAL_HANDLING) +#if defined(BOOST_TEST_FPE_SUPPORT_WITH_SEH__) _clearfp(); - #if BOOST_WORKAROUND( BOOST_MSVC, <= 1310) unsigned old_cw = ::_controlfp( 0, 0 ); ::_controlfp( old_cw | mask, BOOST_FPE_ALL ); @@ -1413,9 +1406,9 @@ disable( unsigned mask ) 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) + +#elif defined(BOOST_TEST_FPE_SUPPORT_WITH_GLIBC_EXTENSIONS__) if (BOOST_FPE_ALL == BOOST_FPE_OFF) /* Not Implemented */ return BOOST_FPE_INV; -- cgit v1.2.3