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

@ -336,7 +336,7 @@ macro{
<<"#endif">>
<<"#ifndef P_tmpdir">>
#ifndef P_tmpdir
#define P_tmpdir "/usr/tmp/"
#define P_tmpdir "/var/tmp/"
#endif
<<"#define P_tmpdir">> P_tmpdir <<"/*NOCATLITERAL*/">>
<<"#endif">>