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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,995362da150dc3a9 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news4.google.com!feeder.news-service.com!newsfeed.freenet.de!news.teledata-fn.de!newsfeed.arcor.de!newsspool2.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Thu, 26 Jun 2008 12:19:32 +0200 From: Georg Bauhaus Reply-To: rm.tsoh+bauhaus@maps.futureapps.de User-Agent: Thunderbird 2.0.0.14 (Windows/20080421) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Interfacing to C and long long data type References: <4abde3e1-3c8c-4b01-b63b-d29e7039070b@f36g2000hsa.googlegroups.com> <48635909.8060204@gmail.com> In-Reply-To: <48635909.8060204@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <48636d38$0$7542$9b4e6d93@newsspool1.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 26 Jun 2008 12:19:36 CEST NNTP-Posting-Host: a57f8b21.newsspool1.arcor-online.net X-Trace: DXC=[<[E`4KHfo3n`gW2MTm]<3ic==]BZ:af>4Fo<]lROoR1<`=YMgDjhg2h?n0>]NnbY2PCY\c7>ejV8C8?deI891]?ihk\@9=FZj0 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:892 Date: 2008-06-26T12:19:36+02:00 List-Id: S�bastien Morand wrote: > Anyway when you interface Ada with C, you are loosing the portability of > your program. OTOH, in particular when using GNAT's native targets, there is a good chance that you loose very little when interfacing with C (as Maciej explains)---without proper C interfacing there is just no Ada program when the runtime relies on C conventions anyway. It has to, because among the facts of life, one is that an OS is typically written in C.[*] When your target is not native, again, chances are that the OS infrastructure on which to build your Ada program uses C conventions. I won't mention the load of useful libraries that are, unfortunately, written in &*-language. I won't be able to use these libraries when you insist on Ada Only portability. A better appraoch would seem to isolate the interfacing parts and use redundant representation clauses and a handful of tests. Running the test will not be the same as a careful analysis of matching C/Ada representations. But at least they can draw attention to this important issue. -- Georg ___ [*] Another fact is that working for an investment bank and working for an adventure game team show the same traits and effects of addiction. Could this play a part in how OS software is written...