This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: Question about ash and getopts
- From: Brian Dessent <brian at dessent dot net>
- To: cygwin at cygwin dot com
- Date: Mon, 29 Dec 2003 13:32:28 -0800
- Subject: Re: Question about ash and getopts
- Organization: My own little world...
- References: <200312291900.hBTJ0Gqd014331@guild.plethora.net>
- Reply-to: cygwin at cygwin dot com
Peter Seebach wrote:
> But, most importantly, it's in POSIX. I can see no reason for /bin/sh to not
> be at least reasonably close to a POSIX shell, when the code is already
> written.
I was looking at the POSIX specs, and while getopts is listed as a
required utility[1], and it is listed in the table "regular built-in
utilities"[2] it is not in the table "special built-in utilities."[3]
So, it looks like the command must be present but it does not
necessarily have to be built into the shell.
The earliest discussion of this seems to be[4] a thread from October
2000, where Chris F states the following:
> The "ash maintainer" is either me or Corinna. FWIW, I don't plan on
> changing this. I want ash to be small and fast when running configure
> scripts. I've stripped ash down to support only the minimal set of
> functionality found in older versions of UNIX. I use the /bin/sh on
> Digital UNIX 3.2 as a reference.
>
> If you want more functionality, use bash.
>
> FYI, getopts can also be a separate program although we don't supply it
> with cygwin, currently.
So, it looks like cgf is the one you need to convince. Perhaps show the
running time differences of a long configure script with and without a
getopts-enabled ash. I have no idea what the differences may be, if
any.
Brian
[1]
http://www.opengroup.org/onlinepubs/007904975/utilities/getopts.html#tag_04_62
[2]
http://www.opengroup.org/onlinepubs/007904975/utilities/xcu_chap01.html#tagtcjh_5
[3]
http://www.opengroup.org/onlinepubs/007904975/utilities/xcu_chap02.html#tag_02_14
[4] http://sources.redhat.com/ml/cygwin/2000-10/threads.html#00337
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/