Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Mar 2004 07:04:40 -0800
From:      Luigi Rizzo <rizzo@icir.org>
To:        Maxime Henrion <mux@freebsd.org>
Cc:        Johan Karlsson <johan@freebsd.org>
Subject:   Re: where do %j/uintmax_t stand in terms of standards? [WAS: Re: WARNS cleanup for ipfw
Message-ID:  <20040307070440.A79457@xorpc.icir.org>
In-Reply-To: <20040307141643.GS35475@elvis.mu.org>; from mux@freebsd.org on Sun, Mar 07, 2004 at 03:16:43PM +0100
References:  <20040306111922.GA64109@numeri.campus.luth.se> <20040306082625.B34490@xorpc.icir.org> <20040306173219.GB64109@numeri.campus.luth.se> <20040306212233.A56351@xorpc.icir.org> <20040307113008.GC64109@numeri.campus.luth.se> <20040307140915.GR35475@elvis.mu.org> <20040307141643.GS35475@elvis.mu.org>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sun, Mar 07, 2004 at 03:16:43PM +0100, Maxime Henrion wrote:
...
[thanks for the clarification about %llu vs %qu]

> > before).  It is correct to cast to unsigned long long and use "%llu" to
> > print an uint64_t because a long long is guaranteed to always be at
> > least 64 bits.  One should however still use uint64_t to store the type

yes, my point against casts was that given that we are going for some
code cleanup, we might also do it right and make sure there are
no aligmnent issues by using align_uint64() and making it return the
correct type so we need no casts.

> those in FreeBSD because they are simply ugly.  Also, it's probably not
> a good idea to use this in ipfw since Luigi is concerned about keeping
> the code similar in 5.x and 4.x.

yep

	cheers
	luigi



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?20040307070440.A79457>