This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Problem with fstream
- From: Andris Pavenis <pavenis at latnet dot lv>
- To: Chris Card <ctcard at hotmail dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Mon, 22 Apr 2002 15:20:48 +0300 (EEST)
- Subject: Re: Problem with fstream
On Mon, 22 Apr 2002, Chris Card wrote:
> Hi Andris,
>
> >On Mon, 22 Apr 2002, Chris Card wrote:
> >
> > > I posted this to gnu.g++.help today, but I though I might get a quicker
> > > response here:
> <snip>
> >It's know problem.
> Is there a list of known problems somewhere? I couldn't find it.
> >I had the same for DJGPP and had to modify some
> >headers to workaround related problems with handling DOS style text files
> >when one have CR LF <---> LF conversion. Even then support of such files
> >remains badly broken, however the problem mentioned above can be fixed.
> >
> >For comparisson I tested behaviour of std::[io]fstream classes
> >in program compiled with MS VC++ 6.0 and saw that it behaves much better.
> >(also seeking and getting stream position seemed to work with VC. For
> >example I have seen comment that they are not expected to work
> >for MINGW32 at all)
> >
> >My patchset for DJGPP is at
> >
> >http://www.simtel.net/gnudlpage.php?product=/gnu/djgpp/v2gnu/gcc304s2.zip&name=gcc304s2.zip
> >
> >(it's for gcc-3.0.4, one needs to update for upcoming gcc-3.1 as patches
> >does not apply there)
> Thanks for the information - I'll take a look.
> I've only just upgraded to 3.0.3 :-( Will your patch work there, or must I
> upgrade the compiler again?
zip archive contains a diffs for each modified file separatelly (So it was
for me easier to maintain). As far as I remember all should be Ok also
with gcc-3.0.3.
> Also, is the problem in the compiler, or in libstdc++? If the latter, I'd
> prefer just to patch the library if possible.
You need diffs for 2 files in libstdc++-v3/include/bits only:
std_fstream.h (You'll need to additionally modify it, perhaps
by completely removing parts I excluded with
'#ifndef __DJGPP__')
fstream.tcc
However I'm not sure it will be enough to simply modify these 2 files.
Perhaps You will need to rebuild libstdc++-v3
Andris