Chris Rutter writes:
> I thought it possible that there are widespread portability assumptions
> made in the Linux kernel that made that irrelevant. I wasn't making a
> value judgement.
The assumptions are that:
__u8, __u16, __u32 are all unsigned quantities of the indicated size.
__s8, __s16, __s32 are all signed quantities of the indicated size.
sizeof(unsigned long) >= sizeof(unsigned int) (standard ANSI)
sizeof(unsigned int) >= sizeof(unsigned short) (standard ANSI)
sizeof(unsigned short) >= sizeof(unsigned char) (standard ANSI)
> It would be necessary to know what portability assumptions are made in
> order to know how generically portable the patch would need to be; I
> doubt that it would need the full mLib READ32_L treatment, for instance;
> I imagine sexswap(__u32) might do the trick. I assume so much of Linux
> would break if those types weren't as they say...
We have nothing called "sexswap" because that is too specific. Instead,
we have cpu_to_le16(), be32_to_cpu() to convert from a specified endian
to whatever endianness the cpu is.
However, having said that, there were quite a few instances where the
use of the unguaranteed types (unsigned int etc) were used in
fs/partitions/acorn.[ch] which I have now corrected, so its no longer
necessary for a patch.
_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King [EMAIL PROTECTED] --- ---
| | | | http://www.arm.linux.org.uk/ / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
This is a backup list for [EMAIL PROTECTED], and the subscription
list is regularly synchronised.