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

enh enh at google.com
Fri Nov 22 08:07:09 PST 2019


On Fri, Nov 22, 2019 at 4:53 AM Rob Landley <rob at landley.net> 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.

i was going to put it in toys.h initially, but it seemed (from the
comments on each block) like toys.h was only meant for _standard_
headers?  <getopt.h> is a non-standard (but common to BSD, glibc,
bionic, macOS) header that defines the non-standard *long* getopt
functions. the POSIX getopt() function is in <unistd.h>.

if you add a "non-standard but everyone has them" block to toys.h i'll
put any similar future cases there :-)

> Rob
> _______________________________________________
> Toybox mailing list
> Toybox at lists.landley.net
> http://lists.landley.net/listinfo.cgi/toybox-landley.net



More information about the Toybox mailing list