From c64393cb0e9e0ebe376b3dddb3c9c0998a61200c Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Mon, 9 Jan 2006 00:07:00 +0000 Subject: [PATCH] more vc7 fixes and unicode fix in file.cpp --- src/file.cpp | 8 ++++++++ src/torrent.cpp | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/file.cpp b/src/file.cpp index bcfe49774..68e56fd1f 100755 --- a/src/file.cpp +++ b/src/file.cpp @@ -43,6 +43,10 @@ POSSIBILITY OF SUCH DAMAGE. typedef int mode_t; #endif +#ifdef UNICODE +#include "libtorrent/storage.hpp" +#endif + #else // unix part #define _FILE_OFFSET_BITS 64 @@ -71,6 +75,10 @@ BOOST_STATIC_ASSERT(sizeof(lseek(0, 0, 0)) >= 8); #define O_RANDOM 0 #endif +#ifdef UNICODE +#include "libtorrent/storage.hpp" +#endif + namespace fs = boost::filesystem; diff --git a/src/torrent.cpp b/src/torrent.cpp index 60cf6b41f..7feb82baa 100755 --- a/src/torrent.cpp +++ b/src/torrent.cpp @@ -70,6 +70,7 @@ using boost::tuples::tuple; using boost::tuples::get; using boost::tuples::make_tuple; using boost::filesystem::complete; +using boost::bind; // PROFILING CODE @@ -1378,7 +1379,7 @@ namespace libtorrent st.num_peers = (int)std::count_if(m_connections.begin(), m_connections.end(), - bind(std::logical_not(), boost::bind(&peer_connection::is_connecting, + bind(std::logical_not(), boost::bind(&peer_connection::is_connecting, boost::bind(&std::map::value_type::second, _1)))); st.num_complete = m_complete;