comp.lang.ada
 help / color / mirror / Atom feed
From: Pascal MALAISE <malaise@magic.fr>
Subject: Re: PRECOMPILATION
Date: 1999/02/11
Date: 1999-02-11T19:55:53+00:00	[thread overview]
Message-ID: <36C335C9.7932690@magic.fr> (raw)
In-Reply-To: 36c20a62.18186185@news.pacbell.net

Tom Moran wrote:
> 
> >As an example, just consider that a file size, of type "long" in C, can
> >be
> >implemented on 32 or 64 bits, depending on the operating system.
>   And when it's passed from a 64 bit system to a 32 bit system what
> happens to the extra 32 bits?
This is absolutely out of question.

> Or do you mean that sometimes the Ada
> code talks to some C code that expects 32 bits, and other times the
> same Ada must talk to a differently compiled version of the same C
> code, but one that expects 64 bits?
Not realy. It is just a matter of the same source ported on several
operating systems. At this stage, we don't need these different portings
to interact.
We want each of them to run, each of them on a different OS.
But each of them is Ada and C and use the OS, and some OS/architecture
implement
long on 64 bits and some others implement long on 32 bits.
but the C library calls use the "long" type anyway:
int fseek( FILE *stream, long offset, int whence);
We need to provide "portable" ada interface for such call, so, in the
exported
ada interface, we define the ada MY_LONG_INTEGER type on 64 or 32 bits,
just
according to what the /usr/include/sys/type.h does.

> In which case, why not
> standardize on the Ada 32 bits (using a rep clause) and do the usual
> preprocessor stuff for making a C program "portable"?
On one architecture, the same constraint on a file size applies to a
pure C program
as to an Ada application.


-- 
Pascal MALAISE
(priv) mailto:malaise@magic.fr
(prof) mailto:malaise@fr.airsysatm.thomson-csf.com




  reply	other threads:[~1999-02-11  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-09  0:00 PRECOMPILATION =:-) Vincent
1999-02-09  0:00 ` PRECOMPILATION Larry Kilgallen
1999-02-09  0:00   ` PRECOMPILATION Pascal MALAISE
1999-02-09  0:00     ` PRECOMPILATION Tucker Taft
1999-02-09  0:00     ` PRECOMPILATION Tom Moran
1999-02-10  0:00       ` PRECOMPILATION dennison
1999-02-10  0:00       ` PRECOMPILATION Corey Ashford
1999-02-10  0:00       ` PRECOMPILATION robert_dewar
1999-02-09  0:00     ` PRECOMPILATION Tom Moran
1999-02-10  0:00       ` PRECOMPILATION Pascal MALAISE
1999-02-10  0:00         ` PRECOMPILATION Tom Moran
1999-02-11  0:00           ` Pascal MALAISE [this message]
1999-02-12  0:00             ` PRECOMPILATION robert_dewar
1999-02-14  0:00               ` PRECOMPILATION Pascal MALAISE
1999-02-09  0:00 ` PRECOMPILATION Tucker Taft
1999-02-10  0:00   ` PRECOMPILATION Fraser Wilson
1999-02-18  0:00   ` PRECOMPILATION Samuel Mize
1999-02-18  0:00     ` PRECOMPILATION Rakesh Malhotra
1999-02-19  0:00       ` PRECOMPILATION Samuel Mize
1999-02-18  0:00     ` PRECOMPILATION robert_dewar
1999-02-28  0:00     ` PRECOMPILATION Robert A Duff
1999-02-09  0:00 ` PRECOMPILATION Marin David Condic
1999-02-09  0:00 ` PRECOMPILATION Tom Moran
1999-02-10  0:00   ` PRECOMPILATION Pascal MALAISE
1999-02-10  0:00     ` PRECOMPILATION Tom Moran
replies disabled

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