Subject: Re: Data types in kernel-compatible code
To: Florian Stoehr <firstname.lastname@example.org>
From: Simon Burge <email@example.com>
Date: 01/01/2005 22:39:58
Florian Stoehr wrote:
> for normal I always program in c++, not pure c.
> I have a question regarding data types used in kernel or other
> code in the netbsd project.
> For written data (to file) in my programs, I use the "int32_t" or
> "uint32_t" types.
> Is it okay to use those types (from /usr/include/sys/stdint.h) in
> "netbsd-compatible" code, regarding the style?
The C99 types (intN_t, uintN_t) are preferred, both in the kernel and
> (I read "u_long" somewhere)?
u_long/long, especially for data written to files, isn't going to be
compatible across 32- and 64-bit platforms.
Simon Burge <firstname.lastname@example.org>
NetBSD Support and Service: http://www.wasabisystems.com/