Simplify musl's getopt, including removing optind, optopt, opterr, idx, and longonly

This commit is contained in:
Rangi
2025-10-23 13:13:18 -04:00
parent efb5a88edb
commit 8bedd710d7
3 changed files with 131 additions and 174 deletions

View File

@@ -12,7 +12,7 @@ static constexpr int optional_argument = 2;
// clang-format on
extern char *musl_optarg;
extern int musl_optind, musl_opterr, musl_optopt, musl_optreset;
extern int musl_optind, musl_optopt;
struct option {
char const *name;
@@ -21,8 +21,6 @@ struct option {
int val;
};
int musl_getopt_long_only(
int argc, char **argv, char const *optstring, option const *longopts, int *idx
);
int musl_getopt_long_only(int argc, char **argv, char const *optstring, option const *longopts);
#endif // RGBDS_EXTERN_GETOPT_HPP