tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: aibs(4): ASUSTeK AI Booster (ACPI ATK0110) hardware monitor with limit support



On Thu, 31 Dec 2009, Jukka Ruohonen wrote:

> > > These should probably be %"PRId64" (or %"PRIx64" with uint64_t).
> >
> > Sure, looks good...  Actually, what's the purpose of this?  Is
> > sizeof(unsigned long long) greater than sizeof(uint64_t) on amd64?  If
> > not, then why do you have to change llx to lx?  :/
>
> Someone wiser has to answer this one :).

The answer of course is that "uint64_t" is mostly equal to "unsigned long
long" but it is not guaranteed to be, because long is a natural type and
not an absolute type. If you use PRIu64 or PRIx64 then the result will
always be correct, but llx might not be for all architectures that NetBSD
aims to support.

iain




Home | Main Index | Thread Index | Old Index