From 40844fb29ec9994ee70ea017d8008a62ae41f129 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Thu, 5 Oct 2006 21:22:56 +0000 Subject: [PATCH] Only use the float.h macros on OpenBSD, it seems that on FreeBSD numeric_limits is actually a better option. [SVN r35501] --- include/boost/functional/detail/hash_float.hpp | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/include/boost/functional/detail/hash_float.hpp b/include/boost/functional/detail/hash_float.hpp index e2c2738..0e81566 100644 --- a/include/boost/functional/detail/hash_float.hpp +++ b/include/boost/functional/detail/hash_float.hpp @@ -35,13 +35,10 @@ # endif #endif -// On FreeBSD and OpenBSD, numeric_limits is not reliable for long doubles, but -// the macros defined in are. I don't know if this is also be the case for -// other BSDs, but using the macros if they're available seems like the best -// choice. +// On OpenBSD, numeric_limits is not reliable for long doubles, but +// the macros defined in are. -#if defined(__FreeBSD__) || defined(__NetBSD__) || \ - defined(__OpenBSD__) || defined(__DragonFly__) +#if defined(__OpenBSD__) #include #endif @@ -52,8 +49,7 @@ namespace boost template struct float_limits : std::numeric_limits {}; -#if defined(__FreeBSD__) || defined(__NetBSD__) || \ - defined(__OpenBSD__) || defined(__DragonFly__) +#if defined(__OpenBSD__) template <> struct float_limits : std::numeric_limits @@ -74,7 +70,7 @@ namespace boost BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP); BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP); }; -#endif // __FreeBSD__/__NetBSD__/__OpenBSD__/__DragonFly__ +#endif // __OpenBSD__ inline void hash_float_combine(std::size_t& seed, std::size_t value) {