safec
2.1
Safe C Library - ISO TR24731 Bounds Checking Interface
|
#include "safe_lib.h"
#include <stdio.h>
Go to the source code of this file.
Functions | |
errno_t | tmpnam_s (char *s, rsize_t maxsize) |
Creates a unique valid file name (no longer than L_tmpnam in length) and stores it in character string pointed to by filename. More... | |
errno_t tmpnam_s | ( | char * | s, |
rsize_t | maxsize | ||
) |
Creates a unique valid file name (no longer than L_tmpnam in length) and stores it in character string pointed to by filename.
The function is capable of generating up to TMP_MAX_S of unique filenames, but some or all of them may be in use in the filesystem and thus not suitable return values.
filename_s | pointer to the character array capable of holding at least L_tmpnam_s bytes, to be used as a result buffer. |
maxsize | maximum number of characters the function is allowed to write (typically the size of the filename_s array). |
POSIX systems additionally define the similarly named function tempnam(), which offers the choice of a directory (which defaults to the optionally defined macro P_tmpdir).
Definition at line 46 of file tmpnam_s.c.