c/io/tmpnam

@1@ Creates a unique valid file name (no longer than l_tmpnam in length) and stores it in character string pointed to by. The function is capable of generating up to tmp_max of unique filenames, but some or all of them may be in use in the filesystem and thus not suitable return values.

@2@ Same as, except that up to tmp_max_s names may be generated, no longer than l_tmpnam_s in length, and the following errors are detected at runtime and call the currently installed constraint handler function:
 * is a null pointer
 * is greater than
 * is less than the generated file name string

and modify static state (which may be shared between these functions) and are not required to be thread-safe.

Return value
@1@ if  was not a null pointer. Otherwise a pointer to an internal static buffer is returned. If no suitable filename can be generated, null pointer is returned. @2@ Returns zero and writes the file name to on success. On error, returns non-zero and writes the null character to (only if  is not null and  is not zero and is not greater than rsize_max).