From owner-freebsd-audit Mon Dec 3 18:55:55 2001 Delivered-To: freebsd-audit@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id 30A0437B405; Mon, 3 Dec 2001 18:55:52 -0800 (PST) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id fB42sqv58749; Mon, 3 Dec 2001 21:54:52 -0500 (EST) (envelope-from mike) Date: Mon, 3 Dec 2001 21:54:52 -0500 From: Mike Barcroft To: David Malone Cc: audit@freebsd.org, markm@freebsd.org Subject: Re: Warns for tcopy and wc. Message-ID: <20011203215452.E57237@espresso.q9media.com> References: <200112032155.aa79655@salmon.maths.tcd.ie> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200112032155.aa79655@salmon.maths.tcd.ie>; from dwmalone@maths.tcd.ie on Mon, Dec 03, 2001 at 09:55:54PM +0000 Organization: The FreeBSD Project Sender: owner-freebsd-audit@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG David Malone writes: > I have warns patches for tcopy and wc, but they run into the > following problems. > > 1) If people want to count something big then they often > use int64_t. Unfortunately these are defined in terms of > different types on the alpha and i386 (long and long long > respectively). This means that printfing these requires > a cast, so in some cases it seems to make more sense to > just use a long long (which C99 says is at least 64 bits). Consider using intmax_t and the printf(3) modifier %j (or the unsigned variant). > 2) As far as I know, %qd is for printing quat_t and %lld > is for printing long longs. Unfortunately our gcc doesn't > seem to know this and thinks that %qd is for printing long > longs. Until this is fixed it means that quad_t's are as > hard to print as int64_t. The quad_t type is deprecated; use something else. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-audit" in the body of the message