Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Dec 2001 21:54:52 -0500
From:      Mike Barcroft <mike@freebsd.org>
To:        David Malone <dwmalone@maths.tcd.ie>
Cc:        audit@freebsd.org, markm@freebsd.org
Subject:   Re: Warns for tcopy and wc.
Message-ID:  <20011203215452.E57237@espresso.q9media.com>
In-Reply-To: <200112032155.aa79655@salmon.maths.tcd.ie>; from dwmalone@maths.tcd.ie on Mon, Dec 03, 2001 at 09:55:54PM %2B0000
References:  <200112032155.aa79655@salmon.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
David Malone <dwmalone@maths.tcd.ie> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011203215452.E57237>