-/** TeMPorary NAMe. Generates a random file name that does not yet exist in the
- file system. Note that a file generated with this name is not "temporary",
- and must be remove()d normally.
- @param dest NULL, or a char[ L_tmpnam ] array.
- @return A pointer to a static internal buffer containing the file name,
- or NULL if no file name could be generated. If 'dest' is not NULL,
- writes the file name to and returns 'dest'.
- */
-char * tmpnam( char * dest );
+/** TeMPorary NAMe. Generates a file name that does not yet exist in the file
+ system, and is different from the last call to the function. Note that a
+ file generated with this name is not "temporary", and must be remove()d
+ normally.
+ @param filename NULL, or a char[ L_tmpnam ] array. (Beware, calling this
+ function with a NULL parameter is not thread-safe.)
+ @return If 'filename' is NULL, a pointer to an internal static buffer
+ holding the generated name. If 'filename' is not null, the
+ generated name is stored in 'filename', and 'filename' is returned.
+ If the filename generation fails, function returns NULL.
+ */
+char * tmpnam( char * filename );