Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

u_int64_t uint64_t

1,299 views
Skip to first unread message

nik

unread,
Jan 20, 2009, 7:52:56 PM1/20/09
to
Is the difference between u_int64_t and uint64_t simply platform
dependent?

Nate Eldredge

unread,
Jan 20, 2009, 8:36:20 PM1/20/09
to
nik <nik...@gmail.com> writes:

> Is the difference between u_int64_t and uint64_t simply platform
> dependent?

uint64_t is defined by the ISO C99 standard (7.18.1.11) and will be
defined in <stdint.h> on any compliant implementation that has 64-bit
unsigned integers. u_int64_t is not standard as far as I know, but does
seem to be pretty common; it probably predates wide availability of
<stdint.h>. uint64_t is probably the one you should use going forward.

However, if both are available, they really should be names for the same
type. If not, those responsible ought to be sacked.

Måns Rullgård

unread,
Jan 21, 2009, 9:03:02 PM1/21/09
to
Nate Eldredge <na...@vulcan.lan> writes:

> nik <nik...@gmail.com> writes:
>
>> Is the difference between u_int64_t and uint64_t simply platform
>> dependent?
>
> uint64_t is defined by the ISO C99 standard (7.18.1.11) and will be
> defined in <stdint.h> on any compliant implementation that has 64-bit
> unsigned integers. u_int64_t is not standard as far as I know, but does
> seem to be pretty common; it probably predates wide availability of
> <stdint.h>. uint64_t is probably the one you should use going forward.

I believe u_int64_t comes from pre-C99 BSD.

--
Måns Rullgård
ma...@mansr.com

0 new messages