[Prism54-devel] [PATCH] use platform-independent types in isl_oid.h

Jens Maurer Jens.Maurer@gmx.net
Wed, 31 Dec 2003 14:19:22 +0100


Herbert Valerio Riedel wrote:
 > 1.) in theory yes, but I'm not aware of any linux platform, where gcc
 > maps char/short to anything different than 8/16 bit integers;

True.

Except that (older?) Crays seem to have 32bit "char", because
sub-word accesses are extremely slow.  Not that I'm aware of a Linux
port for those, and whether you'd be able to plug in a modern
WLAN card seems questionable at best.

Just be safe.

 > 2.) I haven't used u16 and u8 on purpose: I wasn't sure about the
 > signedness of those field members, and I want to go through each
 > single instance and check whether it's sensible or not;


Well, if you're worried about signedness, then make all those u16 and u8
that I replaced s16 and s8, respectively.  Those are the signed
versions.  Not that you should count on the signedness of "char",
anyway, though. (It's allowed to be different with each compiler.)

 > ps: about the if (..., cond) pattern; I'm not a big fan of it either
 > (but for different a reason) but I'd rather fix those in small
 > quantities, rather than doing a big commit over all instances, since I
 > fear introduction of bugs if changing many occurences at once;


Ok. Thanks for the general guidance.

Jens Maurer