From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg) Newsgroups: comp.os.msdos.djgpp Subject: Re: Possible bug in libc tmpnam() function Date: 14 Sep 2001 11:17:09 GMT Organization: Ericsson Erisoft AB, Sweden Lines: 16 Message-ID: <9nsovl$bvv$1@antares.lu.erisoft.se> References: <9nsm2c$q0f$1 AT news5 DOT svr DOT pol DOT co DOT uk> <9nsmn6$2ai$1 AT news6 DOT svr DOT pol DOT co DOT uk> NNTP-Posting-Host: merope.lu.erisoft.se X-Newsreader: TIN [version 1.2 PL2] To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Ben Davis (ben AT vjpoole DOT freeserve DOT co DOT uk) wrote: : Hmm, now I don't know what to think. fopen(outfile, "wt") had the same : effect - errno was set to ENOENT. Is this correct behaviour then? : > the file, since tmpnam() does not overwrite existing files. However, it is : > my understanding that errno should be preserved by all successful library : > calls. I seems your understanding is a misunderstanding. Just point us to the paragraph or side in the C (standard) document that says that errno should be left alone by successful library calls. Right, MartinS