delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/10/09/03:17:04

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Flaw in tmpfile() ?
Date: Wed, 08 Oct 1997 15:51:20 -0700
Organization: Alcyone Systems
Lines: 22
Message-ID: <343C0E68.37919E4F@alcyone.com>
References: <34389791 DOT 4780C29 AT LSTM DOT Ruhr-UNI-Bochum DOT De>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Thomas Demmer wrote:

> I just stumbled across a little flaw in tmpfile(). It opens
> the file according to the current setting of _fmode either
> int text or binary mode. IMHO this should at least be mentioned
> in the docs ;-)
	...
> So, unless there is a good reason to keep things
> as they are, I propose to change the mode.

This is definitely a bug.  ANSI C 7.9.4.3 states that the file opened
from tmpfile is to be opened in binary mode.

Either way, DJ already says he's fixed it.

-- 
          Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
                        Alcyone Systems / http://newton.alcyone.com/
   San Jose, California, United States / icbm://+37.20.07/-121.53.38
                                      \
   "After each war there is a little / less democracy to save."
                                    / Brooks Atkinson

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019