From 2c1f83de56b6b4884698a96fed4c1f1c0ebccfb1 Mon Sep 17 00:00:00 2001 From: Bryce Adelstein-Lelbach Date: Tue, 23 Nov 2010 03:34:05 +0000 Subject: [PATCH] Added BOOST_HAS_FENV_H detection to Boost.Config (if this macro is defined, then the standard library/platform provide a POSIX compliant implementation of fenv.h). [SVN r66693] --- include/boost/detail/fenv.hpp | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/include/boost/detail/fenv.hpp b/include/boost/detail/fenv.hpp index b4b6b4c..b8e8aa2 100644 --- a/include/boost/detail/fenv.hpp +++ b/include/boost/detail/fenv.hpp @@ -5,6 +5,12 @@ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) =============================================================================*/ +#include + +#if !defined(BOOST_HAS_FENV_H) + #error This platform does not have a floating point environment +#endif + #if !defined(BOOST_DETAIL_FENV_HPP) #define BOOST_DETAIL_FENV_HPP @@ -13,7 +19,6 @@ #if defined(__clang__) && \ defined(__GNU_LIBRARY__) && /* up to version 5 */ \ defined(__GLIBC__) /* version 6 + */ - #define _FENV_H #include @@ -56,16 +61,13 @@ } } #else /* if we're not using GNU's C stdlib, fenv.h should work with clang */ - - #if defined(__CYGWIN__) /* lol cygwin */ - #warn The header is not available for this platform - #elif defined(__SUNPRO_CC) /* lol suncc */ + #if defined(__SUNPRO_CC) /* lol suncc */ #include - #include - #else - #include #endif + + #include #endif -#endif /* BOOST_DETAIL_FENV_HPP */ +#endif /* BOOST_DETAIL_FENV_HPP */ +