merged boost.system fix from RC_0_16

This commit is contained in:
Arvid Norberg 2012-09-22 05:18:10 +00:00
parent 15ecec3ae5
commit 330aac4acb
3 changed files with 13 additions and 2 deletions

View File

@ -3,6 +3,7 @@
* fix uTP edge case where udp socket buffer fills up * fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP * fix nagle implementation in uTP
* update use of boost.system to not use deprecated functions
* fix GIL issue in python bindings. Deprecated extension support in python * fix GIL issue in python bindings. Deprecated extension support in python
* fixed bug where setting upload slots to -1 would not mean infinite * fixed bug where setting upload slots to -1 would not mean infinite
* extend the UDP tracker protocol to include the request string from the tracker URL * extend the UDP tracker protocol to include the request string from the tracker URL

View File

@ -107,12 +107,13 @@ namespace libtorrent
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING #if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
#include <string> #include <cstring>
#include "libtorrent/config.hpp" #include "libtorrent/config.hpp"
#include "libtorrent/file.hpp" #include "libtorrent/file.hpp"
#include "libtorrent/thread.hpp" #include "libtorrent/thread.hpp"
#if TORRENT_USE_IOSTREAM #if TORRENT_USE_IOSTREAM
#include <string>
#include <fstream> #include <fstream>
#include <iostream> #include <iostream>
#endif #endif

View File

@ -364,13 +364,22 @@ namespace libtorrent
} }
using boost::system::error_code; using boost::system::error_code;
#if BOOST_VERSION < 104400
inline boost::system::error_category const& get_system_category() inline boost::system::error_category const& get_system_category()
{ return boost::system::get_system_category(); } { return boost::system::get_system_category(); }
#else
inline boost::system::error_category const& get_system_category()
{ return boost::system::system_category(); }
#endif
inline boost::system::error_category const& get_posix_category() inline boost::system::error_category const& get_posix_category()
#if BOOST_VERSION < 103600 #if BOOST_VERSION < 103600
{ return boost::system::get_posix_category(); } { return boost::system::get_posix_category(); }
#else #elif BOOST_VERSION < 104400
{ return boost::system::get_generic_category(); } { return boost::system::get_generic_category(); }
#else
{ return boost::system::generic_category(); }
#endif // BOOST_VERSION < 103600 #endif // BOOST_VERSION < 103600
#endif // BOOST_VERSION < 103500 #endif // BOOST_VERSION < 103500