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,6413b417b806eb28 X-Google-Attributes: gid103376,public From: "Tarjei Tj�stheim Jensen" Subject: Re: Accessing C macro constants from Ada95 Date: 1999/04/12 Message-ID: <7esfk1$k301@ftp.kvaerner.com>#1/1 X-Deja-AN: 465409063 Content-Transfer-Encoding: 7bit References: <7eg43i$d3b$1@nnrp1.dejanews.com> <370CC730.4C6112DB@utech.net> <370D7007.2D3AD58B@rocketmail.com> <7el9so$geb@drn.newsguy.com> <7elrg5$egk2@ftp.kvaerner.com> <7emjk8$rp3@drn.newsguy.com> <7ep6uj$o97$1@nnrp1.dejanews.com> <7eqoj2$r27$1@pegasus.csx.cam.ac.uk> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Organization: Kv�rner Oil & Gas Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-04-12T00:00:00+00:00 List-Id: Markus Kuhn wrote : >Ada does indeed have nice facilities to access functions and variables >in C object files, but what has been completely forgotten is that >under C, traditionally a very significant part of the API comes >in the form of numeric macro constants defined in *.h files. And >Ada95 does not provide a portable way to get at these. Ada >programmers should not have to write buggy and dangerous Perl >hacks again and again to get access to the constants in C header >files. That I think is the main reason why people are interested >in POSIX.5, which provides all the necessary constants at least >for this important API. In order to do this you would need to implement a complete C preprocessor and probably parts of the compiler as well. It is completely unpractical compared to writing a C program that generates the apropriate module(s) or perhaps one should link the Ada program with a C module that provides the answers. Greetings,