1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-02 13:00:26 +02:00

Instead of the non-portable mktemp, use mkdir to create a unique

temporary directory that we can safely use.  Thanks to Stefan
Nordhausen!
This commit is contained in:
Marius Vollmer 2004-01-10 23:29:56 +00:00
parent 6d98b00b50
commit 12819d6108

View file

@ -69,10 +69,12 @@ fi
# set vars and handler -- handle CPP override # set vars and handler -- handle CPP override
cpp_ok_p=false cpp_ok_p=false
temp=`mktemp -t guile-snarf.XXXXXX` || exit 1 tempdir="/tmp/snarf.$$"
(umask 077 && mkdir $tempdir) || exit 1
temp="$tempdir/tmp"
if [ x"$CPP" = x ] ; then cpp="@CPP@" ; else cpp="$CPP" ; fi if [ x"$CPP" = x ] ; then cpp="@CPP@" ; else cpp="$CPP" ; fi
trap "rm -f $temp" 0 1 2 15 trap "rm -rf $tempdir" 0 1 2 15
if [ ! "$outfile" = "-" ] ; then if [ ! "$outfile" = "-" ] ; then
modern_snarf "$@" > $outfile modern_snarf "$@" > $outfile