fix build with boost-1.34.1

This commit is contained in:
Arvid Norberg 2009-06-03 07:22:43 +00:00
parent c62c4fc783
commit a9a12a2391
6 changed files with 16 additions and 3 deletions

View File

@ -34,7 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define TORRENT_POLICY_HPP_INCLUDED
#include <algorithm>
#include <set>
#include <deque>
#include "libtorrent/peer.hpp"
#include "libtorrent/piece_picker.hpp"

View File

@ -56,6 +56,10 @@ namespace libtorrent {
};
}
#if BOOST_VERSION < 103500
typedef asio::error::error_category socks_error_category;
#else
struct TORRENT_EXPORT socks_error_category : boost::system::error_category
{
virtual const char* name() const;
@ -64,6 +68,8 @@ struct TORRENT_EXPORT socks_error_category : boost::system::error_category
{ return boost::system::error_condition(ev, *this); }
};
#endif
extern socks_error_category socks_category;
class socks5_stream : public proxy_base

View File

@ -172,7 +172,10 @@ namespace libtorrent
void connection_queue::try_connect(connection_queue::mutex_t::scoped_lock& l)
{
INVARIANT_CHECK;
#if BOOST_VERSION >= 103700
TORRENT_ASSERT(l.owns_lock());
#endif
#ifdef TORRENT_CONNECTION_LOGGING
m_log << log_time() << " " << free_slots() << std::endl;

View File

@ -1749,6 +1749,7 @@ namespace libtorrent
{
ptime now = time_now_hires();
TORRENT_ASSERT(now >= m_last_file_check);
#if BOOST_VERSION > 103600
if (now - m_last_file_check < milliseconds(m_settings.file_checks_delay_per_block))
{
int sleep_time = m_settings.file_checks_delay_per_block
@ -1761,6 +1762,7 @@ namespace libtorrent
+ boost::posix_time::milliseconds(sleep_time));
}
m_last_file_check = time_now_hires();
#endif
if (m_waiting_to_shutdown) break;

View File

@ -1059,13 +1059,13 @@ namespace aux {
error_code ec;
if (m_settings.send_socket_buffer_size)
{
boost::asio::socket_base::send_buffer_size option(
stream_socket::send_buffer_size option(
m_settings.send_socket_buffer_size);
s.set_option(option, ec);
}
if (m_settings.recv_socket_buffer_size)
{
boost::asio::socket_base::receive_buffer_size option(
stream_socket::receive_buffer_size option(
m_settings.recv_socket_buffer_size);
s.set_option(option, ec);
}

View File

@ -40,6 +40,7 @@ namespace libtorrent
socks_error_category socks_category;
#if BOOST_VERSION >= 103500
const char* socks_error_category::name() const
{
return "socks error";
@ -64,6 +65,7 @@ namespace libtorrent
if (ev < 0 || ev > socks_error::num_errors) return "unknown error";
return messages[ev];
}
#endif
void socks5_stream::name_lookup(error_code const& e, tcp::resolver::iterator i
, boost::shared_ptr<handler_type> h)