fixed DLL link issues

This commit is contained in:
Arvid Norberg 2009-11-30 07:03:34 +00:00
parent 5b039a8982
commit 3fb05a13b1
9 changed files with 26 additions and 29 deletions

View File

@ -40,7 +40,7 @@ POSSIBILITY OF SUCH DAMAGE.
namespace libtorrent {
// member of peer_connection
struct bandwidth_channel
struct TORRENT_EXPORT bandwidth_channel
{
static const int inf = boost::integer_traits<int>::const_max;

View File

@ -54,7 +54,7 @@ using boost::intrusive_ptr;
namespace libtorrent {
struct bandwidth_manager
struct TORRENT_EXPORT bandwidth_manager
{
bandwidth_manager(int channel
#ifdef TORRENT_VERBOSE_BANDWIDTH_LIMIT

View File

@ -39,7 +39,7 @@ POSSIBILITY OF SUCH DAMAGE.
namespace libtorrent {
struct bw_request
struct TORRENT_EXPORT bw_request
{
bw_request(boost::intrusive_ptr<bandwidth_socket> const& pe
, int blk, int prio);

View File

@ -48,7 +48,7 @@ namespace libtorrent
{
struct torrent_plugin;
class torrent;
TORRENT_EXPORT boost::shared_ptr<torrent_plugin> create_lt_trackers_plugin(torrent*, void*);
boost::shared_ptr<torrent_plugin> TORRENT_EXPORT create_lt_trackers_plugin(torrent*, void*);
}
#endif // TORRENT_LT_TRACKERS_HPP_INCLUDED

View File

@ -129,12 +129,7 @@ namespace libtorrent
char const* time_now_string();
std::string TORRENT_EXPORT log_time();
namespace aux
{
extern TORRENT_EXPORT ptime g_current_time;
}
inline ptime const& time_now() { return aux::g_current_time; }
ptime const& TORRENT_EXPORT time_now();
}
#endif

View File

@ -339,7 +339,7 @@ namespace libtorrent { namespace
namespace libtorrent
{
boost::shared_ptr<torrent_plugin> create_lt_trackers_plugin(torrent* t, void*)
boost::shared_ptr<torrent_plugin> TORRENT_EXPORT create_lt_trackers_plugin(torrent* t, void*)
{
if (t->valid_metadata() && t->torrent_file().priv()) return boost::shared_ptr<torrent_plugin>();
return boost::shared_ptr<torrent_plugin>(new lt_tracker_plugin(*t));

View File

@ -163,13 +163,6 @@ namespace detail
namespace aux {
// used to cache the current time
// every 100 ms. This is cheaper
// than a system call and can be
// used where more accurate time
// is not necessary
TORRENT_EXPORT ptime g_current_time = time_now_hires();
struct seed_random_generator
{
seed_random_generator()
@ -1275,6 +1268,13 @@ namespace aux {
}
}
// used to cache the current time
// every 100 ms. This is cheaper
// than a system call and can be
// used where more accurate time
// is not necessary
extern ptime g_current_time;
void session_impl::on_tick(error_code const& e)
{
mutex::scoped_lock l(m_mutex);

View File

@ -44,6 +44,18 @@ POSSIBILITY OF SUCH DAMAGE.
namespace libtorrent
{
namespace aux
{
// used to cache the current time
// every 100 ms. This is cheaper
// than a system call and can be
// used where more accurate time
// is not necessary
ptime g_current_time;
}
ptime const& TORRENT_EXPORT time_now() { return aux::g_current_time; }
char const* time_now_string()
{
time_t t = std::time(0);

View File

@ -1,15 +1,5 @@
use-project /torrent : .. ;
lib test_common
:
setup_transfer.cpp
:
<library>/torrent//torrent
<threading>multi
:
<threading>multi
;
exe test_natpmp : test_natpmp.cpp /torrent//torrent
: <threading>multi <debug-iterators>on <invariant-checks>full ;
@ -17,9 +7,9 @@ explicit test_natpmp ;
project
: requirements
<library>test_common
<library>/torrent//torrent
<source>main.cpp
<source>setup_transfer.cpp
: default-build
<threading>multi
<invariant-checks>full