9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: tlaronde@polynum.com
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] ken-cc, 64 bits machine, and 32 bits integers
Date: Wed, 31 Mar 2010 00:29:43 +0200	[thread overview]
Message-ID: <20100330222943.GA1047@polynum.com> (raw)
In-Reply-To: <4c1be092bc2b1a1fe5008f584c75e3cf@terzarima.net>

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.  <u.h> 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) <tlaronde +AT+ polynum +dot+ com>
                 http://www.kergis.com/
Key fingerprint = 0FF7 E906 FBAF FE95 FD89  250D 52B1 AE95 6006 F40C



  reply	other threads:[~2010-03-30 22:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-30 19:37 tlaronde
2010-03-30 19:52 ` erik quanstrom
2010-03-30 19:56   ` EBo
2010-03-30 20:03     ` Devon H. O'Dell
2010-03-30 20:11     ` Charles Forsyth
2010-03-30 22:29       ` tlaronde [this message]
2010-03-30 20:54 ` Patrick Kelly
2010-03-30 22:34   ` tlaronde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100330222943.GA1047@polynum.com \
    --to=tlaronde@polynum.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).