Commit fa27606c by Joseph Myers Committed by Joseph Myers

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
parent 7bdf2c65
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> 2001-05-03 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* config/m68hc11/m68hc11.h (STATIC_CHAIN_REGNUM): Use soft z register * config/m68hc11/m68hc11.h (STATIC_CHAIN_REGNUM): Use soft z register
......
...@@ -82,25 +82,16 @@ if [ @have_mktemp_command@ = yes ]; then ...@@ -82,25 +82,16 @@ if [ @have_mktemp_command@ = yes ]; then
TEMP=`mktemp $TMPDIR/pXXXXXX` || exit 1 TEMP=`mktemp $TMPDIR/pXXXXXX` || exit 1
BAD=`mktemp $TMPDIR/pbadXXXXXX` || exit 1 BAD=`mktemp $TMPDIR/pbadXXXXXX` || exit 1
REF=`mktemp $TMPDIR/pfXXXXXX` || exit 1 REF=`mktemp $TMPDIR/pfXXXXXX` || exit 1
REMOVE_TEMP="rm -f $TEMP0 $TEMP $BAD $REF"
else else
TEMP0=$TMPDIR/po$$ TEMPD=$TMPDIR/pd$$
TEMP=$TMPDIR/p$$ TEMP0=$TEMPD/po$$
BAD=$TMPDIR/pbad$$ TEMP=$TEMPD/p$$
REF=$TMPDIR/pf$$ BAD=$TEMPD/pbad$$
# set -C _may_ use O_EXCL, but it need not. REF=$TEMPD/pf$$
set -C mkdir $TEMPD || exit 1
bad_temp=0 REMOVE_TEMP="rm -rf $TEMPD"
: > $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
fi fi
REMOVE_TEMP="rm -f $TEMP0 $TEMP $BAD $REF"
# find a user name # find a user name
if [ "$LOGNAME" = "" ]; then if [ "$LOGNAME" = "" ]; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment