SHA256
1
0
forked from pool/guile
guile/guile-1.6.10-mktemp.patch

15 lines
606 B
Diff
Raw Normal View History

Index: libguile/guile-snarf.in
===================================================================
--- libguile/guile-snarf.in.orig 2011-05-05 18:14:35.000000000 +0200
+++ libguile/guile-snarf.in 2011-09-22 17:56:41.010417735 +0200
@@ -84,8 +84,7 @@ fi
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