- give tmpfileplus its own RNG.
This should not interfere with the global one which can be explicitly seeded. It also seems a bit pointless to constantly re-seed the RNG for something this inconsequential.
This commit is contained in:
parent
e78503b770
commit
f6f17fbfb4
2 changed files with 7 additions and 88 deletions
|
|
@ -23,10 +23,6 @@
|
|||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** Create a unique temporary file.
|
||||
@param dir (optional) directory to create file. If NULL use default TMP directory.
|
||||
@param prefix (optional) prefix for file name. If NULL use "tmp.".
|
||||
|
|
@ -40,22 +36,6 @@ extern "C" {
|
|||
FILE *tmpfileplus(const char *dir, const char *prefix, char **pathname, int keep);
|
||||
|
||||
|
||||
/** Create a unique temporary file with filename stored in a fixed-length buffer.
|
||||
@param dir (optional) directory to create file. If NULL use default directory.
|
||||
@param prefix (optional) prefix for file name. If NULL use "tmp.".
|
||||
@param pathnamebuf (optional) buffer to receive full pathname of temporary file. Ignored if NULL.
|
||||
@param pathsize Size of buffer to receive filename and its terminating null character.
|
||||
@param keep If `keep` is nonzero and `pathname` is not NULL, then keep the file after closing.
|
||||
Otherwise file is automatically deleted when closed.
|
||||
@return Pointer to stream opened in binary read/write (w+b) mode, or a null pointer on error.
|
||||
@exception E2BIG Resulting filename is too big for the buffer `pathnamebuf`.
|
||||
*/
|
||||
FILE *tmpfileplus_f(const char *dir, const char *prefix, char *pathnamebuf, size_t pathsize, int keep);
|
||||
|
||||
#define TMPFILE_KEEP 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* end TMPFILEPLUS_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue