提交 0217ed72 编写于 作者: R Rich Felker

set optopt in getopt_long

this is undocumented but possibly expected behavior of GNU
getopt_long, and useful when error message printing has been
suppressed.
上级 91184c4f
......@@ -76,6 +76,7 @@ static int __getopt_long_core(int argc, char *const *argv, const char *optstring
if (cnt==1) {
i = match;
optind++;
optopt = longopts[i].val;
if (*opt == '=') {
if (!longopts[i].has_arg) {
if (optstring[0] == ':' || !opterr)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册