Chris@102: // boost/endian/detail/config.hpp ----------------------------------------------------// Chris@102: Chris@102: // Copyright Beman Dawes 2003, 2010 Chris@102: Chris@102: // Distributed under the Boost Software License, Version 1.0. Chris@102: // See http://www.boost.org/LICENSE_1_0.txt Chris@102: Chris@102: //--------------------------------------------------------------------------------------// Chris@102: Chris@102: #ifndef BOOST_ENDIAN_CONFIG_HPP Chris@102: #define BOOST_ENDIAN_CONFIG_HPP Chris@102: Chris@102: // This header implements separate compilation features as described in Chris@102: // http://www.boost.org/more/separate_compilation.html Chris@102: Chris@102: #include Chris@102: #include // for BOOST_POSIX_API or BOOST_WINDOWS_API Chris@102: Chris@102: // throw an exception ----------------------------------------------------------------// Chris@102: // Chris@102: // Exceptions were originally thrown via boost::throw_exception(). Chris@102: // As throw_exception() became more complex, it caused user error reporting Chris@102: // to be harder to interpret, since the exception reported became much more complex. Chris@102: // The immediate fix was to throw directly, wrapped in a macro to make any later change Chris@102: // easier. Chris@102: Chris@102: #define BOOST_ENDIAN_THROW(EX) throw EX Chris@102: Chris@102: // enable dynamic linking -------------------------------------------------------------// Chris@102: Chris@102: #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ENDIAN_DYN_LINK) Chris@102: # if defined(BOOST_ENDIAN_SOURCE) Chris@102: # define BOOST_ENDIAN_DECL BOOST_SYMBOL_EXPORT Chris@102: # else Chris@102: # define BOOST_ENDIAN_DECL BOOST_SYMBOL_IMPORT Chris@102: # endif Chris@102: #else Chris@102: # define BOOST_ENDIAN_DECL Chris@102: #endif Chris@102: Chris@102: // enable automatic library variant selection ----------------------------------------// Chris@102: Chris@102: #if !defined(BOOST_ENDIAN_SOURCE) && !defined(BOOST_ALL_NO_LIB) \ Chris@102: && !defined(BOOST_ENDIAN_NO_LIB) Chris@102: // Chris@102: // Set the name of our library, this will get undef'ed by auto_link.hpp Chris@102: // once it's done with it: Chris@102: // Chris@102: #define BOOST_LIB_NAME boost_endian Chris@102: // Chris@102: // If we're importing code from a dll, then tell auto_link.hpp about it: Chris@102: // Chris@102: #if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_ENDIAN_DYN_LINK) Chris@102: # define BOOST_DYN_LINK Chris@102: #endif Chris@102: // Chris@102: // And include the header that does the work: Chris@102: // Chris@102: #include Chris@102: #endif // auto-linking disabled Chris@102: Chris@102: #endif // BOOST_ENDIAN_CONFIG_HPP