more boost-1.34.1 fixes

This commit is contained in:
Arvid Norberg 2009-06-03 07:46:50 +00:00
parent a9a12a2391
commit e438a3ccfc
2 changed files with 15 additions and 1 deletions

View File

@ -1419,8 +1419,12 @@ namespace libtorrent
if (j.buffer == 0)
{
ret = -1;
#if BOOST_VERSION >= 103500
j.error = error_code(boost::system::errc::not_enough_memory
, get_posix_category());
#else
j.error = asio::error::no_memory;
#endif
j.error_piece = j.piece;
j.error_op = disk_io_job::read;
j.str = j.error.message();
@ -1479,8 +1483,12 @@ namespace libtorrent
if (j.buffer == 0)
{
ret = -1;
#if BOOST_VERSION >= 103500
j.error = error_code(boost::system::errc::not_enough_memory
, get_posix_category());
#else
j.error = asio::error::no_memory;
#endif
j.error_piece = j.piece;
j.error_op = disk_io_job::read;
j.str = j.error.message();

View File

@ -350,7 +350,13 @@ namespace libtorrent
<< " piece " << j.error_piece << " in file " << j.error_file << "\n";
#endif
if (j.error == error_code(boost::system::errc::not_enough_memory, get_posix_category()))
if (j.error ==
#if BOOST_VERSION >= 103500
error_code(boost::system::errc::not_enough_memory, get_posix_category())
#else
asio::error::no_memory
#endif
)
{
if (alerts().should_post<file_error_alert>())
alerts().post_alert(file_error_alert(j.error_file, get_handle(), j.str));