strerror vs strerror_r: add conditionalization for Tru64 and VMS

[SVN r37966]
This commit is contained in:
Boris Gubenko
2007-06-11 15:14:49 +00:00
parent 8e2ee5a2f3
commit c8afd97b47

View File

@@ -191,8 +191,13 @@ namespace
// no way to tell if is available at runtime and in any case their
// versions of strerror are thread safe anyhow.
// -- Linux only sometimes provides strerror_r.
// -- Tru64 provides strerror_r only when compiled -pthread.
// -- VMS doesn't provide strerror_r, but on this platform, strerror is
// thread safe.
# if defined(BOOST_WINDOWS_API) || defined(__hpux) || defined(__sun)\
|| (defined(__linux) && (!defined(__USE_XOPEN2K) || defined(BOOST_SYSTEM_USE_STRERROR)))
|| (defined(__linux) && (!defined(__USE_XOPEN2K) || defined(BOOST_SYSTEM_USE_STRERROR)))\
|| (defined(__osf__) && !defined(_REENTRANT))\
|| (defined(__vms))
const char * c_str = std::strerror( ec.value() );
return std::string( c_str ? c_str : "EINVAL" );
# else