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

Julien Fischer jfischer at opturion.com
Mon Jun 10 02:08:09 AEST 2019


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?

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

> 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.

The change is fine otherwise.

Julien.


More information about the reviews mailing list