Porting ADA source

From: Giacomo Polizzi (mio_at_.mio)
Date: 07/19/04


Date: Mon, 19 Jul 2004 09:42:27 +0200

Hello,

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

2) some system functions (for example mathematical function) have different
names in the two compilers

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

Is there something like #IFDEF of C language that I can use in ADA ?

Is there any other kind of solution for the above problems ?

Thanks to everybody

Giacomo



Relevant Pages

  • Re: The GNU Ada compiler
    ... >>> make GNAT work pleasantly on OpenVMS. ... So just compiling a standart GCC on ... >>> OpenVMS might not be enough to have an well working Ada on OpenVMS. ... universe and a GPL only compiler is not going to help get Ada into ...
    (comp.lang.ada)
  • Re: The GNU Ada compiler
    ... >> I think AdaCore could do with some competition in the binary distribution ... > universe and a GPL only compiler is not going to help get Ada into ... when gcc 4.1 is out of the door. ... > Ada by having them try the GNAT GPL version, ...
    (comp.lang.ada)
  • Re: Current status of Ada?
    ... learning and using this great language. ... The reason why compilers maker can't make their compiler totally free ... I agree with you that most of the links you can find on Ada websites ... AdaCore has contributed a free gnat compiler to ...
    (comp.lang.ada)
  • Re: Ravenscar-compliant bounded buffer
    ... the mid 1980's most compiler are FRONT_END compilers aka ... any system build around GNAT will contain the C code that GNAT ... The XGC Ada which is based on GNAT and uses C for its Real Time ... with VAXes for data processing applications. ...
    (comp.lang.ada)
  • Re: Standard Ada Preprocessor
    ... >> no active maintainers, and Ada. ... The cumulative effect is that GNAT ... > versions of gcc. ... This is a major upgrade to the compiler and currently ...
    (comp.lang.ada)