[Fortran, please advise] Choosing mkstemp over tempnam whenopening SCRATCH files.

Joseph S. Myers jsm28@cam.ac.uk
Sun Nov 12 09:22:00 GMT 2000


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



More information about the Gcc-patches mailing list