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 whenopening SCRATCH files.
- To: Robert Lipe <robertlipe at usa dot net>
- Subject: Re: [Fortran, please advise] Choosing mkstemp over tempnam whenopening SCRATCH files.
- From: "Joseph S. Myers" <jsm28 at cam dot ac dot uk>
- Date: Sun, 12 Nov 2000 17:18:52 +0000 (GMT)
- cc: Toon Moene <toon at moene dot indiv dot nluug dot nl>, <gcc-patches at gcc dot gnu dot org>
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 *).
--
Joseph S. Myers
jsm28@cam.ac.uk