cvs commit: src/sys/net if_ethersubr.c src/sys/sys mbuf.h src/sys/kern uipc_mbuf.c src/sys/conf NOTES options

Marcel Moolenaar xcllnt at
Wed Apr 30 18:49:47 UTC 2008

On Apr 30, 2008, at 11:39 AM, Julian Elischer wrote:

> Max Laier wrote:
>> On Tuesday 29 April 2008 23:23:21 Julian Elischer wrote:
>>> julian      2008-04-29 21:23:21 UTC
>>>  FreeBSD src repository
>>>  Modified files:
>>>    sys/net              if_ethersubr.c
>>>    sys/sys              mbuf.h
>>>    sys/kern             uipc_mbuf.c
>>>    sys/conf             NOTES options
>>>  Log:
>>>  Add an option (compiled out by default)
>>>  to profile outoing packets for a number of mbuf chain
>>>  related parameters
>>>  e.g. number of mbufs, wasted space.
>>>  probably will do with further work later.
>> This breaks the build:
>> 1) Use %u to print unsigned values
>> 2) printing [u]int64_t's has been broken since the beginning.  The  
>> reason is the unfortunate choice to have int64_t be a "long int"  
>> alias on platforms with a 64bit long (while they could as easily be  
>> "long long int" as on the other platforms where long is 32bit wide  
>> - this also means that "long long" is > intmax_t which is an alias  
>> for int64_t).  Hence you either have to use the (ugly) PRIu64  
>> macro, or %ju and cast to uintmax_t.  This is a no-op (as long as  
>> we don't have uint128_t or the like).
> I'm happy to change the types to any way you suggest..
> how about just changing them to long long?

I hope you don't mean redefining [u]int64_t from [u_]long to
[u_]long_long on 64-bit platforms? I violently oppose that.

Itanium already supports 128-bit atomic operations and I like
like to keep long long available for that...

Not to mention that PRIu64 is defined exactly for this issue,
so I would suggest that people get over their eye-of-beholder
objections and just use it (if casting to long long and sing
%llu is not an option)...


Marcel Moolenaar
xcllnt at

More information about the cvs-all mailing list