fixed windows unit tests

This commit is contained in:
Arvid Norberg 2010-01-24 04:27:53 +00:00
parent 1700b05d9e
commit ce4c1ab01b
1 changed files with 3 additions and 0 deletions

View File

@ -81,6 +81,8 @@ namespace libtorrent
return boost::shared_ptr<file>();
}
#ifdef TORRENT_WINDOWS
// file prio is supported on vista and up
#if _WIN32_WINNT >= 0x0600
if (m_low_prio_io)
{
FILE_IO_PRIORITY_HINT_INFO priorityHint;
@ -88,6 +90,7 @@ namespace libtorrent
result = SetFileInformationByHandle(e.file_ptr->native_handle(),
FileIoPriorityHintInfo, &priorityHint, sizeof(PriorityHint));
}
#endif
#endif
TORRENT_ASSERT(e.file_ptr->is_open());
e.mode = m;