Sender: nate AT cartsys DOT com Message-ID: <36FAB73D.F89B1431@cartsys.com> Date: Thu, 25 Mar 1999 14:22:53 -0800 From: Nate Eldredge X-Mailer: Mozilla 4.08 [en] (X11; I; Linux 2.2.3 i586) MIME-Version: 1.0 To: djgpp AT delorie DOT com Subject: Re: libc bug? References: <199903251537 DOT QAA16506 AT acp3bf DOT physik DOT rwth-aachen DOT de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp AT delorie DOT com 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