In message: <[EMAIL PROTECTED]>
            Max Laier <[EMAIL PROTECTED]> writes:
: On Sunday 21 January 2007 16:47, M. Warner Losh wrote:
: > In message: <[EMAIL PROTECTED]>
: >
: >             Alexander Leidinger <[EMAIL PROTECTED]> writes:
: > : I was thinking more about something like:
: > :       to print                         identifier to use in the
: > : kernel sizeof()                         %zd
: > :       int64_t                          xyz
: > :       int32_t                          klm
: > :       ...                              ...
: >
: > The last two aren't possible to print without casts, or the PRI_xxx
: > macros.
: 
: That's right, but I think we can fix it by simply making int64_t an alias 
: for "long long" on all architectures.  I still haven't heard any reason 
: not to just do this - is there something, other than historical?

The short answer is because long long and long are different types.
Changing the underlying type for uint64_t and friends would break
user's code as the underlying type changes.

And it isn't portable, which would make code written for FreeBSD much
less portable.  The only portable way is to use the PRI* macros.  We
can paper over this fact, kinda, in FreeBSD.  So long as we never have
an architecture where long long isn't 128 bits.

In short, this is a really bad idea.

Warner
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to