If you are just running with the same Kernal, it will actually be hard
to write code that doesn't work the same on different machines.
If you go across multiple CPU architectures you need to be careful
about byte alignment and ordering issues.
Checkout the following article:
http://www.eventhelix.com/RealtimeMantra/ByteAlignmentAndOrdering.htm
Byte alignment and byte ordering only become an issue if one writes code
that is dependent upon such things. And if one does so purposefully,
(such as to store data as binary and have it read by a program running
on a different machine), such code relies upon implementation defined
behavior (and can invoke undefined behavior in the program reading
the binary data). Strictly conforming code would not depend upon
implementation defined behavior.
The closest to a Standard C solution to the above scenario would be to
store the data as text. However, it is still implementation defined as
to whether the stored text can be read properly by some other program
running on some other machine. (It depends on EOL discipline, character
set, and perhaps other issues, each issue being off-topic here.)
Since the OP states all his machines are Linux, does Linux on IBM
mainframes use EBCDIC?
-- James