guile/guile-1.6.10-mktemp.patch

13 lines
427 B
Diff
Raw Normal View History

--- libguile/guile-snarf.in
+++ libguile/guile-snarf.in
@@ -71,8 +71,7 @@
cpp_ok_p=false
if [ x"$TMPDIR" = x ]; then TMPDIR="/tmp" ; else : ; fi
-tempdir="$TMPDIR/guile-snarf.$$"
-(umask 077 && mkdir $tempdir) || exit 1
+tempdir=$(mktemp -d -q "$TMPDIR/snarf.XXXXXX") || { echo >&2 "guile-snarf: can not create temporary file"; exit 1; }
temp="$tempdir/tmp"
if [ x"$CPP" = x ] ; then cpp="@CPP@" ; else cpp="$CPP" ; fi