Work around a bug in gcc 2.95's STL implementation.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9637 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2005-02-15 18:56:07 +00:00
parent 1cc17a653e
commit 3a33c14772
2 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
2005-02-15 Angus Leeming <leeming@lyx.org>
* environment.C: add missing #include.
(setEnvPath): compare iterators rather than use tellp().
2005-02-15 Angus Leeming <leeming@lyx.org>

View File

@ -89,10 +89,11 @@ void setEnvPath(string const & name, vector<string> const & env)
{
char const separator(os::path_separator());
std::ostringstream ss;
vector<string>::const_iterator it = env.begin();
vector<string>::const_iterator const begin = env.begin();
vector<string>::const_iterator const end = env.end();
vector<string>::const_iterator it = begin;
for (; it != end; ++it) {
if (ss.tellp() > 0)
if (it != begin)
ss << separator;
ss << os::external_path(*it);
}