The C standard allows for arbitrary padding for alignment reasons but in practice how structs are padded is pretty consistent among most C compilers.
Also, most good structs are laid out such that no padding is required.
So you can use pack quite portably in most cases. But, yes, there are exceptions.
- tye
In reply to Re^2: Using ioctl()
by tye
in thread Using ioctl()
by chriswalsh
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |