blob: e75b632d80f77d7f1b5a7355b7893c26fdc08a1f [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001#ifndef __TEMPNAME_H__
2#define __TEMPNAME_H__
3
4#define __need_size_t
5#include <stddef.h>
6#include <sys/types.h>
7
8/* Disable support for $TMPDIR */
9extern int ___path_search (char *tmpl, size_t tmpl_len, const char *dir,
10 const char *pfx /*, int try_tmpdir */) attribute_hidden;
11#define __path_search(tmpl, tmpl_len, dir, pfx, try_tmpdir) ___path_search(tmpl, tmpl_len, dir, pfx)
12
13extern int __gen_tempname (char *__tmpl, int __kind, mode_t mode) attribute_hidden;
14
15/* The __kind argument to __gen_tempname may be one of: */
16#define __GT_FILE 0 /* create a file */
17#define __GT_BIGFILE 1 /* create a file, using open64 */
18#define __GT_DIR 2 /* create a directory */
19#define __GT_NOCREATE 3 /* just find a name not currently in use */
20
21#endif