*** empty log message ***

This commit is contained in:
Arvid Norberg
2005-07-02 02:11:18 +00:00
parent dab6063cfc
commit bd05d7e4bf
3 changed files with 43 additions and 18 deletions

View File

@@ -211,7 +211,7 @@ on how to do this <a class="reference" href="http://sourceforge.net/cvs/?group_i
correctly by setting the environment variable <tt class="docutils literal"><span class="pre">BOOST_BUILD_PATH</span></tt> to point to your boost build
installation. Also you have to modify the <tt class="docutils literal"><span class="pre">user_config.jam</span></tt> to reflect the toolsets you have installed.
(if you're building with gcc, uncomment the line &quot;using gcc ;&quot;)</p>
<p>You also need to install <a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041&amp;release_id=284047">boost</a> (at least version 1.31.0).</p>
<p>You also need to install <a class="reference" href="http://sourceforge.net/project/showfiles.php?group_id=7586&amp;package_id=8041&amp;release_id=284047">boost</a> (at least version 1.32.0).</p>
<p>Before you invoke <tt class="docutils literal"><span class="pre">bjam</span></tt> you have to set the environment variable <tt class="docutils literal"><span class="pre">BOOST_ROOT</span></tt> to the
path where you installed boost. This will be used to build and link against the required
boost libraries as well as be used as include path for boost headers.</p>
@@ -228,9 +228,7 @@ abstraction. There's one <tt class="docutils literal"><span class="pre">file_win
files larger than 2 Gigabytes. This does not work in vc6 for some reason, possibly because
it may require windows NT and above. The other file, <tt class="docutils literal"><span class="pre">file.cpp</span></tt> is the default
implementation that simply relies on the standard low level io routines (read, write etc.),
this is the preferred implementation that should be used in all cases. The <tt class="docutils literal"><span class="pre">file_win.cpp</span></tt>
have had some problems with failing seeks (I don't know why), so I advise everyone to use
the other file.</p>
this is the preferred implementation that should be used in all cases.</p>
<div class="section" id="cygwin-and-msvc">
<h2><a name="cygwin-and-msvc">cygwin and msvc</a></h2>
<p>Note that if you're building on windows using the <tt class="docutils literal"><span class="pre">msvc</span></tt> toolset, you cannot run it

View File

@@ -95,7 +95,7 @@ installation. Also you have to modify the ``user_config.jam`` to reflect the too
.. _`boost-build`: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=80982&release_id=278763
You also need to install boost__ (at least version 1.31.0).
You also need to install boost__ (at least version 1.32.0).
__ http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=284047
@@ -121,9 +121,7 @@ abstraction. There's one ``file_win.cpp`` which relies on windows file API that
files larger than 2 Gigabytes. This does not work in vc6 for some reason, possibly because
it may require windows NT and above. The other file, ``file.cpp`` is the default
implementation that simply relies on the standard low level io routines (read, write etc.),
this is the preferred implementation that should be used in all cases. The ``file_win.cpp``
have had some problems with failing seeks (I don't know why), so I advise everyone to use
the other file.
this is the preferred implementation that should be used in all cases.
cygwin and msvc

View File

@@ -55,7 +55,31 @@ namespace
HLOCAL m_memory;
};
std::wstring safe_convert(std::string const& s)
{
try
{
return libtorrent::utf8_wchar(s);
}
catch (std::exception)
{
std::wstring ret;
for (const char* i = &*s.begin(); i < &*s.end(); ++i)
{
wchar_t c;
c = '.';
std::mbtowc(&c, i, 1);
ret += c;
}
return ret;
}
}
std::string utf8_native(std::string const& s)
{
try
{
std::wstring ws;
libtorrent::utf8_wchar(s, ws);
@@ -67,6 +91,11 @@ namespace
ret.resize(size-1);
return ret;
}
catch(std::exception)
{
return s;
}
}
void throw_exception(const char* thrower)
{
@@ -135,7 +164,7 @@ namespace libtorrent
assert(access_mask & (GENERIC_READ | GENERIC_WRITE));
#ifdef UNICODE
std::wstring wfile_name(utf8_wchar(file_name));
std::wstring wfile_name(safe_convert(file_name));
HANDLE new_handle = CreateFile(
(LPCWSTR)wfile_name.c_str()
, access_mask