[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#377210: Re[3]: libstdc++6-4.1: std::basic_file::seekoff works incorrect



Matthias Klose writes:
> 
> there is no g++-4.2 in etch; just create a chroot and install sid into
> the chroot.
> 

Thanks. Nothing changed. Still same problem.
I made my own investigation and made a small class which fixes the problem:

template<typename _CharT, typename _Traits = std::char_traits<_CharT> >
    class SockBuf : public std::basic_filebuf<_CharT, _Traits> {
  public:
  // constructor and destructor here - about the same as in class stdio_filebuf (header is in /usr/include/c++/4.2/ext/stdio_filebuf.h)
  void nivarov_fix_gccbug() {
    this->_M_reading = false; 
    this->_M_writing = false;
  }
}

creating objects same way as stdio_filebuf in my examples i gave in bug description.
and in c++ code where i used pubseekoff() now i call nivarov_fix_gccbug() and everything works perfect! Hope it helps you to fix the bug. If you need more information let me know.

Best Regards
Sergey Nivarov




Reply to: