gccbug.in: Use a temporary directory when the mktemp command is not available.

* gccbug.in: Use a temporary directory when the mktemp command is
	not available.

From-SVN: r41809
This commit is contained in:
Joseph Myers 2001-05-03 21:57:17 +01:00 committed by Joseph Myers
parent 7bdf2c6522
commit fa27606ca3
2 changed files with 13 additions and 17 deletions

View File

@ -1,3 +1,8 @@
2001-05-03 Joseph S. Myers <jsm28@cam.ac.uk>
* gccbug.in: Use a temporary directory when the mktemp command is
not available.
2001-05-03 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* config/m68hc11/m68hc11.h (STATIC_CHAIN_REGNUM): Use soft z register

View File

@ -82,25 +82,16 @@ if [ @have_mktemp_command@ = yes ]; then
TEMP=`mktemp $TMPDIR/pXXXXXX` || exit 1
BAD=`mktemp $TMPDIR/pbadXXXXXX` || exit 1
REF=`mktemp $TMPDIR/pfXXXXXX` || exit 1
REMOVE_TEMP="rm -f $TEMP0 $TEMP $BAD $REF"
else
TEMP0=$TMPDIR/po$$
TEMP=$TMPDIR/p$$
BAD=$TMPDIR/pbad$$
REF=$TMPDIR/pf$$
# set -C _may_ use O_EXCL, but it need not.
set -C
bad_temp=0
: > $TEMP0 || bad_temp=1
: > $TEMP || bad_temp=1
: > $BAD || bad_temp=1
: > $REF || bad_temp=1
if [ $bad_temp = 1 ]; then
rm -f $TEMP0 $TEMP $BAD $REF
exit 1;
fi
set +C
TEMPD=$TMPDIR/pd$$
TEMP0=$TEMPD/po$$
TEMP=$TEMPD/p$$
BAD=$TEMPD/pbad$$
REF=$TEMPD/pf$$
mkdir $TEMPD || exit 1
REMOVE_TEMP="rm -rf $TEMPD"
fi
REMOVE_TEMP="rm -f $TEMP0 $TEMP $BAD $REF"
# find a user name
if [ "$LOGNAME" = "" ]; then