1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

libast: update /usr/tmp fallback to /var/tmp

To find the temporary files directory to use, the pathtemp()
function (generate a unique path to a temporary file) first checks
$TMPDIR and $TMPPATH, then falls back to /tmp, then to /usr/tmp as
a last resort. But all systems replaced /usr/tmp by /var/tmp
decades ago to allow mounting /usr as read-only, and a /usr/tmp
compatibility symlink is no longer commonly provided.

src/lib/libast/path/pathtemp.c:
- Change TMP2 definition from "/usr/tmp" to "/var/tmp".

src/lib/libast/features/mmap,
src/lib/libast/features/stdio:
- Change "/usr/tmp" to "/var/tmp" in feature tests.
This commit is contained in:
Martijn Dekker 2020-09-12 18:28:10 +02:00
parent 2ae6e2cf55
commit 10cca4767b
3 changed files with 3 additions and 3 deletions

View file

@ -35,7 +35,7 @@ tst lib_mmap note{ standard mmap interface that works }end execute{
/* create data file in a local fs if possible */
t = file;
if (access(f = "/tmp", 0) == 0 ||
access(f = "/usr/tmp", 0) == 0)
access(f = "/var/tmp", 0) == 0)
{
while (*t = *f++)
t++;