summaryrefslogtreecommitdiff
path: root/gcc/melt-cc-script.proto
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-05 19:23:15 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-06-05 19:23:15 +0000
commitc328cfdb855584b11b62c5119807c2843d7f236c (patch)
treec423d908f1aeebc04427d13b1f1053ab729a6291 /gcc/melt-cc-script.proto
parent77ba188715eef9de4fd5d93fa92b2db6d686e552 (diff)
downloadgcc-c328cfdb855584b11b62c5119807c2843d7f236c.tar.gz
2008-06-05 Basile Starynkevitch <basile@starynkevitch.net>
* 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
Diffstat (limited to 'gcc/melt-cc-script.proto')
-rw-r--r--gcc/melt-cc-script.proto4
1 files changed, 3 insertions, 1 deletions
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.*