From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!samsung!usc!ucsd!ucsdhub!hp-sdd!hplabs!hpda!hpcuhb!hpcllla!hpclisp!hpcladb!defaria From: defaria@hpcladb.HP.COM (Andy DeFaria) Newsgroups: comp.lang.ada Subject: Re: Re: "limitations" of conditional compilation Message-ID: <920015@hpcladb.HP.COM> Date: 13 Dec 89 17:33:47 GMT References: <7398@hubcap.clemson.edu> Organization: Hewlett-Packard Calif. Language Lab List-Id: >> Furthermore, there are many reasons besides host machine name for >> doing separate compilation. One that comes immediately to mind occurs >> when a specific feature is present or absent from the version of the >> operating system generated for a given machine. I've seen this rather >> frequently in Unix. > > Appropriately handled in the package which provides the binding to > the operating system involved. OS bindings must also be standardized, > and this is taking place; e.g., the IEEE 1003.5 Ada binding to Posix. > I'm developing such a binding as we speak. One problem that I have, and haven't been able to workaround, is that of different representation clauses. This OS binding is designed to be portable to multiple architectures. The data alignment of the different machines are different so I need to: Machine 1 Machine 2 ---------------------------------- ---------------------------------------- for RECORD_1 use for RECORD_1 use record record FIELD_1 at 0 range 0 .. 15; FIELD_1 at 0 range 0 .. 15; FIELD_2 at 2 range 0 .. 15; FIELD_2 at 4 range 0 .. 15; ... ... end record; end record; As you can see Machine 2 need to be aligned at the 4 byte boundary. Since the interface code I am going to is C (Unix system calls) I'm stuck the these record layouts and alignments. I have thought using some sort of constant to determine where the next alignment would be but it would make the coding of the for clause exceeding difficult.