From 4a094c4bcbf67e45f7efb3a39cdf4a7e0537bfbf Mon Sep 17 00:00:00 2001 From: Jens Maurer Date: Tue, 30 Oct 2001 20:55:18 +0000 Subject: [PATCH] fix wchar_t on HP-UX with gcc [SVN r11472] --- include/boost/integer_traits.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/boost/integer_traits.hpp b/include/boost/integer_traits.hpp index 997b98f..837531d 100644 --- a/include/boost/integer_traits.hpp +++ b/include/boost/integer_traits.hpp @@ -90,14 +90,15 @@ class integer_traits #elif defined(__BORLANDC__) || defined(__CYGWIN__) || defined(__MINGW32__) || (defined(__BEOS__) && defined(__GNUC__)) // No WCHAR_MIN and WCHAR_MAX, whar_t is short and unsigned: public detail::integer_traits_base -#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400)) || (defined __APPLE__) +#elif (defined(__sgi) && (!defined(__SGI_STL_PORT) || __SGI_STL_PORT < 0x400)) || (defined __APPLE__) || (defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 3) && !defined(__SGI_STL_PORT)) // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as int. - // SGI MIPSpro with native library is one case like this. - // Mac OS X with native library is another. + // - SGI MIPSpro with native library + // - gcc 3.x on HP-UX + // - Mac OS X with native library public detail::integer_traits_base -#elif defined(__hpux) && defined(__GNUC__) && !defined(__SGI_STL_PORT) +#elif defined(__hpux) && defined(__GNUC__) && (__GNUC__ == 2) && !defined(__SGI_STL_PORT) // No WCHAR_MIN and WCHAR_MAX, wchar_t has the same range as unsigned int. - // HP-UX GCC 2.95.2 is a case like this + // - gcc 2.95.x on HP-UX // (also, std::numeric_limits appears to return the wrong values). public detail::integer_traits_base #else