treewide: get rid of remaing getopt/getopt_long stuff

This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2026-05-16 18:37:12 +02:00
parent 39a3647539
commit d512d3c6d3
11 changed files with 6 additions and 666 deletions
+5 -5
View File
@@ -31,7 +31,7 @@ int parse_boolean_argument(const char *optname, const char *s, bool *ret) {
*ret = r;
return r;
} else {
/* s may be NULL. This is controlled by getopt_long() parameters. */
/* s may be NULL. This is controlled by OPTION flags. */
if (ret)
*ret = true;
return true;
@@ -42,10 +42,10 @@ int parse_tristate_argument_with_auto(const char *optname, const char *s, int *r
int r;
assert(optname);
assert(s); /* We refuse NULL optarg here, since that would be ambiguous on cmdline:
for --enable-a[=BOOL], --enable-a is intuitively interpreted as true rather than "auto"
(parse_boolean_argument() does exactly that). IOW, tristate options should require
arguments. */
assert(s); /* We refuse NULL arg here, since that would be ambiguous on cmdline: for
* --enable-a[=BOOL], --enable-a is intuitively interpreted as true rather than "auto"
* (parse_boolean_argument() does exactly that). IOW, tristate options should require
* arguments. */
r = parse_tristate_full(s, "auto", ret);
if (r < 0)