u_int32_t vs uint32_t

Stuart Kreitman Stuart.Kreitman at Sun.COM
Mon Aug 23 09:46:06 PDT 2004



Matthieu Herrb wrote:

>
> the u_ variants are the traditional types used on BSD systems and 
> defined by including <sys/types.h>.
>
> There is some (limited) previous art of using the u_ types in the X 
> tree, that's why it looked right to me. 


Hmnn, that couldn't be the case anymore, because if I change it in 
Wraphelp.c, the build completes.

I have posted this question internally to see if we have a language 
lawyer who can explain whether there's some
standards body intent to push one form or another. Its not my bag.

>
>
> Defining a fixed width type in a portable manner can be tricky.
> I'd suggest include the relevant X header and use CARD32 instead of 
> u_int32_t / uint32_t. (Even though CARD32 is normally reserved for the 
> on the wire protocol iirc).

I'm content to stay with my suggestion of 5 minutes ago. I think there's 
one or another reason why CARD32 is not the better answer.

thanks

skk



More information about the release-wranglers mailing list