Nicholas Clark writes:
> prev = sizeof(struct NodeDescriptor);
>
> which is 16. :-)
Try adding __attribute__((packed)) to the structure.
> Or is the whole scheme used by hfs ANSIly flawed, and for true
> portability it can only use one contiguous char array, as structures
> can be padded between any members?
Yes, hfs is ANSI-ly flawed - as far as ANSI is concerned, GCC is not doing
anything illegal - it can pad structures all that it wants, so long as it
doesn't change the order of the elements.
Unfortunately, this behaviour of GCC for ARM is not what a lot of people
expect.
_____
|_____| ------------------------------------------------- ---+---+-
| | Russell King [EMAIL PROTECTED] --- ---
| | | | http://www.arm.linux.org.uk/~rmk/armlinux.html / / |
| +-+-+ --- -+-
/ | THE developer of ARM Linux |+| /|\
/ | | | --- |
+-+-+ ------------------------------------------------- /\\\ |
unsubscribe: body of `unsubscribe linux-arm' to [EMAIL PROTECTED]
++ Please use [EMAIL PROTECTED] for ++
++ kernel-related discussions. ++