Subject: Re: unsigned, unsigned long, unsigned long long
To: Wojciech Puchar <wojtek@wojtek.3miasto.net>
From: Todd Vierling <tv@wasabisystems.com>
List: netbsd-users
Date: 10/08/2001 16:56:23
On Mon, 8 Oct 2001, Wojciech Puchar wrote:
: > : what type should i use that is unsigned 8 byte integer on every arch?
: >
: > u_int64_t (from <sys/types.h> on 4.4BSDs)
: > uint64_t (from <inttypes.h> on compliant systems; NetBSD-current has this)
:
: NetBSD only or in every UNIX?
There is _no_ guaranteed 64-bit integer on all OS's. It has been
implementation dependent for ages....
With that said, <inttypes.h> is a standards-based header that should contain
uint64_t on many OS's.
NetBSD added <inttypes.h> in -current after 1.5. Before that on NetBSD, you
have to get u_int64_t from <sys/types.h>.
--
-- Todd Vierling <tv@wasabisystems.com> * Wasabi NetBSD: Run with it.
-- CDs, Integration, Embedding, Support -- http://www.wasabisystems.com/