Imported Upstream version 1.64.0
[platform/upstream/boost.git] / boost / test / execution_monitor.hpp
index f53348a..adfb033 100644 (file)
 
 #endif
 
+#if defined(BOOST_SEH_BASED_SIGNAL_HANDLING) && !defined(UNDER_CE)
+  //! Indicates tha the floating point exception handling is supported
+  //! through SEH
+  #define BOOST_TEST_FPE_SUPPORT_WITH_SEH__
+#elif !defined(BOOST_SEH_BASED_SIGNAL_HANDLING) && !defined(UNDER_CE)
+  #if !defined(BOOST_NO_FENV_H) && !defined(BOOST_CLANG) && \
+      defined(__GLIBC__) && defined(__USE_GNU) && \
+      !(defined(__UCLIBC__) || defined(__nios2__) || defined(__microblaze__))
+  //! Indicates that floating point exception handling is supported for the
+  //! non SEH version of it, for the GLIBC extensions only
+  // see dicussions on the related topic: https://svn.boost.org/trac/boost/ticket/11756
+  #define BOOST_TEST_FPE_SUPPORT_WITH_GLIBC_EXTENSIONS__
+  #endif
+#endif
+
 
 // Additional macro documentations not being generated without this hack
 #ifdef BOOST_TEST_DOXYGEN_DOC__
@@ -489,7 +504,7 @@ namespace fpe {
 enum masks {
     BOOST_FPE_OFF       = 0,
 
-#ifdef BOOST_SEH_BASED_SIGNAL_HANDLING /* *** */
+#if defined(BOOST_TEST_FPE_SUPPORT_WITH_SEH__) /* *** */
     BOOST_FPE_DIVBYZERO = EM_ZERODIVIDE,
     BOOST_FPE_INEXACT   = EM_INEXACT,
     BOOST_FPE_INVALID   = EM_INVALID,
@@ -498,7 +513,7 @@ enum masks {
 
     BOOST_FPE_ALL       = MCW_EM,
 
-#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) /* *** */
+#elif !defined(BOOST_TEST_FPE_SUPPORT_WITH_GLIBC_EXTENSIONS__)/* *** */
     BOOST_FPE_ALL       = BOOST_FPE_OFF,
 
 #else /* *** */