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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,355f90547d1b4b5 X-Google-Attributes: gid103376,public From: Pascal MALAISE Subject: Re: PRECOMPILATION Date: 1999/02/11 Message-ID: <36C335C9.7932690@magic.fr>#1/1 X-Deja-AN: 443541363 Content-Transfer-Encoding: 7bit References: <918556681.260459@dedale.pandemonium.fr> <1999Feb9.081125.1@eisner> <36C08503.510FE86B@magic.fr> <36c0c9f7.6074742@news.pacbell.net> <36C1E967.A1A0232F@magic.fr> <36c20a62.18186185@news.pacbell.net> X-Client: Magic On Line [unknown@ppp10-87.magic.fr] X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@ulysse.magic.fr X-Trace: ulysse.magic.fr 918762953 858 127.0.0.1 (11 Feb 1999 19:55:53 GMT) Organization: Magic On Line Mime-Version: 1.0 NNTP-Posting-Date: 11 Feb 1999 19:55:53 GMT Newsgroups: comp.lang.ada Date: 1999-02-11T19:55:53+00:00 List-Id: 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