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,56250291936154a0 X-Google-Attributes: gid103376,public From: Ole-Hjalmar Kristensen Subject: Re: OS Bindings (was: Where is the elusive jump command?) Date: 2000/04/06 Message-ID: #1/1 X-Deja-AN: 607545101 Sender: ohk@gong2.clustra.com References: <38D771CA.D41AF9B5@port.ac.uk> <8bq7ku$mc8$1@nnrp1.deja.com> <38E0E723.C39C392@quadruscorp.com> <8brfm4$4uc$1@nnrp1.deja.com> <8brn4k$p6i$1@slb0.atl.mindspring.net> <8brrpj$i04$1@nnrp1.deja.com> <38E312F8.78883ACB@icn.siemens.de> <8c4rvf$d9k$1@nnrp1.deja.com> <2000Apr5.070127.1@eisner> <2000Apr6.081305.1@eisner> X-Complaints-To: abuse@telia.no X-Trace: news.telia.no 955028001 195.204.160.194 (Thu, 06 Apr 2000 15:33:21 CEST) Organization: Telia Internet Public Access NNTP-Posting-Date: Thu, 06 Apr 2000 15:33:21 CEST Newsgroups: comp.lang.ada Date: 2000-04-06T00:00:00+00:00 List-Id: kilgallen@eisner.decus.org (Larry Kilgallen) writes: > In article , Ole-Hjalmar Kristensen writes: > > kilgallen@eisner.decus.org (Larry Kilgallen) writes: > > > >> In article , Ole-Hjalmar Kristensen writes: > >> > Robert Dewar writes: > >> > >> >> But in any case, binding to C is hardly a topic that is > >> >> appropriate to people first learning the language! > >> >> > >> > > >> > Certainly, but writing bindings to C is one of the first things you > >> > have to do if you start using Ada for systems programming on Unix, > >> > unfortunately. > >> > >> I am not sure what you mean by "systems programming" in this case. > >> I would presume that writing device drivers requires knowledge of > >> internal data structures, but don't vendors like Rational supply > >> bindings to Unix entrypoints that might be called by user-mode > >> programs ? > > > > I was not thinking device drivers, but systems like communications > > systems or DBMS's, which typically will need access to Unix > > entrypoints or system calls. A thick binding designed by someone who > > is unaware of the specific needs of the system may not be suitable. > > > > An example of the the need for system calls: A couple of months ago I > > wanted to test various implementations of asynchronous IO (Sun > > asynchronous IO, POSIX asynchronous IO, and Ada). However, to do a > > meaningful test, I need to ensure that I/O operations on the file > > descriptor complete as defined by synchronized I/O data integrity > > rules. This means either using the fcntl or fsync system calls, or > > setting the O_SYNC flag in the call to open. > > > > In this case, needing only a few system calls, it may be more cost > > effective to write your own binding, as it's usually not difficult. > > > > Yes, it may be possible to buy such a binding, although I have not > > seen any reference to it, either on Rational's web pages, nor on > > Adahome's list of bindings. > > On VMS, using either DEC Ada (83) or GNAT, one gets these bindings > in the package STARLET. If a competitor were to develop a compiler > for VMS without the assistance of Compaq they could achieve the same > effect with the public domain SDL program to extract the binding data > from the operating system. > Yes, I know. I used DEC's Ada 83 years ago, and was very pleased. > On Windows NT, Aonix ships two competing sets of bindings to the > operating system calls and matching data structures. > > Are you saying that no Ada vendors for Unix provide bindings ? > > That seems incredible in the face of all the hype about how Unix > is ideal for programming. Actually, I was only saying that I could tell you which vendors do supply one. During the last years, I've only used GNAT for Unix, which provides an interface to some of the system calls. Btw., I've now checked Aonix, and they do provide a Posix interface. Don't know how complete it is. I still think Unix is pretty good for programming. You cannot blame the OS for poor support from Ada vendors :-) Ole-Hj. Kristensen -- E pluribus Unix