windows fixes

This commit is contained in:
Arvid Norberg 2007-04-05 01:08:21 +00:00
parent 306d015924
commit 27da18bd0a
3 changed files with 5 additions and 2 deletions

View File

@ -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<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_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 <Windows.h>
namespace libtorrent

View File

@ -41,6 +41,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include <boost/shared_ptr.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/condition.hpp>
#include <set>
#if defined(TORRENT_LOGGING) || defined(TORRENT_VERBOSE_LOGGING)
#include <fstream>

View File

@ -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();