From 27da18bd0a5af3bb3dbada5af8af2678368fc1c6 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 5 Apr 2007 01:08:21 +0000 Subject: [PATCH] windows fixes --- include/libtorrent/time.hpp | 4 +++- include/libtorrent/upnp.hpp | 1 + src/http_connection.cpp | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/libtorrent/time.hpp b/include/libtorrent/time.hpp index 1386082e6..a953e16d1 100644 --- a/include/libtorrent/time.hpp +++ b/include/libtorrent/time.hpp @@ -115,7 +115,7 @@ namespace libtorrent ptime time_now(); inline ptime min_time() { return ptime(0); } - inline ptime max_time() { return ptime(std::numeric_limits::max()); } + inline ptime max_time() { return ptime((std::numeric_limits::max)()); } int total_seconds(time_duration td); int total_milliseconds(time_duration td); boost::int64_t total_microseconds(time_duration td); @@ -222,7 +222,9 @@ namespace libtorrent } #elif defined(_WIN32) +#ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN +#endif #include namespace libtorrent diff --git a/include/libtorrent/upnp.hpp b/include/libtorrent/upnp.hpp index 628514d67..1ea8b6d98 100644 --- a/include/libtorrent/upnp.hpp +++ b/include/libtorrent/upnp.hpp @@ -41,6 +41,7 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include +#include #if defined(TORRENT_LOGGING) || defined(TORRENT_VERBOSE_LOGGING) #include diff --git a/src/http_connection.cpp b/src/http_connection.cpp index 4cc656030..a6f32f433 100644 --- a/src/http_connection.cpp +++ b/src/http_connection.cpp @@ -240,7 +240,7 @@ void http_connection::on_read(asio::error_code const& e } 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) { close();