This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Fortran, please advise] Choosing mkstemp over tempnam when opening SCRATCH files.
- To: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Subject: Re: [Fortran, please advise] Choosing mkstemp over tempnam when opening SCRATCH files.
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Sun, 12 Nov 2000 20:55:09 +0100
- CC: Robert Lipe <robertlipe at usa dot net>, gcc-patches at gcc dot gnu dot org
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
- References: <Pine.LNX.4.30.0011121713130.27011-100000@kern.srcf.societies.cam.ac.uk>
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)