forked from premiere/premiere-libtorrent
windows fixes
This commit is contained in:
parent
306d015924
commit
27da18bd0a
|
@ -115,7 +115,7 @@ namespace libtorrent
|
||||||
|
|
||||||
ptime time_now();
|
ptime time_now();
|
||||||
inline ptime min_time() { return ptime(0); }
|
inline ptime min_time() { return ptime(0); }
|
||||||
inline ptime max_time() { return ptime(std::numeric_limits<boost::int64_t>::max()); }
|
inline ptime max_time() { return ptime((std::numeric_limits<boost::int64_t>::max)()); }
|
||||||
int total_seconds(time_duration td);
|
int total_seconds(time_duration td);
|
||||||
int total_milliseconds(time_duration td);
|
int total_milliseconds(time_duration td);
|
||||||
boost::int64_t total_microseconds(time_duration td);
|
boost::int64_t total_microseconds(time_duration td);
|
||||||
|
@ -222,7 +222,9 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
|
|
||||||
|
#ifndef WIN32_LEAN_AND_MEAN
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#endif
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
namespace libtorrent
|
namespace libtorrent
|
||||||
|
|
|
@ -41,6 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
#include <boost/thread/mutex.hpp>
|
#include <boost/thread/mutex.hpp>
|
||||||
#include <boost/thread/condition.hpp>
|
#include <boost/thread/condition.hpp>
|
||||||
|
#include <set>
|
||||||
|
|
||||||
#if defined(TORRENT_LOGGING) || defined(TORRENT_VERBOSE_LOGGING)
|
#if defined(TORRENT_LOGGING) || defined(TORRENT_VERBOSE_LOGGING)
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
@ -240,7 +240,7 @@ void http_connection::on_read(asio::error_code const& e
|
||||||
}
|
}
|
||||||
|
|
||||||
if (int(m_recvbuffer.size()) == m_read_pos)
|
if (int(m_recvbuffer.size()) == m_read_pos)
|
||||||
m_recvbuffer.resize(std::min(m_read_pos + 2048, 1024*500));
|
m_recvbuffer.resize((std::min)(m_read_pos + 2048, 1024*500));
|
||||||
if (m_read_pos == 1024 * 500)
|
if (m_read_pos == 1024 * 500)
|
||||||
{
|
{
|
||||||
close();
|
close();
|
||||||
|
|
Loading…
Reference in New Issue