[Toybox] Subject: [PATCH] Add getopt(1).

Rob Landley rob at landley.net
Fri Nov 22 05:04:53 PST 2019


On 11/22/19 6:56 AM, Rob Landley wrote:
> On 11/21/19 4:13 PM, enh via Toybox wrote:
>> Includes new tests.
>> ---
>>  lib/portability.h     |   3 ++
> 
> Applied, by why add this #include to portability.h when it's not in an #ifdef?
> The main #includes are in toys.h.

Also, would someone please explain why posix-2008 has "getopts" with an s:

https://pubs.opengroup.org/onlinepubs/9699919799.2008edition/utilities/getopts.html

But the bash builtin and util-linux command are both "getopt" without an s? (And
gratuitously stomping man 3 getopt with man 1 getopt?)

I notice this new implementation doesn't link to posix as its spec in the header
block, I'm guessing they're different commands?

Rob



More information about the Toybox mailing list