9c, 9l: use $TMPDIR if available (#272)
NixOS sandboxed builds (at least on Mac) don't have access to /tmp, and this should be better POSIX.
This commit is contained in:
parent
b0aecb4ba5
commit
436ff26c36
2
bin/9c
2
bin/9c
@ -133,7 +133,7 @@ case "$tag" in
|
|||||||
esac
|
esac
|
||||||
|
|
||||||
# N.B. Must use temp file to avoid pipe; pipe loses status.
|
# N.B. Must use temp file to avoid pipe; pipe loses status.
|
||||||
xtmp=/tmp/9c.$$.$USER.out
|
xtmp=${TMPDIR-/tmp}/9c.$$.$USER.out
|
||||||
$cc -DPLAN9PORT -I$PLAN9/include $cflags "$@" 2>$xtmp
|
$cc -DPLAN9PORT -I$PLAN9/include $cflags "$@" 2>$xtmp
|
||||||
status=$?
|
status=$?
|
||||||
quiet $xtmp
|
quiet $xtmp
|
||||||
|
|||||||
2
bin/9l
2
bin/9l
@ -346,7 +346,7 @@ then
|
|||||||
echo $ld -L$PLAN9/lib "$@" $libsl $extralibs $frameworks
|
echo $ld -L$PLAN9/lib "$@" $libsl $extralibs $frameworks
|
||||||
fi
|
fi
|
||||||
|
|
||||||
xtmp=/tmp/9l.$$.$USER.out
|
xtmp="${TMPDIR-/tmp}/9l.$$.$USER.out"
|
||||||
xxout() {
|
xxout() {
|
||||||
sed 's/.*: In function `[^:]*: *//' $xtmp | egrep . |
|
sed 's/.*: In function `[^:]*: *//' $xtmp | egrep . |
|
||||||
egrep -v 'is (often|almost always) misused|is dangerous, better use|text-based stub'
|
egrep -v 'is (often|almost always) misused|is dangerous, better use|text-based stub'
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user