[mod.std.unix] missing features from POSIX

std-unix@ut-sally.UUCP (Moderator, John Quarterman) (10/28/86)

From: utah-cs!cbosgd!cbosgd.ATT.COM!mark (Mark Horton)
Date: Mon, 27 Oct 86 20:51:58 est

In comparing various C libraries and standards, I discovered several
important routines that are in neither POSIX nor X3J11.  I'd like to
find out why they are missing.  Would you please either answer these,
ask the appropriate person, or post to mod.std.unix?

[ Post.  Most of them are higher level than X3J11 or 1003.1 address.  -mod ]

Some of these functions were explicitly created to enhance portability,
so it seems surprising to omit them.

getopt	This function is now present in System V and in 4.3BSD.  Two
	public domain implementations have been released, one by
	Toronto and one by AT&T.  AT&T is pushing getopt as a standard
	way to process arguments.  Yet it's unwise to use it if you
	can't be reasonably assured that it will work everywhere.

	I can even imagine that another operating system might support
	getopt to crack their own native conventions; for example, on
	MS DOS it might check for options beginning with / (or maybe
	even with the switch char.)  On a MacIntosh, it might be possible
	to get options from mouse conventions or a menu (possibly with
	the use of an additional table for menu labels.)

curses	Both 4BSD and System V have curses libraries which are largely
	compatible, making curses the most portable and highest level
	way to write screen oriented software.  Many curses functions
	were explicitly included to assist portability.  Yet a system
	can conform to POSIX and not provide any screen handling support.

	I would recommend that some appropriate subset of curses be
	specified by POSIX.  The subset should be the intersection
	of 4BSD and System V curses (essentially this means 4BSD minus
	the unportable features) with a dozen or so System V functions
	that enhance portability included (such as erasechar and cbreak.)

popen	This is part of standard I/O, but specific to UNIX, it's in
	every version of UNIX I know of.  Yet it's in neither X3J11
	nor POSIX.

I also ran into problems with <memory.h> and memccpy, but these are
conflicts between SVID and X3J11 which I will direct elsewhere.

	Mark

Volume-Number: Volume 7, Number 96

std-unix@ut-sally.UUCP (Moderator, John Quarterman) (10/28/86)

From: pyramid!amdahl!hlj@sally.utexas.edu (Hal Jespersen)
Date: Tue, 28 Oct 86 06:59:26 PST
Organization: Amdahl Corp, UTS Products Group

In article <6128@ut-sally.UUCP>:
 >From: utah-cs!cbosgd!cbosgd.ATT.COM!mark (Mark Horton)
 >Date: Mon, 27 Oct 86 20:51:58 est
 >
 >In comparing various C libraries and standards, I discovered several
 >important routines that are in neither POSIX nor X3J11.  I'd like to
 >find out why they are missing.  Would you please either answer these,
 >ask the appropriate person, or post to mod.std.unix?
 >
 >Some of these functions were explicitly created to enhance portability,
 >so it seems surprising to omit them.
 >
 >getopt...
 >
This is actively being addressed in the 1003.2 Shell and Utilities
Working Group.

 >curses...
 >
This is not being addressed by 1003.2, as we are purposely avoiding
terminal interfaces and concentrating on shell interfaces from application
programs, such as through...

 >popen...
 >
which _is_ being included in 1003.2.

Volume-Number: Volume 8, Number 4