fix msvc-7.1 build
This commit is contained in:
parent
a07426ff8b
commit
87a05814e5
10
src/file.cpp
10
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());
|
||||
|
|
|
@ -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<type>, &r, &done, &m_impl->cond, &m_impl->mut, boost::function<type(void)>(boost::bind(&session_impl:: x, m_impl.get())))); \
|
||||
m_impl->m_io_service.dispatch(boost::bind(&fun_ret<type >, &r, &done, &m_impl->cond, &m_impl->mut, boost::function<type(void)>(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<type>, &r, &done, &m_impl->cond, &m_impl->mut, boost::function<type(void)>(boost::bind(&session_impl:: x, m_impl.get(), a1)))); \
|
||||
m_impl->m_io_service.dispatch(boost::bind(&fun_ret<type >, &r, &done, &m_impl->cond, &m_impl->mut, boost::function<type(void)>(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<type>, &r, &done, &m_impl->cond, &m_impl->mut, boost::function<type(void)>(boost::bind(&session_impl:: x, m_impl.get(), a1, a2)))); \
|
||||
m_impl->m_io_service.dispatch(boost::bind(&fun_ret<type >, &r, &done, &m_impl->cond, &m_impl->mut, boost::function<type(void)>(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<type>, &r, &done, &m_impl->cond, &m_impl->mut, boost::function<type(void)>(boost::bind(&session_impl:: x, m_impl.get(), a1, a2, a3)))); \
|
||||
m_impl->m_io_service.dispatch(boost::bind(&fun_ret<type >, &r, &done, &m_impl->cond, &m_impl->mut, boost::function<type(void)>(boost::bind(&session_impl:: x, m_impl.get(), a1, a2, a3)))); \
|
||||
TORRENT_WAIT
|
||||
|
||||
#ifndef TORRENT_CFG
|
||||
|
|
Loading…
Reference in New Issue