more unicode and wstring fixes

This commit is contained in:
Arvid Norberg 2009-10-29 18:12:43 +00:00
parent 33d6969684
commit 51ef057498
6 changed files with 11 additions and 12 deletions

View File

@ -246,7 +246,6 @@ feature.compose <resolve-countries>off : <define>TORRENT_DISABLE_RESOLVE_COUNTRI
feature character-set : unicode ansi : composite propagated link-incompatible ;
feature.compose <character-set>unicode : <define>_UNICODE <define>UNICODE ;
feature.compose <character-set>ansi : <define>BOOST_FILESYSTEM_NARROW_ONLY=1 ;
feature zlib : shipped system : composite propagated link-incompatible ;

View File

@ -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

View File

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

View File

@ -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

View File

@ -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)
{

View File

@ -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)
{