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.7 required=5.0 tests=BAYES_00,DATE_IN_PAST_24_48, FORGED_MUA_MOZILLA autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,d8e3cd3d8dbaa4fb X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.138.146 with SMTP id a18mr1316506qau.6.1343313009759; Thu, 26 Jul 2012 07:30:09 -0700 (PDT) Received: by 10.66.75.39 with SMTP id z7mr1392464pav.6.1343312920795; Thu, 26 Jul 2012 07:28:40 -0700 (PDT) Path: a15ni105485768qag.0!nntp.google.com!q21no13929751qas.0!news-out.google.com!p10ni64680744pbh.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!border6.newsrouter.astraweb.com!news.astraweb.com!border6.a.newsrouter.astraweb.com!feed.xsnews.nl!border-3.ams.xsnews.nl!newsfeed.straub-nv.de!nuzba.szn.dk!pnx.dk!news.ecp.fr!gegeweb.org!feeder.news.orange.fr!not-for-mail Date: Tue, 24 Jul 2012 18:50:25 +0200 From: Pascal Obry Organization: Home - http://www.obry.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr-FR; rv:1.8.1.22) Gecko/20090605 Thunderbird/2.0.0.22 Mnenhy/0.7.5.0 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada "library only" compiler ? References: <2879c45e-f8e0-4434-9f82-968c585a4539@googlegroups.com> <87mx2ucags.fsf@ludovic-brenta.org> <500AA31F.8060004@obry.net> In-Reply-To: Message-ID: <500ed251$0$6189$ba4acef3@reader.news.orange.fr> NNTP-Posting-Date: 24 Jul 2012 18:50:25 CEST NNTP-Posting-Host: 82.124.199.141 X-Trace: 1343148625 reader.news.orange.fr 6189 82.124.199.141:14767 X-Complaints-To: abuse@orange.fr Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Date: 2012-07-24T18:50:25+02:00 List-Id: 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. 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. Pascal. -- --|------------------------------------------------------ --| Pascal Obry Team-Ada Member --| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE --|------------------------------------------------------ --| http://www.obry.net - http://v2p.fr.eu.org --| "The best way to travel is by means of imagination" --| --| gpg --keyserver keys.gnupg.net --recv-key F949BD3B