From 7d98446408b82751e5debe417e7da38cae94f439 Mon Sep 17 00:00:00 2001 From: Daniel James Date: Fri, 22 May 2009 06:01:35 +0000 Subject: [PATCH] Some STLport fixes for hash. [SVN r53169] --- include/boost/functional/hash/detail/hash_float.hpp | 2 +- include/boost/functional/hash/detail/limits.hpp | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/boost/functional/hash/detail/hash_float.hpp b/include/boost/functional/hash/detail/hash_float.hpp index b5ed719..0137ab7 100644 --- a/include/boost/functional/hash/detail/hash_float.hpp +++ b/include/boost/functional/hash/detail/hash_float.hpp @@ -42,7 +42,7 @@ // STLport #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) -#defined BOOST_HASH_USE_FPCLASSIFY 0 +#define BOOST_HASH_USE_FPCLASSIFY 0 // GNU libstdc++ 3 #elif defined(__GLIBCPP__) || defined(__GLIBCXX__) diff --git a/include/boost/functional/hash/detail/limits.hpp b/include/boost/functional/hash/detail/limits.hpp index b691d5b..b7e8853 100644 --- a/include/boost/functional/hash/detail/limits.hpp +++ b/include/boost/functional/hash/detail/limits.hpp @@ -16,9 +16,10 @@ #include // On OpenBSD, numeric_limits is not reliable for long doubles, but -// the macros defined in are. +// the macros defined in are and support long double when STLport +// doesn't. -#if defined(__OpenBSD__) +#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE) #include #endif @@ -29,7 +30,7 @@ namespace boost template struct limits : std::numeric_limits {}; -#if defined(__OpenBSD__) +#if defined(__OpenBSD__) || defined(_STLP_NO_LONG_DOUBLE) template <> struct limits : std::numeric_limits @@ -49,6 +50,9 @@ namespace boost BOOST_STATIC_CONSTANT(int, digits = LDBL_MANT_DIG); BOOST_STATIC_CONSTANT(int, max_exponent = LDBL_MAX_EXP); BOOST_STATIC_CONSTANT(int, min_exponent = LDBL_MIN_EXP); +#if defined(_STLP_NO_LONG_DOUBLE) + BOOST_STATIC_CONSTANT(int, radix = FLT_RADIX); +#endif }; #endif // __OpenBSD__ }