
Title:		getopt_long and getopt_clip
Case #:		PSARC/2003/035
Submitter:	Joseph Kowalski
Owner:		Joseph Kowalski
Date:		02/19/03

Introduction
============

This case adds the getopt_long(), getopt_long_only() and getopt_clip()
functions to libc.

Specification
=============

The getopt_long(), getopt_long_only() and getopt_clip() functions are added
to libc.

getopt_long() is provided as a porting aid for applications which follow
the GNU command line conventions.  No Sun generated applications should
use this interface.  Imported applications classified as External which use
getopt_long() are expected to use getopt_long().  Imported applications
classified as a taxonomy other than External are expected to evaluate the
choice between using getopt_long() and getopt_clip() and present that
rationale to the reviewing ARC.  Over time, a "case history" is expected
to establish a precedence, but none is asserted at this time.  (Projects
be warned; strong opinions exist in this area.)

The use of getopt_long_only() by any Sun utility is suspect and needs to
be justified.  This routine is intended for use by third parties only.
Note that even the providers of this routine (GNU/OpenBSD) discourage
its use.

Sun utilities which adhere to the CLIP specification are free to use
getopt_clip() or getopt().  It is strictly a stylistic choice.

Due to licensing restrictions associated with the GNU source for getopt_long(),
the Solaris implementation will be based upon the OpenBSD source.  There
are differences which are discussed on the attached manual page.

Deliverables
============

   1]	Implementation in libc.

   2]	A new header file, <getopt.h>.

   3]	A new manual page in section 3c.

Release Binding
===============

Patch.

Interface Taxonomy
==================

Evolving (See the getopt_long(3c) manual page.)

