guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Honor `$TMPDIR' in `guile-snarf'


From: Ludovic Courtès
Subject: Honor `$TMPDIR' in `guile-snarf'
Date: Tue, 12 Feb 2008 15:18:01 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Hi,

FYI, I committed this tiny patch that makes `guile-snarf' honor `$TMPDIR' [0].

Thanks,
Ludovic.

[0] http://www.opengroup.org/onlinepubs/009695399/xrat/xbd_chap10.html

--- guile-1.8.3/libguile/guile-snarf.in 2008-02-12 10:32:48.000000000 +0100
+++ guile-1.8.3/libguile/guile-snarf.in 2008-02-12 11:01:53.000000000 +0100
@@ -69,9 +69,12 @@ fi
 
 # set vars and handler -- handle CPP override
 cpp_ok_p=false
-tempdir="/tmp/snarf.$$"
+
+if [ x"$TMPDIR" = x ]; then TMPDIR="/tmp" ; else : ; fi
+tempdir="$TMPDIR/guile-snarf.$$"
 (umask 077 && mkdir $tempdir) || exit 1
 temp="$tempdir/tmp"
+
 if [ x"$CPP" = x ] ; then cpp="@CPP@" ; else cpp="$CPP" ; fi
 
 trap "rm -rf $tempdir" 0 1 2 15

reply via email to

[Prev in Thread] Current Thread [Next in Thread]