where do %j/uintmax_t stand in terms of standards? [WAS: Re:
WARNS cleanup for ipfw
Luigi Rizzo
rizzo at icir.org
Sun Mar 7 07:04:41 PST 2004
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
More information about the freebsd-ipfw
mailing list