From 87222ebf3f16c07cff15948633953db4674b0734 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 19 Feb 2004 16:47:12 +0000 Subject: [PATCH] *** empty log message *** --- include/libtorrent/fingerprint.hpp | 7 +++++++ src/file.cpp | 11 ++++++++++- src/storage.cpp | 6 +++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/include/libtorrent/fingerprint.hpp b/include/libtorrent/fingerprint.hpp index 0e6fe5d82..8d397d4f2 100755 --- a/include/libtorrent/fingerprint.hpp +++ b/include/libtorrent/fingerprint.hpp @@ -38,6 +38,13 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/peer_id.hpp" +#if defined(_MSC_VER) && _MSC_VER < 1300 +namespace std +{ + using ::strlen; +} +#endif + namespace libtorrent { diff --git a/src/file.cpp b/src/file.cpp index 915812790..281eae543 100755 --- a/src/file.cpp +++ b/src/file.cpp @@ -30,6 +30,8 @@ POSSIBILITY OF SUCH DAMAGE. */ +#include + #include #include @@ -64,7 +66,11 @@ namespace libtorrent impl(): m_open_mode(0) {} impl(fs::path const& path, int mode) +#if defined(_MSC_VER) && _MSC_VER < 1300 + : m_file(path.native_file_string().c_str(), map_open_mode(path, mode)) +#else : m_file(path, map_open_mode(path, mode)) +#endif , m_open_mode(mode) { assert(mode == mode_in ||mode == mode_out); @@ -142,8 +148,11 @@ namespace libtorrent else return static_cast(m_file.tellp()); } - +#if defined(_MSC_VER) && _MSC_VER < 1300 + std::fstream m_file; +#else fs::fstream m_file; +#endif int m_open_mode; }; diff --git a/src/storage.cpp b/src/storage.cpp index 14fafc023..186009b17 100755 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -60,8 +60,12 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/file.hpp" #include "libtorrent/invariant_check.hpp" -#if defined(_MSC_VER) +#if defined(_MSC_VER) && _MSC_VER < 1300 #define for if (false) {} else for +namespace std +{ + using ::srand; +} #endif /*