aboutsummaryrefslogtreecommitdiff
path: root/libiberty/make-temp-file.c
diff options
context:
space:
mode:
authorGerald Pfeifer <gerald@pfeifer.com>2021-06-29 00:39:15 +0200
committerGerald Pfeifer <gerald@pfeifer.com>2021-07-01 00:00:26 +0200
commit13eaeffde5d53638664364a6107f4b6c605b5168 (patch)
tree23251156b0043a1ca449fa06731014ed417cd37a /libiberty/make-temp-file.c
parent730d021e3e4acc7c0031113ec720c82e31d405e5 (diff)
downloadgcc-13eaeffde5d53638664364a6107f4b6c605b5168.zip
gcc-13eaeffde5d53638664364a6107f4b6c605b5168.tar.gz
gcc-13eaeffde5d53638664364a6107f4b6c605b5168.tar.bz2
libiberty: No longer use /usr/tmp
/usr/tmp is antiquated and not present on decently modern systems. Remove it from consideration when choosing a directory for temporary files. libiberty: 2021-06-29 Gerald Pfeifer <gerald@pfeifer.com> * make-temp-file.c (usrtmp): Remove. (choose_tmpdir): Remove use of usrtmp.
Diffstat (limited to 'libiberty/make-temp-file.c')
-rw-r--r--libiberty/make-temp-file.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libiberty/make-temp-file.c b/libiberty/make-temp-file.c
index 7465cec..31f87fb 100644
--- a/libiberty/make-temp-file.c
+++ b/libiberty/make-temp-file.c
@@ -81,8 +81,6 @@ try_dir (const char *dir, const char *base)
}
static const char tmp[] = { DIR_SEPARATOR, 't', 'm', 'p', 0 };
-static const char usrtmp[] =
-{ DIR_SEPARATOR, 'u', 's', 'r', DIR_SEPARATOR, 't', 'm', 'p', 0 };
static const char vartmp[] =
{ DIR_SEPARATOR, 'v', 'a', 'r', DIR_SEPARATOR, 't', 'm', 'p', 0 };
@@ -129,9 +127,8 @@ choose_tmpdir (void)
base = try_dir (P_tmpdir, base);
#endif
- /* Try /var/tmp, /usr/tmp, then /tmp. */
+ /* Try /var/tmp, then /tmp. */
base = try_dir (vartmp, base);
- base = try_dir (usrtmp, base);
base = try_dir (tmp, base);
/* If all else fails, use the current directory! */