From owner-cvs-all Mon Jul 15 12:30:28 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBFD937B405; Mon, 15 Jul 2002 12:30:16 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1D5C543E6D; Mon, 15 Jul 2002 12:30:15 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id FAA32711; Tue, 16 Jul 2002 05:30:12 +1000 Date: Tue, 16 Jul 2002 05:33:42 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Alfred Perlstein Cc: Dag-Erling Smorgrav , , Subject: Re: cvs commit: src/usr.bin/tail Makefile tail.c In-Reply-To: <20020715105432.GJ77219@elvis.mu.org> Message-ID: <20020716052659.G41739-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 15 Jul 2002, Alfred Perlstein wrote: > * Bruce Evans [020715 03:27] wrote: > > On Mon, 15 Jul 2002, Alfred Perlstein wrote: > > > > > Er, both size_t and off_t are pretty much the same one i386 and alpha... > > > > Actually, the are quite different. > > BUHHH... > > size_t is 64 bits on alpha (versus 32 on i386), isn't it? Yes. > > > Also, casting enomem of line 257 of reverse.c doesn't fix this warning > > > which makes no sense... > > > > > > Index: reverse.c > > > - warnx("warning: %qd bytes discarded", enomem); > > > + warnx("warning: %qd bytes discarded", (quad_t)enomem); > > > > This makes sense. %qd is just an alias for %lld, so it unsuitable for > > printing anything except long longs. Neither off_t nor quad_t is long > > long on alphas. > > That's just obnoxious. :) > > Any chance you can suggest how to clean this up? The fact that we > can't compile tail(1) without warnings bugs me. Just cast off_t's to intmax_t and print them using %jd. The correct way to print most other foo_t's is not so clear. %j[du...] is overkill for most of them, but might become necessary. I won't clean up anything related to quad_t's since I want them to go away :-). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message