merge fixes from RC_1_0

This commit is contained in:
Arvid Norberg 2015-04-10 03:25:02 +00:00
parent bb48b6e83c
commit c47699005f
2 changed files with 8 additions and 5 deletions

View File

@ -328,7 +328,10 @@ namespace libtorrent
// returns a peer_request representing the piece index, byte offset
// and size the specified file range overlaps. This is the inverse
// mapping ove map_block().
// mapping ove map_block(). Note that the ``peer_request`` return type
// is meant to hold bittorrent block requests, which may not be larger
// than 16 kiB. Mapping a range larger than that may return an overflown
// integer.
peer_request map_file(int file, boost::int64_t offset, int size) const;
#ifndef TORRENT_NO_DEPRECATE

View File

@ -349,7 +349,7 @@ namespace libtorrent
WIN32_FILE_ATTRIBUTE_DATA data;
if (!GetFileAttributesEx(f.c_str(), GetFileExInfoStandard, &data))
{
ec.assign(GetLastError(), boost::system::system_category());
ec.assign(GetLastError(), get_system_category());
return;
}
@ -447,7 +447,7 @@ namespace libtorrent
if (CreateDirectory_(n.c_str(), 0) == 0
&& GetLastError() != ERROR_ALREADY_EXISTS)
ec.assign(GetLastError(), boost::system::system_category());
ec.assign(GetLastError(), get_system_category());
#else
std::string n = convert_to_native(f);
int ret = mkdir(n.c_str(), 0777);
@ -562,7 +562,7 @@ namespace libtorrent
#endif
if (CopyFile_(f1.c_str(), f2.c_str(), false) == 0)
ec.assign(GetLastError(), boost::system::system_category());
ec.assign(GetLastError(), get_system_category());
#elif defined __APPLE__ && defined __MACH__ && MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
std::string f1 = convert_to_native(inf);
std::string f2 = convert_to_native(newf);
@ -1011,7 +1011,7 @@ namespace libtorrent
if (RemoveDirectory_(f.c_str()) != 0)
return;
}
ec.assign(GetLastError(), boost::system::system_category());
ec.assign(GetLastError(), get_system_category());
return;
}
#else // TORRENT_WINDOWS