summaryrefslogtreecommitdiff
path: root/boost/test/impl/execution_monitor.ipp
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2017-09-13 11:08:07 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2017-09-13 11:09:00 +0900
commitb5c87084afaef42b2d058f68091be31988a6a874 (patch)
treeadef9a65870a41181687e11d57fdf98e7629de3c /boost/test/impl/execution_monitor.ipp
parent34bd32e225e2a8a94104489b31c42e5801cc1f4a (diff)
downloadboost-b5c87084afaef42b2d058f68091be31988a6a874.tar.gz
boost-b5c87084afaef42b2d058f68091be31988a6a874.tar.bz2
boost-b5c87084afaef42b2d058f68091be31988a6a874.zip
Imported Upstream version 1.64.0upstream/1.64.0
Change-Id: Id9212edd016dd55f21172c427aa7894d1d24148b Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'boost/test/impl/execution_monitor.ipp')
-rw-r--r--boost/test/impl/execution_monitor.ipp29
1 files changed, 11 insertions, 18 deletions
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 <boost/cstdlib.hpp> // for exit codes
#include <boost/config.hpp> // for workarounds
#include <boost/core/ignore_unused.hpp> // for ignore_unused
-#ifndef BOOST_NO_EXCEPTION
+#ifndef BOOST_NO_EXCEPTIONS
#include <boost/exception/get_error_info.hpp> // for get_error_info
#include <boost/exception/current_exception_cast.hpp> // 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>
typename ErrorInfo::value_type
@@ -1285,7 +1285,7 @@ execution_monitor::execute( boost::function<int ()> 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;