From ac7e4fed7e8b184b1dd050bee9b86922611abbd8 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Sat, 4 Apr 2009 08:32:23 +0000 Subject: [PATCH] more missing wchar_t support --- src/session_impl.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/session_impl.cpp b/src/session_impl.cpp index be8062b2b..5984cc69a 100644 --- a/src/session_impl.cpp +++ b/src/session_impl.cpp @@ -33,9 +33,6 @@ POSSIBILITY OF SUCH DAMAGE. #include "libtorrent/pch.hpp" #include -#include -#include -#include #include #include #include @@ -345,6 +342,7 @@ namespace aux { return m_asnum_db; } +#ifndef BOOST_FILESYSTEM_NARROW_ONLY bool session_impl::load_asnum_db(wchar_t const* file) { mutex_t::scoped_lock l(m_mutex); @@ -355,14 +353,6 @@ namespace aux { return m_asnum_db; } - bool session_impl::load_country_db(char const* file) - { - mutex_t::scoped_lock l(m_mutex); - if (m_country_db) GeoIP_delete(m_country_db); - m_country_db = GeoIP_open(file, GEOIP_STANDARD); - return m_country_db; - } - bool session_impl::load_country_db(wchar_t const* file) { mutex_t::scoped_lock l(m_mutex); @@ -372,6 +362,15 @@ namespace aux { m_country_db = GeoIP_open(utf8.c_str(), GEOIP_STANDARD); return m_country_db; } +#endif + + bool session_impl::load_country_db(char const* file) + { + mutex_t::scoped_lock l(m_mutex); + if (m_country_db) GeoIP_delete(m_country_db); + m_country_db = GeoIP_open(file, GEOIP_STANDARD); + return m_country_db; + } #endif