diff --git a/include/libtorrent/bandwidth_limit.hpp b/include/libtorrent/bandwidth_limit.hpp index 0be8df9e0..e10e63ed1 100644 --- a/include/libtorrent/bandwidth_limit.hpp +++ b/include/libtorrent/bandwidth_limit.hpp @@ -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::const_max; diff --git a/include/libtorrent/bandwidth_manager.hpp b/include/libtorrent/bandwidth_manager.hpp index 234667011..ba7223999 100644 --- a/include/libtorrent/bandwidth_manager.hpp +++ b/include/libtorrent/bandwidth_manager.hpp @@ -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 diff --git a/include/libtorrent/bandwidth_queue_entry.hpp b/include/libtorrent/bandwidth_queue_entry.hpp index e7dea7eda..82c4d9dfd 100644 --- a/include/libtorrent/bandwidth_queue_entry.hpp +++ b/include/libtorrent/bandwidth_queue_entry.hpp @@ -39,7 +39,7 @@ POSSIBILITY OF SUCH DAMAGE. namespace libtorrent { -struct bw_request +struct TORRENT_EXPORT bw_request { bw_request(boost::intrusive_ptr const& pe , int blk, int prio); diff --git a/include/libtorrent/extensions/lt_trackers.hpp b/include/libtorrent/extensions/lt_trackers.hpp index 72dc941e3..bc63cee83 100644 --- a/include/libtorrent/extensions/lt_trackers.hpp +++ b/include/libtorrent/extensions/lt_trackers.hpp @@ -48,7 +48,7 @@ namespace libtorrent { struct torrent_plugin; class torrent; - TORRENT_EXPORT boost::shared_ptr create_lt_trackers_plugin(torrent*, void*); + boost::shared_ptr TORRENT_EXPORT create_lt_trackers_plugin(torrent*, void*); } #endif // TORRENT_LT_TRACKERS_HPP_INCLUDED diff --git a/include/libtorrent/ptime.hpp b/include/libtorrent/ptime.hpp index 58cc22020..5cd0164d5 100644 --- a/include/libtorrent/ptime.hpp +++ b/include/libtorrent/ptime.hpp @@ -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 diff --git a/src/lt_trackers.cpp b/src/lt_trackers.cpp index f057c7bb4..ac7aeb9a5 100644 --- a/src/lt_trackers.cpp +++ b/src/lt_trackers.cpp @@ -339,7 +339,7 @@ namespace libtorrent { namespace namespace libtorrent { - boost::shared_ptr create_lt_trackers_plugin(torrent* t, void*) + boost::shared_ptr TORRENT_EXPORT create_lt_trackers_plugin(torrent* t, void*) { if (t->valid_metadata() && t->torrent_file().priv()) return boost::shared_ptr(); return boost::shared_ptr(new lt_tracker_plugin(*t)); diff --git a/src/session_impl.cpp b/src/session_impl.cpp index 71886c788..9df71352a 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -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); diff --git a/src/time.cpp b/src/time.cpp index 20cf65657..45d16a912 100644 --- a/src/time.cpp +++ b/src/time.cpp @@ -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); diff --git a/test/Jamfile b/test/Jamfile index 8686e74ea..ed378448b 100644 --- a/test/Jamfile +++ b/test/Jamfile @@ -1,15 +1,5 @@ use-project /torrent : .. ; -lib test_common - : - setup_transfer.cpp - : - /torrent//torrent - multi - : - multi - ; - exe test_natpmp : test_natpmp.cpp /torrent//torrent : multi on full ; @@ -17,9 +7,9 @@ explicit test_natpmp ; project : requirements - test_common /torrent//torrent main.cpp + setup_transfer.cpp : default-build multi full