From 0a07f75ee081ca75edace4a2f904cbe700c291ed Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 15 Dec 2012 05:09:11 +0000 Subject: [PATCH] merged visibility fix from RC_0_16 --- Jamfile | 2 +- src/asio.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Jamfile b/Jamfile index 38c82d7d9..ea2bce8c9 100755 --- a/Jamfile +++ b/Jamfile @@ -264,7 +264,7 @@ rule building ( properties * ) # in shared object interfaces, so when it's # enabled, just export everything (since we're) # probably not a production build anyway - && !on in $(properties) + && ! on in $(properties) { # hide non-external symbols # use ms-compat because boost.asio (as of 1.47.0 diff --git a/src/asio.cpp b/src/asio.cpp index 0688e3f2b..52cc3c48c 100644 --- a/src/asio.cpp +++ b/src/asio.cpp @@ -79,6 +79,16 @@ #else // _MSC_VER +#include "libtorrent/config.hpp" + +#define TORRENT_HAS_ASIO_DECL x ## BOOST_ASIO_DECL + +// only define BOOST_ASIO_DECL if it hasn't already been defined +// or if it has been defined to an empty string +#if TORRENT_HAS_ASIO_DECL == x +#define BOOST_ASIO_DECL BOOST_SYMBOL_EXPORT +#endif + #if BOOST_VERSION >= 104500 #include #elif BOOST_VERSION >= 104400