|Structure tag alignment problem firstname.lastname@example.org (1991-12-15)|
|Re: Structure tag alignment problem email@example.com (1991-12-15)|
|Re: Structure tag alignment problem firstname.lastname@example.org (1991-12-16)|
|From:||email@example.com (Dave Jones)|
|Keywords:||C, GCC, portable|
|Organization:||Megatest Corporation, San Jose, Ca|
|Date:||16 Dec 91 23:51:27 GMT|
>From article 91-12-064, by firstname.lastname@example.org (Joe Gabriel):
> [i960 compiler aligns everything on 32 bit boundary, gcc 386 doesn't]
Solving this structure-tags problem will still leave you in a mess
if you ever need to communicate with a machine which has even more
storeage convention differences, such as byte-order.
Probably you should use some kind of serializing/deserializing protocol
which is more or less machine-independant. Sun's XDR is one such protocol.
Although it has some design-defects, it has the advantage of being free. It
is skewed toward Sun's internal representations of data. I don't know
if it has been ported to the processors you name. The standard FTP sites
all have it.
Another possibility is to send and receive the structures as text (ascii)
byte-sequences. This would require writing send/receive routines for
each data-structure (as does XDR -- the XDR package comes with programs
and library-routines to automate the process of writing said routines).
Project-suggestion: Wouldn't it be a good idea to design and standardize
an external data protocol based on text?
Return to the
Search the comp.compilers archives again.