mkstemp64 -- create a unique temporary file (Large File Support)


#include <stdio.h>
#include <stdlib.h>

int mkstemp64(char * template);


mkstemp64() shall generates a unique temporary file name from template. The last six characters of template shall be XXXXXX and these are replaced with a string that makes the file name unique; the file is then created and an open file descriptor returned as described for mkstemp().

mkstemp64() is a large-file version of the mkstemp() function as defined in POSIX 1003.1-2008 (ISO/IEC 9945-2009). The only difference is that the temporary file is opened with open64() instead of with open().

Return Value

On success, mkstemp64() returns the file descriptor of the temporary file. Otherwise mkstemp64() shall return -1 and set errno to indicate the error.


See mkstemp() for possible error values.