first pass at a link compatibility check
This commit is contained in:
parent
c8c914c7e5
commit
157603b597
|
@ -65,6 +65,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
#include "libtorrent/peer_id.hpp"
|
||||
|
||||
#include "libtorrent/storage.hpp"
|
||||
#include <boost/preprocessor/cat.hpp>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# include <eh.h>
|
||||
|
@ -80,6 +81,45 @@ namespace libtorrent
|
|||
class natpmp;
|
||||
class upnp;
|
||||
|
||||
// this is used to create linker errors when trying to link to
|
||||
// a library with a conflicting build configuration than the application
|
||||
#ifdef NDEBUG
|
||||
#define G _release
|
||||
#else
|
||||
#define G _debug
|
||||
#endif
|
||||
|
||||
#ifdef TORRENT_USE_OPENSSL
|
||||
#define S _ssl
|
||||
#else
|
||||
#define S _nossl
|
||||
#endif
|
||||
|
||||
#ifdef TORRENT_DISABLE_DHT
|
||||
#define D _nodht
|
||||
#else
|
||||
#define D _dht
|
||||
#endif
|
||||
|
||||
#ifdef TORRENT_DISABLE_POOL_ALLOCATOR
|
||||
#define P _nopoolalloc
|
||||
#else
|
||||
#define P _poolalloc
|
||||
#endif
|
||||
|
||||
#define TORRENT_LINK_TEST_PREFIX libtorrent_build_config
|
||||
#define TORRENT_LINK_TEST_NAME BOOST_PP_CAT(TORRENT_LINK_TEST_PREFIX, BOOST_PP_CAT(P, BOOST_PP_CAT(D, BOOST_PP_CAT(S, G))))
|
||||
#undef P
|
||||
#undef D
|
||||
#undef S
|
||||
#undef G
|
||||
|
||||
inline void test_link()
|
||||
{
|
||||
extern void TORRENT_LINK_TEST_NAME();
|
||||
TORRENT_LINK_TEST_NAME();
|
||||
}
|
||||
|
||||
namespace fs = boost::filesystem;
|
||||
|
||||
namespace aux
|
||||
|
|
|
@ -91,6 +91,8 @@ void stop_malloc_debug();
|
|||
namespace libtorrent
|
||||
{
|
||||
|
||||
TORRENT_EXPORT void TORRENT_LINK_TEST_NAME() {}
|
||||
|
||||
std::string log_time()
|
||||
{
|
||||
static const ptime start = time_now();
|
||||
|
@ -123,7 +125,7 @@ namespace libtorrent
|
|||
)
|
||||
: m_impl(new session_impl(listen_port_range, id, listen_interface
|
||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||
, logpath
|
||||
, logpath
|
||||
#endif
|
||||
))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue