I would like to suggest to use TMPDIR before to default to /tmp. This makes it easier to port gzip to no posix OSs.
Regards, Juan M. Guerrero diff -aprNU5 gzip-1.3.11.orig/znew.in gzip-1.3.11/znew.in --- gzip-1.3.11.orig/znew.in 2007-02-05 20:54:26 +0000 +++ gzip-1.3.11/znew.in 2007-03-25 21:09:54 +0000 @@ -53,11 +53,11 @@ old=0 new=0 block=1024 # block is the disk block size (best guess, need not be exact) warn="(does not preserve modes and timestamp)" -tmp=/tmp/zfoo.$$ +tmp=${TMPDIR-/tmp}/zfoo.$$ set -C echo hi > $tmp || exit if test -z "`(${CPMOD-cpmod} $tmp $tmp) 2>&1`"; then cpmod=${CPMOD-cpmod} warn=""