Heads-Up: tempfile missing (Attn: findutils, bzip2 maintainers)

Igor Pechtchanski pechtcha@cs.nyu.edu
Fri Aug 27 14:41:00 GMT 2004


On Thu, 26 Aug 2004, Charles Wilson wrote:

> Igor Pechtchanski wrote:
>
> > Hi, all,
> >
> > I just noticed that /bin/updatedb (from findutils) and /bin/bzdiff (from
> > bzip2) use "tempfile", which is non-POSIX, and is missing under Cygwin.
>
> Noted, thanks.  Will fix in next release.

Chuck,

FWIW, I already have the fix, and asked the upstream maintainer whether
he'll accept patches.  Just in case, the patch is attached.
HTH,
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw
-------------- next part --------------
--- bzdiff-orig	2003-08-09 02:35:45.000000000 -0400
+++ bzdiff	2004-08-26 15:24:33.263466500 -0400
@@ -37,7 +37,7 @@ if test -z "$FILES"; then
 	echo "Usage: $prog [${comp}_options] file [file]"
 	exit 1
 fi
-tmp=`tempfile -d /tmp -p bz` || {
+tmp=`mktemp /tmp/bzXXXXXX || tempfile -d /tmp -p bz || echo /tmp/bz$$` || {
       echo 'cannot create a temporary file' >&2
       exit 1
 }


More information about the Cygwin-apps mailing list