Path: utzoo!attcan!uunet!lll-winken!lll-lcc!mordor!joyce!ames!nrl-cmf!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.lang.c Subject: Re: Optimal structure field ordering Message-ID: <8192@brl-smoke.ARPA> Date: 30 Jun 88 16:46:27 GMT References: <163@navtech.uucp> <806@garth.UUCP> <254@obie.UUCP> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 10 In article <254@obie.UUCP> wes@obie.UUCP (Barnacle Wes) writes: >It would be very difficult to write a file system portable >across machines of varying architecture (i.e. Idris) if the compiler >on each machine can arbitrarily re-arrange structures to suit its own >whim. Although the original poster was mistaken about the order in which struct members are assigned addresses, it is nonetheless impossible to achieve binary file transportability simply by (acceptable) constraints on C struct format. There is a LOT more to binary data transportability than byte padding, alignment, and sequencing.