I thought you were simply looking for code portability. You must never
send a binary stucture across a network. Even if you get the sizes
correct, you'll have endian problems when running different
architectures (PC vs Mac). You must manually ship the data bytes in a
defined order and reconstruct it at the other end. At that point, it
doesn't matter what the padding or for different compilers (or the
order) is because you won't be sending the padding - just the data.
Never block transfer a structure by providing a pointer and size, there
is simply no way for that to work cross-platform.
Flightgear-devel mailing list