Mail Archives: djgpp/1999/03/25/17:32:36
Hans-Bernhard Broeker wrote:
>
> In article <01be764f$7b2ea120$LocalHost AT thendren> you wrote:
> [...]
> > part of the code requires me to create temporary files and write some
> > compressed information into that file. since libc has a tmpfile() function,
> > is used that. however, when i write compressed information to the file and
> > then retrieve it, it does not come back the same.
>
> This is most probably due to the fact that (your version of) tmpfile()
> opens the file in text, not in binary mode. Either explicitly set it
> to binary post hoc, using the 'setmode(fileno(file), O_BINARY)'
> method, or use tmpnam()/fopen() instead of tmpfile().
>
> Wether or not this has changed in newer version of DJGPP's libc is
> unkown to me, at the moment.
I think this was a bug in v2.01. Upgrade to 2.02 and it should be
fixed.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -