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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3869f0598191b11d X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news.glorb.com!news.zanker.org!dedekind.zen.co.uk!zen.net.uk!demorgan.zen.co.uk!194.72.9.35.MISMATCH!news-peer1!btnet-feed5!btnet!news.btopenworld.com!not-for-mail From: "Martin Dowie" Newsgroups: comp.lang.ada Subject: Re: Porting ADA source Date: Mon, 19 Jul 2004 18:05:58 +0000 (UTC) Organization: BT Openworld Message-ID: References: NNTP-Posting-Host: host81-152-56-222.range81-152.btcentralplus.com X-Trace: sparta.btinternet.com 1090260358 28806 81.152.56.222 (19 Jul 2004 18:05:58 GMT) X-Complaints-To: news-complaints@lists.btinternet.com NNTP-Posting-Date: Mon, 19 Jul 2004 18:05:58 +0000 (UTC) X-Newsreader: Microsoft Outlook Express 6.00.2800.1437 X-MSMail-Priority: Normal X-Priority: 3 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Xref: g2news1.google.com comp.lang.ada:2239 Date: 2004-07-19T18:05:58+00:00 List-Id: "Giacomo Polizzi" wrote in message news:cdfu3s$k1a$1@e3k.asi.ansaldo.it... > I have to port an ADA program from an Unix DEC Alpha machine with a DEC ADA > compiler to a Linux pc machine with gnat (gcc) compiler. > > The task is to have, if possible, an unique source code compilable on both > platforms but there are the following problems: > > 1) some system packages that execute the same kind of operations have > different names in the two compilers You could (possibly) keep the original package spec and then select either the original package body or a new 'wrapper' package body at build time. > 2) some system functions (for example mathematical function) have different > names in the two compilers As 1) > 3) the word length is 64 bits on DEC Alpha and 32 bits on pc so it is not > always possible to use the same standard type (for example the long type is > 64 bits on Alpha and 32 bits on pc) > > 4) the standard type (long long) used by gcc on pc to solve the previous > problem is not supported by the DEC ADA compiler > > 5) the different word length modifies some structure length used to define > interface messages with other external programs Don't use the standard types! They are a convience for writing q&d programs and should never be used in production code. You could look at "Adasubst" at http://www.adalog.fr/compo2.htm#Semtools This can look through all your code and replace the offending "Long_Long_Float" with "My_Float" (or whatever you define). Hope this helps! Cheers -- Martin