From owner-freebsd-ports@FreeBSD.ORG Fri Feb 3 17:34:07 2006 Return-Path: X-Original-To: ports@FreeBSD.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C46BE16A420; Fri, 3 Feb 2006 17:34:07 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from jengal.datamax.bg (jengal.datamax.bg [82.103.104.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3505743D48; Fri, 3 Feb 2006 17:34:05 +0000 (GMT) (envelope-from vd@datamax.bg) Received: from qlovarnika.bg.datamax (qlovarnika.bg.datamax [192.168.10.2]) by jengal.datamax.bg (Postfix) with SMTP id 1F292B833; Fri, 3 Feb 2006 19:34:04 +0200 (EET) Received: (nullmailer pid 14691 invoked by uid 1002); Fri, 03 Feb 2006 17:34:04 -0000 Date: Fri, 3 Feb 2006 19:34:04 +0200 From: Vasil Dimov To: "Jeffrey H\. Johnson" Message-ID: <20060203173404.GA14142@qlovarnika.bg.datamax> References: <200602012250.k11Mo7w1026196@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline In-Reply-To: <200602012250.k11Mo7w1026196@freefall.freebsd.org> X-OS: FreeBSD 6.0-STABLE User-Agent: Mutt/1.5.11 Cc: mnag@FreeBSD.org, ports@FreeBSD.org, kris@obsecurity.org, bug-followup@FreeBSD.org Subject: Re: ports/92658: [PATCH] sysutils/heirloom: [Unbreak AMD64 build] X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: vd@FreeBSD.org List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2006 17:34:08 -0000 --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 01, 2006 at 10:50:07PM +0000, Jeffrey H. Johnson wrote: > The following reply was made to PR ports/92658; it has been noted by GNAT= S. >=20 > From: "Jeffrey H. Johnson" > To: Larry Rosenman , FreeBSD-gnats-submit@freebsd.org > Cc: kris@obsecurity.org, mnag@FreeBSD.org, ports@FreeBSD.org, > ports-amd64@FreeBSD.org, CPE1704TKS@bellsouth.net > Subject: Re: ports/92658: [PATCH] sysutils/heirloom: [Unbreak AMD64 build= ]=20 > Date: Wed, 01 Feb 2006 17:41:58 -0500 >=20 > OK, I have an update here: > =20 > ----------------------------------- > --- spell/spellin.c.orig Wed Feb 1 23:34:58 2006 > +++ spell/spellin.c Wed Feb 1 23:27:02 2006 > @@ -103,7 +103,7 @@ > z =3D huff((1L< fprintf(stderr, "%s: expected code widths =3D %f\n", > argv[0], z); > - for (count =3D 0; scanf("%lo", (long *)&h) =3D=3D 1; ++count) { > + for (count =3D 0; scanf("%o", (long *)&h) =3D=3D 1; ++count) { > if ((t =3D h >> (HASHWIDTH - INDEXWIDTH)) !=3D u) { > if (bp !=3D B) > wp++; > ----------------------------------- > =20 > This should work on all architectures where int32_t is the same size > as int, which I *believe* should cover all current FreeBSD platforms. Do you like the following: --- spellin.c.diff begins here --- --- spell/spellin.c.orig Fri Feb 3 19:13:19 2006 +++ spell/spellin.c Fri Feb 3 19:19:20 2006 @@ -77,6 +77,7 @@ main(int argc, char **argv) { int32_t h, k, d; + unsigned hu; int32_t i; int32_t count; int32_t w1; @@ -103,7 +104,8 @@ z =3D huff((1L<> (HASHWIDTH - INDEXWIDTH)) !=3D u) { if (bp !=3D B) wp++; --- spellin.c.diff ends here --- It is aimed at the sizeof(int) !=3D sizeof(int32_t) case. Unfortunately there is no way to scanf int32_t portably. --=20 Vasil Dimov --M9NhX3UHpAaciwkO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- iD8DBQFD45QMFw6SP/bBpCARAszPAKCbpPJMj7WVpQ6p60+v0Y7g0BQptwCgp/Nz D4PrPPDo0a9+bZmVczJIKaE= =w5Pp -----END PGP SIGNATURE----- --M9NhX3UHpAaciwkO--