Subject: Re: gzip: input file size weirdness.
To: Greg Troxel <gdt@ir.bbn.com>
From: William Fletcher <wfletcher@omina.co.za>
List: netbsd-help
Date: 12/12/2006 15:52:09
--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Thanks.
I'll probably just install pkgsrc's gzip. At the moment the machine is actu=
ally
down over the holidays, since this morning, so now I can't fix it :(
On Tue, Dec 12, 2006 at 08:25:44AM -0500, Greg Troxel wrote:
> gzip: input file size >=3D 4GB cannot be saved: Inappropriate ioctl for=
device
>=20
> The 'inappropriate ioctl' message is spurious (what errno happened to
> be). I have the following old local patch, which points out the issue
> (and changes to fix this in a different way than someone else fixed
> it). Look for this in gzip and comment out the maybe_warn. I don't
> know if this has been pulled up to netbsd-2.
>=20
>=20
> Index: gzip.c
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> RCS file: /cvsroot/src/usr.bin/gzip/gzip.c,v
> retrieving revision 1.79
> diff -u -r1.79 gzip.c
> --- gzip.c 22 Nov 2005 09:07:03 -0000 1.79
> +++ gzip.c 22 Nov 2005 13:24:57 -0000
> @@ -639,9 +639,15 @@
> (int)(in_tot >> 24) & 0xff);
> if (i !=3D 8)
> maybe_err("snprintf");
> -#if 0
> - if (in_tot > 0xffffffff)
> - maybe_warn("input file size >=3D 4GB cannot be saved");
> +#ifndef SMALL
> + if (in_tot > 0xffffffff && vflag)
> + /*
> + * RFC1952 specifies that ISIZE is modulo 2^32, so
> + * don't note this unless in verbose mode. (Note that
> + * amanda reports any such output, which is
> + * distracting and therefore harmful.)
> + */
> + warnx("input file size >=3D 4GB stored modulo 2^32");
> #endif
> if (write(out, outbufp, i) !=3D i) {
> maybe_warn("write");
>=20
--=20
Omina Solutions | http://omina.co.za | (012) Ph. 664-2480 F. 664-2474=20
--KsGdsel6WgEHnImy
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)
iD8DBQFFfrQJ0o1hk/SHCkoRAoubAJ9iUsI3fMyg/thtUH+YtIQ9xXZcFQCcD4L6
tVCbTaGFnD2ToFaabhfyTng=
=UgXv
-----END PGP SIGNATURE-----
--KsGdsel6WgEHnImy--