They have just made some changes to gcc stdlibc++, the fpos<> type. And we (and boost) seem to have used the iosteam::pos_type wrong...
This patch fixes that. The boost part is sent off to the boost list, but I have not got a response yet.
Index: boost/libs/regex/src/cpp_regex_traits.cpp =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/libs/regex/src/cpp_regex_traits.cpp,v retrieving revision 1.8 diff -u -p -r1.8 cpp_regex_traits.cpp --- boost/libs/regex/src/cpp_regex_traits.cpp 7 Aug 2003 12:09:24 -0000 1.8 +++ boost/libs/regex/src/cpp_regex_traits.cpp 20 Oct 2003 20:50:23 -0000 @@ -161,9 +161,9 @@ parser_buf<charT, traits>::seekpos(pos_t return pos_type(off_type(-1)); std::ptrdiff_t size = this->egptr() - this->eback(); charT* g = this->eback(); - if(sp <= size) + if(off_type(sp) <= size) { - this->setg(g, g + ::std::streamsize(sp), g + size); + this->setg(g, g + off_type(sp), g + size); } return pos_type(off_type(-1)); } Index: src/lyxlex_pimpl.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/lyxlex_pimpl.C,v retrieving revision 1.39 diff -u -p -r1.39 lyxlex_pimpl.C --- src/lyxlex_pimpl.C 9 Oct 2003 13:27:51 -0000 1.39 +++ src/lyxlex_pimpl.C 20 Oct 2003 20:50:23 -0000 @@ -138,7 +138,7 @@ bool LyXLex::Pimpl::setFile(string const // The check only outputs a debug message, because it triggers // a bug in compaq cxx 6.2, where is_open() returns 'true' for // a fresh new filebuf. (JMarc) - if (gz__.is_open() || is.tellg() > 0) + if (gz__.is_open() || istream::off_type(is.tellg()) > -1) lyxerr[Debug::LYXLEX] << "Error in LyXLex::setFile: " "file or stream already set." << endl; gz__.open(filename.c_str(), ios::in); @@ -152,7 +152,7 @@ bool LyXLex::Pimpl::setFile(string const // The check only outputs a debug message, because it triggers // a bug in compaq cxx 6.2, where is_open() returns 'true' for // a fresh new filebuf. (JMarc) - if (fb__.is_open() || is.tellg() > 0) + if (fb__.is_open() || istream::off_type(is.tellg()) > 0) lyxerr[Debug::LYXLEX] << "Error in LyXLex::setFile: " "file or stream already set." << endl; fb__.open(filename.c_str(), ios::in); @@ -166,7 +166,7 @@ bool LyXLex::Pimpl::setFile(string const void LyXLex::Pimpl::setStream(istream & i) { - if (fb__.is_open() || is.tellg() > 0) + if (fb__.is_open() || istream::off_type(is.tellg()) > 0) lyxerr[Debug::LYXLEX] << "Error in LyXLex::setStream: " "file or stream already set." << endl; is.rdbuf(i.rdbuf()); Index: src/paragraph_pimpl.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/paragraph_pimpl.C,v retrieving revision 1.87 diff -u -p -r1.87 paragraph_pimpl.C --- src/paragraph_pimpl.C 7 Oct 2003 06:45:24 -0000 1.87 +++ src/paragraph_pimpl.C 20 Oct 2003 20:50:23 -0000 @@ -523,7 +523,7 @@ void Paragraph::Pimpl::simpleTeXSpecialC } bool close = false; - int const len = os.tellp(); + ostream::pos_type const len = os.tellp(); //ostream::pos_type const len = os.tellp(); if ((inset->lyxCode() == InsetOld::GRAPHICS_CODE || inset->lyxCode() == InsetOld::MATH_CODE @@ -562,7 +562,7 @@ void Paragraph::Pimpl::simpleTeXSpecialC texrow.start(owner_->id(), i + 1); column = 0; } else { - column += int(os.tellp()) - len; + column += os.tellp() - len; } } break;
-- Lgb