This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Fortran, please advise] Choosing mkstemp over tempnam when opening SCRATCH files.


Joseph S. Myers wrote:

> On Sun, 12 Nov 2000, Robert Lipe wrote:

> > * mkstemp is in X/open Issue 4, Version 2 and therefore in UNIX/9[58].
> > * mkstemps is in no pertinent specification that I can find.
> > * tempnam() is in ISO C's standard library and is therefore probably
> >   available anywhere that's interesting.

> It's tmpnam() not tempnam() that's in ISO C.  However, the useful ISO C
> function here is tmpfile() - which opens a temporary file that will get
> deleted automatically when closed (but doesn't provide a file name, just a
> FILE *).

Thanks for this info - the preferred solution seems to be tmpfile(). 
See if I can coerce the rest of libf2c/libI77 in using it ...

Cheers,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://g95.sourceforge.net/ (under construction)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]