fixed boost-1.34.1 build

This commit is contained in:
Arvid Norberg 2009-03-06 08:57:00 +00:00
parent 079c6e6e03
commit 6353b3c3e6
3 changed files with 21 additions and 17 deletions

View File

@ -81,6 +81,8 @@ namespace libtorrent
typedef asio::error_code error_code;
inline asio::error::error_category get_posix_category() { return asio::error::system_category; }
inline asio::error::error_category get_system_category() { return asio::error::system_category; }
extern asio::error::error_category libtorrent_category;
#else
struct TORRENT_EXPORT libtorrent_error_category : boost::system::error_category

View File

@ -83,21 +83,19 @@ namespace libtorrent
{
#if BOOST_VERSION < 103500
using asio::ip::tcp;
using asio::ip::udp;
using asio::async_write;
using asio::async_read;
using ::asio::ip::tcp;
using ::asio::ip::udp;
using ::asio::async_write;
using ::asio::async_read;
typedef asio::ip::tcp::socket stream_socket;
typedef asio::ip::address address;
typedef asio::ip::address_v4 address_v4;
typedef asio::ip::address_v6 address_v6;
typedef asio::ip::udp::socket datagram_socket;
typedef asio::ip::tcp::acceptor socket_acceptor;
typedef asio::io_service io_service;
namespace asio = ::asio;
typedef asio::basic_deadline_timer<libtorrent::ptime> deadline_timer;
typedef ::asio::ip::tcp::socket stream_socket;
typedef ::asio::ip::address address;
typedef ::asio::ip::address_v4 address_v4;
typedef ::asio::ip::address_v6 address_v6;
typedef ::asio::ip::udp::socket datagram_socket;
typedef ::asio::ip::tcp::acceptor socket_acceptor;
typedef ::asio::io_service io_service;
typedef ::asio::basic_deadline_timer<libtorrent::ptime> deadline_timer;
#else
using boost::asio::ip::tcp;
using boost::asio::ip::udp;

View File

@ -32,12 +32,12 @@ POSSIBILITY OF SUCH DAMAGE.
#include <boost/version.hpp>
#if BOOST_VERSION >= 103500
#include "libtorrent/error_code.hpp"
namespace libtorrent
{
#if BOOST_VERSION >= 103500
const char* libtorrent_error_category::name() const
{
return "libtorrent error";
@ -78,7 +78,11 @@ namespace libtorrent
libtorrent_error_category libtorrent_category;
}
#else
::asio::error::error_category libtorrent_category = asio::error::error_category(20);
#endif
}