Re: [Flightgear-devel] net_fdm.hxx net_ctrls.hxx

2005-03-27 Thread Paul Kahler
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

RE: [Flightgear-devel] net_fdm.hxx net_ctrls.hxx

2005-03-27 Thread Paul Kahler
So the data should include a flag to tell what endian form it is, and the code should be written to support both ways? Image file formats specify and endianness in the specification, not the files. If it's in the files, then you'd need code to handle both ways... On Sun, 2005-03-27 at 09:28

RE: [Flightgear-devel] net_fdm.hxx net_ctrls.hxx

2005-03-27 Thread Miles Gazic
Don't ever assume that all the components of a structure will be at the same location within the struct on all architectures, or that the structure size will be the same. Processor architecture, language used, compiler, and compiler flags all can change how a structure is packed. That usually

Re: [Flightgear-devel] net_fdm.hxx net_ctrls.hxx

2005-03-27 Thread Norman Vine
On Mar 27, 2005, at 3:20 PM, Miles Gazic wrote: Don't ever assume that all the components of a structure will be at the same location within the struct on all architectures, or that the structure size will be the same. Processor architecture, language used, compiler, and compiler flags all can