Mail Archives: djgpp/2000/08/24/03:22:24
On Thu, 24 Aug 2000, Eli Zaretskii wrote:
> > From: "Rafal Maj" <r_maj AT poczta DOT onet DOT pl>
> > Newsgroups: comp.os.msdos.djgpp
> > Date: Wed, 23 Aug 2000 21:34:22 +0200
> >
> > I think ther is bug in I/O binary mode :
>
> No, this isn't a bug.
>
> > I can't open ofstream / ifstream in ios::binary mode.
> > When I use :
> > ifstream plik; plik.open("test.txt",ios::binary); plik<<"OK ;)";
> > plik.close();
> > then test.txt is empty. When I don't use ios::binary, then everything is OK.
>
> See section 9.4 of the FAQ, it's all there: you need to say
> "ios:binary | ios:out", and then it will work.
It's fixed in current CVS version of gcc-2.95 branch (which may sometimes
go into gcc-2.95.3 if such beast will be released). I also put related
patch in when build gcc-2.95.2 for DJGPP last time (end of March) but
didn't upload files.
>
> One of the libstdc++ maintainers explained some time ago that this is
> how the C++ library is supposed to work.
>
> > Where I can download new version of DJGPP that don't have this bug,
> > or how can I do workaround of this bug ?
>
> Please don't jump to conclusions too quickly. Most of the problems we
> meet as programmers are our own bugs.
>
Andris
- Raw text -