From mboxrd@z Thu Jan 1 00:00:00 1970 From: tlaronde@polynum.com Date: Wed, 31 Mar 2010 00:29:43 +0200 To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Message-ID: <20100330222943.GA1047@polynum.com> References: <4c1be092bc2b1a1fe5008f584c75e3cf@terzarima.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4c1be092bc2b1a1fe5008f584c75e3cf@terzarima.net> User-Agent: Mutt/1.4.2.3i Subject: Re: [9fans] ken-cc, 64 bits machine, and 32 bits integers Topicbox-Message-UUID: fa06e6f8-ead5-11e9-9d60-3106f5b1d025 On Tue, Mar 30, 2010 at 09:11:07PM +0100, Charles Forsyth wrote: > on 64-bit machines, int and long are 32 bits, > long long (vlong) is 64 bits, just as on 32-bit machines, > but pointers are 64 bits. defines uintptr > as the integer type that will hold a pointer. > u8int, u16int, u32int and u64int are used in device drivers > and elsewhere to declare values (eg, in memory-mapped > structures or protocol buffers) that must be a precise length. Thanks. As suggested by many, I will read u.h. Since I wanted to keep the code pure C89, going with "long" will do without trying to be smarter. Second option, goes POSIX/APE and use uint32_t/u32int incarnations. I think I will go the former. -- Thierry Laronde (Alceste) http://www.kergis.com/ Key fingerprint = 0FF7 E906 FBAF FE95 FD89 250D 52B1 AE95 6006 F40C