From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=BAYES_00,FROM_NO_USER autolearn=no autolearn_force=no version=3.4.5-pre1 Date: Wed, 7 Apr 93 11:29:26 CDT From: crispen <@ada3.ca.boeing.com:crispen@eight-ball.boeing.com> Subject: Re: "POSIX syntax" Message-ID: <9304071629.AA13048@eight-ball.boeing.com> List-Id: emery@mitre-bedford.arpa (David Emery) sez: >>It occurs to me that it might be sensible for programs to require >>that all OS interfaces which are not pre-defined in the language (e.g., >>Text_IO, task stuff) be defined in Posix syntax. > >Could you please explain this? What is "Posix syntax"? I'm not >familiar with that term... > > dave > (IEEE P1003.5 POSIX/Ada Binding Technical Editor) Turning at random to 6.5.2 of 1003.1 I see: int fcntl (int fildes, int cmd, ...); I would deduce that if (a) I want to have a package of OS Services right this very minute and (b) I want to minimize the work I have to do when the final Ada bindings come out, I should put something like the following in my Ada package spec: function Fcntl ( Fildes : Integer; Cmd : Integer) return Integer; Now if I want to get fancier, then I'll have: type Fcntl_Returns is ( F_DUPFD... for Fcntl_Returns use ( F_DUPFD => ??? for Fcntl_Returns'SIZE use 32; and so on. In fact, if your gang already has a preliminary version of the Ada bindings for Fcntl published, then I'll use them. For example, in the draft I have of the 1003.4 "thin" bindings I see under 5.6.4.1: procedure Change_Permissions (File : in POSIX_IO.File_Descriptor; Permission : in POSIX_Permissions.Permission_Set); Which I would obviously use if I required this functionality. I'm simply reacting to my belief that Ada bindings to all the functions I require in my OS services package are not yet cast in concrete and available for a nominal fee from my compiler vendor. In the event that this is true, and that I must interface with the services of the OS today, then I must write a package whose spec contains declarations like the examples above (with the example immediately above preferred), and I must write a package body which tweaks the parameters so as to implement this stuff for my target OS. In the future, of course, it makes sense to use store-boughten POSIX bindings. Today, I was asserting that I might save a little work down the road if I do something like the above. That's what I meant by POSIX Syntax. Has the 1003.5 group fallen into a way of speaking in which that wasn't clear? +-------------------------------+--------------------------------------+ | Bob Crispen | Who will babysit the babysitters? | | crispen@foxy.boeing.com +--------------------------------------+ | (205) 461-3296 |Opinions expressed here are mine alone| +-------------------------------+--------------------------------------+