comp.lang.ada
 help / color / mirror / Atom feed
From: defaria@hpcladb.HP.COM (Andy DeFaria)
Subject: Re: Re: "limitations" of conditional compilation
Date: 13 Dec 89 17:33:47 GMT	[thread overview]
Message-ID: <920015@hpcladb.HP.COM> (raw)
In-Reply-To: 7398@hubcap.clemson.edu

>> 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.  

  parent reply	other threads:[~1989-12-13 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1989-12-11  2:02 limitations on optimizers for conditional compilation Emery
1989-12-11 15:58 ` "limitations" of " William Thomas Wolfe, 2847 
1989-12-12 21:10   `  Sun Visualization Products
1989-12-13 17:33   ` Andy DeFaria [this message]
1989-12-14 20:56     ` William Thomas Wolfe, 2847 
1989-12-15 20:05   ` Andy DeFaria
1989-12-11 20:10 ` limitations on optimizers for " Robert Munck
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox