comp.lang.ada
 help / color / mirror / Atom feed
* Re: "POSIX syntax"
@ 1993-04-07 16:29 crispen
  0 siblings, 0 replies; only message in thread
From: crispen @ 1993-04-07 16:29 UTC (permalink / raw)


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|
+-------------------------------+--------------------------------------+

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1993-04-07 16:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1993-04-07 16:29 "POSIX syntax" crispen

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