Skip to content

Commit

Permalink
Use $TMPDIR if available
Browse files Browse the repository at this point in the history
NixOS sandboxed builds (at least on Mac) don't have access to /tmp,
and this should be better POSIX.
  • Loading branch information
eraserhd committed Jul 1, 2019
1 parent e995a0c commit c762625
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/9c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ case "$tag" in
esac

# 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
status=$?
quiet $xtmp
Expand Down
2 changes: 1 addition & 1 deletion bin/9l
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ then
echo $ld -L$PLAN9/lib "$@" $libsl $extralibs $frameworks
fi

xtmp=/tmp/9l.$$.$USER.out
xtmp="${TMPDIR-/tmp}/9l.$$.$USER.out"
xxout() {
sed 's/.*: In function `[^:]*: *//' $xtmp | egrep . |
egrep -v 'is (often|almost always) misused|is dangerous, better use|text-based stub'
Expand Down

0 comments on commit c762625

Please sign in to comment.