tempname.h 836 B

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