From 51ef057498e163375101ffd01fb0090e46f79688 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 29 Oct 2009 18:12:43 +0000 Subject: [PATCH] more unicode and wstring fixes --- Jamfile | 1 - bindings/python/src/torrent_info.cpp | 2 +- include/libtorrent/aux_/session_impl.hpp | 6 +++--- include/libtorrent/session.hpp | 2 +- src/session.cpp | 6 +++--- src/session_impl.cpp | 6 +++--- 6 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Jamfile b/Jamfile index 6ee35a17f..021866189 100755 --- a/Jamfile +++ b/Jamfile @@ -246,7 +246,6 @@ feature.compose off : TORRENT_DISABLE_RESOLVE_COUNTRI feature character-set : unicode ansi : composite propagated link-incompatible ; feature.compose unicode : _UNICODE UNICODE ; -feature.compose ansi : BOOST_FILESYSTEM_NARROW_ONLY=1 ; feature zlib : shipped system : composite propagated link-incompatible ; diff --git a/bindings/python/src/torrent_info.cpp b/bindings/python/src/torrent_info.cpp index 18ab36144..1e8917a99 100644 --- a/bindings/python/src/torrent_info.cpp +++ b/bindings/python/src/torrent_info.cpp @@ -131,7 +131,7 @@ void bind_torrent_info() .def("file_at_offset", &torrent_info::file_at_offset) .def("files", &files, (arg("storage")=false)) .def("rename_file", rename_file0) -#ifndef BOOST_FILESYSTEM_NARROW_ONLY +#if TORRENT_USE_WSTRING .def("rename_file", rename_file1) #endif diff --git a/include/libtorrent/aux_/session_impl.hpp b/include/libtorrent/aux_/session_impl.hpp index b905e493f..9cdcb7706 100644 --- a/include/libtorrent/aux_/session_impl.hpp +++ b/include/libtorrent/aux_/session_impl.hpp @@ -325,11 +325,11 @@ namespace libtorrent bool has_country_db() const { return m_country_db; } char const* country_for_ip(address const& a); -#ifndef BOOST_FILESYSTEM_NARROW_ONLY +#if TORRENT_USE_WSTRING bool load_asnum_db(wchar_t const* file); bool load_country_db(wchar_t const* file); -#endif -#endif +#endif // TORRENT_USE_WSTRING +#endif // TORRENT_DISABLE_GEO_IP void load_state(entry const& ses_state); entry state() const; diff --git a/include/libtorrent/session.hpp b/include/libtorrent/session.hpp index 0113b09aa..c6e0d8752 100644 --- a/include/libtorrent/session.hpp +++ b/include/libtorrent/session.hpp @@ -292,7 +292,7 @@ namespace libtorrent int as_for_ip(address const& addr); bool load_asnum_db(char const* file); bool load_country_db(char const* file); -#ifndef BOOST_FILESYSTEM_NARROW_ONLY +#if TORRENT_USE_WSTRING bool load_country_db(wchar_t const* file); bool load_asnum_db(wchar_t const* file); #endif diff --git a/src/session.cpp b/src/session.cpp index f726f9554..618c5269b 100644 --- a/src/session.cpp +++ b/src/session.cpp @@ -337,7 +337,7 @@ namespace libtorrent return m_impl->as_for_ip(addr); } -#ifndef BOOST_FILESYSTEM_NARROW_ONLY +#if TORRENT_USE_WSTRING bool session::load_asnum_db(wchar_t const* file) { mutex::scoped_lock l(m_impl->m_mutex); @@ -349,8 +349,8 @@ namespace libtorrent mutex::scoped_lock l(m_impl->m_mutex); return m_impl->load_country_db(file); } -#endif -#endif +#endif // TORRENT_USE_WSTRING +#endif // TORRENT_DISABLE_GEO_IP void session::load_state(entry const& ses_state) { diff --git a/src/session_impl.cpp b/src/session_impl.cpp index f46f65c96..b09e5e64c 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -417,7 +417,7 @@ namespace aux { return m_asnum_db; } -#ifndef BOOST_FILESYSTEM_NARROW_ONLY +#if TORRENT_USE_WSTRING bool session_impl::load_asnum_db(wchar_t const* file) { if (m_asnum_db) GeoIP_delete(m_asnum_db); @@ -435,7 +435,7 @@ namespace aux { m_country_db = GeoIP_open(utf8.c_str(), GEOIP_STANDARD); return m_country_db; } -#endif +#endif // TORRENT_USE_WSTRING bool session_impl::load_country_db(char const* file) { @@ -444,7 +444,7 @@ namespace aux { return m_country_db; } -#endif +#endif // TORRENT_DISABLE_GEO_IP void session_impl::load_state(entry const& ses_state) {