From c328cfdb855584b11b62c5119807c2843d7f236c Mon Sep 17 00:00:00 2001 From: bstarynk Date: Thu, 5 Jun 2008 19:23:15 +0000 Subject: 2008-06-05 Basile Starynkevitch * melt-cc-script.proto: improved a little bit the tempfile ... git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@136412 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/melt-cc-script.proto | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gcc/melt-cc-script.proto') diff --git a/gcc/melt-cc-script.proto b/gcc/melt-cc-script.proto index bcf4d73c2e2..29ef1324307 100644 --- a/gcc/melt-cc-script.proto +++ b/gcc/melt-cc-script.proto @@ -65,12 +65,14 @@ case $dynstuff in *) nakedynstuff=`echo $dynstuff | sed 's/\.[a-z]*$//'`;; esac +: ${TMPDIR=/tmp} + if which tempfile; then datf=`tempfile -p bdat` elif which mktemp; then datf=`mktemp -t bdat.XXXXXXXX` else - datf=/tmp/bdat$$ + datf=$TMPDIR/bdat$$-$RANDOM fi rm -f $datf $datf.c $datf.* -- cgit v1.2.1