comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Ada  "library only" compiler ?
Date: Wed, 25 Jul 2012 18:34:56 -0500
Date: 2012-07-25T18:34:56-05:00	[thread overview]
Message-ID: <jupvr2$an2$1@munin.nbi.dk> (raw)
In-Reply-To: 500ed251$0$6189$ba4acef3@reader.news.orange.fr

"Pascal Obry" <pascal@obry.net> 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.





  parent reply	other threads:[~2012-07-25 23:35 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 20:05 Ada "library only" compiler ? Patrick
2012-07-20 21:11 ` Niklas Holsti
2012-07-20 21:47   ` Ludovic Brenta
2012-07-20 22:25   ` Peter C. Chapin
2012-07-20 22:51     ` Ludovic Brenta
2012-07-21  0:32       ` Randy Brukardt
2012-07-21 12:39         ` Pascal Obry
2012-07-22  4:59           ` Shark8
2012-07-22  7:04             ` Pascal Obry
2012-07-22 10:17           ` Florian Weimer
2012-07-24  1:54           ` Randy Brukardt
2012-07-24 16:50             ` Pascal Obry
2012-07-24 18:01               ` Vasiliy Molostov
2012-07-24 21:30                 ` Pascal Obry
2012-07-25  6:33                   ` Vasiliy Molostov
2012-07-25 23:44                   ` sbelmont700
2012-07-25 23:34               ` Randy Brukardt [this message]
2012-07-21 11:05     ` Niklas Holsti
2012-07-20 23:30   ` Patrick
2012-07-21 16:47     ` Niklas Holsti
2012-07-21 17:47       ` Patrick
2012-07-21 19:22         ` Simon Wright
2012-07-21 19:38           ` Patrick
2012-07-21 22:53         ` Brian Drummond
2012-07-22  3:25           ` Patrick
2012-07-22 17:54             ` Brian Drummond
2012-07-22 17:59               ` Brian Drummond
2012-07-22 18:44                 ` Patrick
2012-07-22 21:03                   ` Brian Drummond
2012-07-25 19:10                   ` J-P. Rosen
     [not found]               ` <m2a9yrsbf5.fsf@nidhoggr.home>
     [not found]                 ` <jui36a$hs0$1@dont-email.me>
2012-07-23 10:10                   ` Simon Wright
2012-07-24 10:55                     ` Brian Drummond
2012-07-22 21:25             ` Niklas Holsti
2012-07-22 22:00               ` Patrick
2012-07-22 21:18         ` Niklas Holsti
2012-07-21  0:27   ` Randy Brukardt
2012-07-21  7:36     ` Dmitry A. Kazakov
2012-07-21 13:31     ` Niklas Holsti
     [not found]   ` <olpj085ii9fpifpligh6jerghoaieiim1d@invalid.netcom.com>
2012-07-20 23:38     ` Patrick
2012-07-21 13:12     ` Niklas Holsti
2012-07-23  5:02 ` Miles Bader
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox