forked from boostorg/system
System: merge trunk
[SVN r78528]
This commit is contained in:
@ -16,6 +16,23 @@
|
|||||||
// This header implements separate compilation features as described in
|
// This header implements separate compilation features as described in
|
||||||
// http://www.boost.org/more/separate_compilation.html
|
// http://www.boost.org/more/separate_compilation.html
|
||||||
|
|
||||||
|
// normalize macros ------------------------------------------------------------------//
|
||||||
|
|
||||||
|
#if !defined(BOOST_SYSTEM_DYN_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) \
|
||||||
|
&& !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
|
||||||
|
# define BOOST_SYSTEM_STATIC_LINK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_SYSTEM_DYN_LINK)
|
||||||
|
# define BOOST_SYSTEM_DYN_LINK
|
||||||
|
#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK)
|
||||||
|
# define BOOST_SYSTEM_STATIC_LINK
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(BOOST_SYSTEM_DYN_LINK) && defined(BOOST_SYSTEM_STATIC_LINK)
|
||||||
|
# error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK
|
||||||
|
#endif
|
||||||
|
|
||||||
// enable dynamic or static linking as requested --------------------------------------//
|
// enable dynamic or static linking as requested --------------------------------------//
|
||||||
|
|
||||||
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
|
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
|
||||||
|
@ -74,7 +74,7 @@ namespace
|
|||||||
// strerror_r is preferred because it is always thread safe,
|
// strerror_r is preferred because it is always thread safe,
|
||||||
// however, we fallback to strerror in certain cases because:
|
// however, we fallback to strerror in certain cases because:
|
||||||
// -- Windows doesn't provide strerror_r.
|
// -- Windows doesn't provide strerror_r.
|
||||||
// -- HP and Sundo provide strerror_r on newer systems, but there is
|
// -- HP and Sun do provide strerror_r on newer systems, but there is
|
||||||
// no way to tell if is available at runtime and in any case their
|
// no way to tell if is available at runtime and in any case their
|
||||||
// versions of strerror are thread safe anyhow.
|
// versions of strerror are thread safe anyhow.
|
||||||
// -- Linux only sometimes provides strerror_r.
|
// -- Linux only sometimes provides strerror_r.
|
||||||
@ -84,6 +84,7 @@ namespace
|
|||||||
# if defined(BOOST_WINDOWS_API) || defined(__hpux) || defined(__sun)\
|
# 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(__osf__) && !defined(_REENTRANT))\
|
||||||
|
|| (defined(__INTEGRITY))\
|
||||||
|| (defined(__vms))\
|
|| (defined(__vms))\
|
||||||
|| (defined(__QNXNTO__))
|
|| (defined(__QNXNTO__))
|
||||||
const char * c_str = std::strerror( ev );
|
const char * c_str = std::strerror( ev );
|
||||||
|
@ -16,6 +16,7 @@ project
|
|||||||
lib throw_test
|
lib throw_test
|
||||||
: throw_test.cpp
|
: throw_test.cpp
|
||||||
: <link>shared:<define>BOOST_SYSTEM_DYN_LINK=1
|
: <link>shared:<define>BOOST_SYSTEM_DYN_LINK=1
|
||||||
|
<link>static:<define>BOOST_SYSTEM_STATIC_LINK=1
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user