packing & bit fields
Posted on 2000-02-19
I have a structure which contains elements of various sizes - one of which is a bitfield containing elements that are 1, 2 and 3 bits wide.
The code compiled and worked fine as a Win32 console program, but under Linux the packing/bitfields are all weird and nothing lines up properly.
I know about the PACKED keyword to use in the structure definition - but it seems to make little difference.
Anyone got any ideas?