don't try using P_tmpdir (from <stdio.h>, defined as "/var/tmp/" on NetBSD),
or "/usr/tmp" for temp files - just use "/tmp". from ronald khoo in [bin/4224]
This commit is contained in:
parent
6ac24f05df
commit
95073cdb54
|
@ -1573,6 +1573,7 @@ choose_temp_base ()
|
||||||
base = choose_temp_base_try (getenv ("TMP"), base);
|
base = choose_temp_base_try (getenv ("TMP"), base);
|
||||||
base = choose_temp_base_try (getenv ("TEMP"), base);
|
base = choose_temp_base_try (getenv ("TEMP"), base);
|
||||||
|
|
||||||
|
#ifndef __NetBSD__
|
||||||
#ifdef P_tmpdir
|
#ifdef P_tmpdir
|
||||||
base = choose_temp_base_try (P_tmpdir, base);
|
base = choose_temp_base_try (P_tmpdir, base);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1580,6 +1581,7 @@ choose_temp_base ()
|
||||||
base = choose_temp_base_try (concat4 (dir_separator_str, "usr",
|
base = choose_temp_base_try (concat4 (dir_separator_str, "usr",
|
||||||
dir_separator_str, "tmp"),
|
dir_separator_str, "tmp"),
|
||||||
base);
|
base);
|
||||||
|
#endif
|
||||||
base = choose_temp_base_try (concat (dir_separator_str, "tmp"), base);
|
base = choose_temp_base_try (concat (dir_separator_str, "tmp"), base);
|
||||||
|
|
||||||
/* If all else fails, use the current directory! */
|
/* If all else fails, use the current directory! */
|
||||||
|
|
Loading…
Reference in New Issue