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,d8e3cd3d8dbaa4fb X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.66.88.5 with SMTP id bc5mr1386780pab.11.1343259300303; Wed, 25 Jul 2012 16:35:00 -0700 (PDT) MIME-Version: 1.0 Path: c10ni34134pbw.0!nntp.google.com!news2.google.com!news3.google.com!feeder1.cambriumusenet.nl!feed.tweaknews.nl!195.62.100.242.MISMATCH!newsfeed.kamp.net!newsfeed.kamp.net!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!weretis.net!feeder4.news.weretis.net!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada "library only" compiler ? Date: Wed, 25 Jul 2012 18:34:56 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <2879c45e-f8e0-4434-9f82-968c585a4539@googlegroups.com> <87mx2ucags.fsf@ludovic-brenta.org> <500AA31F.8060004@obry.net> <500ed251$0$6189$ba4acef3@reader.news.orange.fr> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1343259299 10978 69.95.181.76 (25 Jul 2012 23:34:59 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Wed, 25 Jul 2012 23:34:59 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-07-25T18:34:56-05:00 List-Id: "Pascal Obry" wrote in message news:500ed251$0$6189$ba4acef3@reader.news.orange.fr... > > Randy, > >>> On Windows you interface to fopen() as done on >>> UNIXes I suppose or maybe to an even higher level using OpenFile(). >> >> Definitely not. We directly use the Win32 APIs for file functions (and >> there >> is not one called fopen). The Win32 API is called "CreateFile", and it is >> nothing much like the one from Unix or the one for C. > > So that's more a Definitely yes, OpenFile() is a Win32 API call too. > >> We have out own abstraction package (called "Basic_IO") that abstracts >> the >> underlying I/O facilities. Remember, we started out on CP/M and MS-DOS >> 1.0, >> neither of which had anything remotely like the Unix file operations. >> >> As I mentioned, we don't use any code written in C in our compiler; it's >> all >> written in Ada or assembler. And we directly interface to the >> lowest-level >> APIs that the OS defines - Win32 for 32-bit Windows. > > Depending on your view, the Win32 API is not the lowest API on windows > to me. What would be lower? Win32 directly makes calls on the DLLs that make up the OS kernel. Everything else that I'm aware of sits on top of that. > Anyway, what you are describing is exactly what is done in GNAT > (and I know pretty well this part!). But looks like you've changed your > arguments, it was about DLL better that interfacing to C. That's what I > was having difficulty to understand. Now you are talking API (be it > Win32 or libc or whatever OS level API) and that's ok to me. > > I said: > > Interfacing to a DLL is just like interfacing to C or whatever. > > And I still stand on it. DLL is a container, nothing to do with an API. Sure. But that doesn't have anything to do with this thread. The OP asked about the "C part" of a runtime, and several of us pointed out there wasn't necessarily any such thing. Interfacing to C (or Stdcall) is not remotely the same as having code in C as part of the runtime. I still don't quite understand what point you're trying to make; it seems quite irrelevant. The important point (to me) is whether or not there is code written in a non-Ada language in the runtime, how much, and in what language. Because it's that sort of code that makes it much harder to port the Ada runtime. The API will have to be changed in any case, but the non-Ada parts usually have to be redone as well (because a different foreign compiler is almost always needed on a new target, and that rarely works the same way). Maybe works better if you restrict yourself to the GCC universe, but I'm dubious. Randy.