Setup hash float function config for Tru64 on alpha and add some comments on

the different libraries & compilers.


[SVN r28138]
This commit is contained in:
Daniel James
2005-04-11 22:20:33 +00:00
parent ca202ee142
commit 952d73da6b

View File

@@ -14,10 +14,14 @@
// for float, double and long double in the std namespace, but some of the older // for float, double and long double in the std namespace, but some of the older
// library implementations don't support this. On some that don't, the C99 // library implementations don't support this. On some that don't, the C99
// float functions (frexpf, frexpl, etc.) are available. // float functions (frexpf, frexpl, etc.) are available.
//
// Some of this is based on guess work. If I don't know any better I assume that
// the standard C++ overloaded functions are available. If they're not then this
// means that the argument is cast to a double and back, which is inefficient
// and will give pretty bad results for long doubles - so if you know better
// let me know.
// This is just based on the compilers I've got access to, but it should // STLport:
// do something sensible on most compilers.
#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
# if defined(__GNUC__) && __GNUC__ < 3 && (defined(linux) || defined(__linux) || defined(__linux__)) # if defined(__GNUC__) && __GNUC__ < 3 && (defined(linux) || defined(__linux) || defined(__linux__))
# define BOOST_HASH_USE_C99_FLOAT_FUNCS # define BOOST_HASH_USE_C99_FLOAT_FUNCS
@@ -26,24 +30,48 @@
# else # else
# define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS # define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
# endif # endif
#elif defined(_RWSTD_VER) && defined(__BORLANDC__)
// Roguewave:
//
// On borland 5.51, with roguewave 2.1.1 the standard C++ overloads aren't
// defined, but for the same version of roguewave on sunpro they are.
#elif defined(_RWSTD_VER)
# if defined(__BORLANDC__)
# define BOOST_HASH_USE_C99_FLOAT_FUNCS # define BOOST_HASH_USE_C99_FLOAT_FUNCS
# define BOOST_HASH_C99_NO_FLOAT_FUNCS # define BOOST_HASH_C99_NO_FLOAT_FUNCS
# elif defined(__DECCXX)
# define BOOST_HASH_USE_C99_FLOAT_FUNCS
# else
# define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
# endif
// libstdc++ (gcc 3.0 onwards, I think)
#elif defined(__GLIBCPP__) || defined(__GLIBCXX__) #elif defined(__GLIBCPP__) || defined(__GLIBCXX__)
# define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS # define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
// SGI:
#elif defined(__STL_CONFIG_H) #elif defined(__STL_CONFIG_H)
// This might just be for gcc-2.95 # if defined(linux) || defined(__linux) || defined(__linux__)
// And cygwin might not have the C99 functions
# define BOOST_HASH_USE_C99_FLOAT_FUNCS # define BOOST_HASH_USE_C99_FLOAT_FUNCS
# else
# define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
# endif
// Dinkumware.
#elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) #elif (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER)
// Overloaded float functions were probably introduced at an earlier version. // Overloaded float functions were probably introduced in an earlier version
// than this.
# if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 402) # if defined(_CPPLIB_VER) && (_CPPLIB_VER >= 402)
# define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS # define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
# else # else
# define BOOST_HASH_USE_C99_FLOAT_FUNCS # define BOOST_HASH_USE_C99_FLOAT_FUNCS
# endif # endif
// Digital Mars
#elif defined(__DMC__) #elif defined(__DMC__)
# define BOOST_HASH_USE_C99_FLOAT_FUNCS # define BOOST_HASH_USE_C99_FLOAT_FUNCS
// Use overloaded float functions by default.
#else #else
# define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS # define BOOST_HASH_USE_OVERLOAD_FLOAT_FUNCS
#endif #endif