[m-rev.] for review: Use musl getopt implementation.

Peter Wang novalazy at gmail.com
Mon Jun 10 11:33:19 AEST 2019


On Mon, 10 Jun 2019 02:08:09 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> 
> Hi Peter,
> 
> On Fri, 7 Jun 2019, Peter Wang wrote:
> 
> > LICENSE:
> >    Mention files derived from musl library.
> >
> > runtime/process_getopt:
> >    Process files from ../getopt/*.[ch] to produce
> >    mercury_getopt.h, mercury_getopt.c, mercury_getopt_long.c.
> 
> A couple of things:
> 
> 1. The original getopt files are (currently) in runtime/GEOTPT not in
> ../getopt; you refer to them being in ../getopt at several points in
> this diff.  Are you intending to change their location?
> 

Yes, I intend to change the location.

> 2. The util directory also has a copy of getopt.h.

According to the comment at the top, some systems have different ideas
about where the `const's should go on the declaration of getopt().
I'm guessing that's irrelevant now so I will delete the file.
If there's any problem, we can fix it easily.

> > diff --git a/tests/debugger/browser_test.exp b/tests/debugger/browser_test.exp
> > index 5521cbaa9..e6b38c554 100644
> > --- a/tests/debugger/browser_test.exp
> > +++ b/tests/debugger/browser_test.exp
> > @@ -77,7 +77,7 @@ big(
> >   3,
> >   big(big(small, 4, big(small, 5, small)), 6, small))
> > mdb> print --xyzzy 1
> > -print: unrecognized option `--xyzzy'
> > +print: unrecognized option: xyzzy
> 
> Quoting the option in the error message, as in the first from, is more
> consistent with the rest of the Mercury system; I think we should modify
> the musl sources to retain that behaviour.

Will do.

Peter


More information about the reviews mailing list