From 87a05814e58e22bcfe6bf1cbe5c6a6bb61bf65fb Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 24 Mar 2014 07:42:55 +0000 Subject: [PATCH] fix msvc-7.1 build --- src/file.cpp | 10 +++++----- src/session.cpp | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/file.cpp b/src/file.cpp index 5eed85350..06797e7f5 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -932,7 +932,7 @@ namespace libtorrent DWORD last_error = GetLastError(); if (last_error != ERROR_HANDLE_EOF) { -#ifndef TORRENT_MINGW +#ifdef ERROR_CANT_WAIT TORRENT_ASSERT(last_error != ERROR_CANT_WAIT); #endif ec.assign(last_error, get_system_category()); @@ -1527,7 +1527,7 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER { { DWORD last_error = GetLastError(); if (last_error != ERROR_IO_PENDING -#ifndef TORRENT_MINGW +#ifdef ERROR_CANT_WAIT && last_error != ERROR_CANT_WAIT #endif ) @@ -1548,7 +1548,7 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER { DWORD last_error = GetLastError(); if (last_error != ERROR_HANDLE_EOF) { -#ifndef TORRENT_MINGW +#ifdef ERROR_CANT_WAIT TORRENT_ASSERT(last_error != ERROR_CANT_WAIT); #endif ec.assign(last_error, get_system_category()); @@ -1772,7 +1772,7 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER { { DWORD last_error = GetLastError(); if (last_error != ERROR_IO_PENDING -#ifndef TORRENT_MINGW +#ifdef ERROR_CANT_WAIT && last_error != ERROR_CANT_WAIT #endif ) @@ -1792,7 +1792,7 @@ typedef struct _FILE_ALLOCATED_RANGE_BUFFER { if (GetOverlappedResult(m_file_handle, &ol, &num_written, false) == 0) { DWORD last_error = GetLastError(); -#ifndef TORRENT_MINGW +#ifdef ERROR_CANT_WAIT TORRENT_ASSERT(last_error != ERROR_CANT_WAIT); #endif ec.assign(last_error, get_system_category()); diff --git a/src/session.cpp b/src/session.cpp index 7c3f0a90c..628342aba 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -367,25 +367,25 @@ namespace libtorrent #define TORRENT_SYNC_CALL_RET(type, x) \ bool done = false; \ type r; \ - m_impl->m_io_service.dispatch(boost::bind(&fun_ret, &r, &done, &m_impl->cond, &m_impl->mut, boost::function(boost::bind(&session_impl:: x, m_impl.get())))); \ + m_impl->m_io_service.dispatch(boost::bind(&fun_ret, &r, &done, &m_impl->cond, &m_impl->mut, boost::function(boost::bind(&session_impl:: x, m_impl.get())))); \ TORRENT_WAIT #define TORRENT_SYNC_CALL_RET1(type, x, a1) \ bool done = false; \ type r; \ - m_impl->m_io_service.dispatch(boost::bind(&fun_ret, &r, &done, &m_impl->cond, &m_impl->mut, boost::function(boost::bind(&session_impl:: x, m_impl.get(), a1)))); \ + m_impl->m_io_service.dispatch(boost::bind(&fun_ret, &r, &done, &m_impl->cond, &m_impl->mut, boost::function(boost::bind(&session_impl:: x, m_impl.get(), a1)))); \ TORRENT_WAIT #define TORRENT_SYNC_CALL_RET2(type, x, a1, a2) \ bool done = false; \ type r; \ - m_impl->m_io_service.dispatch(boost::bind(&fun_ret, &r, &done, &m_impl->cond, &m_impl->mut, boost::function(boost::bind(&session_impl:: x, m_impl.get(), a1, a2)))); \ + m_impl->m_io_service.dispatch(boost::bind(&fun_ret, &r, &done, &m_impl->cond, &m_impl->mut, boost::function(boost::bind(&session_impl:: x, m_impl.get(), a1, a2)))); \ TORRENT_WAIT #define TORRENT_SYNC_CALL_RET3(type, x, a1, a2, a3) \ bool done = false; \ type r; \ - m_impl->m_io_service.dispatch(boost::bind(&fun_ret, &r, &done, &m_impl->cond, &m_impl->mut, boost::function(boost::bind(&session_impl:: x, m_impl.get(), a1, a2, a3)))); \ + m_impl->m_io_service.dispatch(boost::bind(&fun_ret, &r, &done, &m_impl->cond, &m_impl->mut, boost::function(boost::bind(&session_impl:: x, m_impl.get(), a1, a2, a3)))); \ TORRENT_WAIT #ifndef TORRENT_CFG