X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fgetopt.c;h=a5bc2c95e65940b941d2178ccc2afbdca6d026a2;hb=023946e6df1ce4ce382f2385306427413fe46085;hp=c7ddad0fe81111dd7ed3f0ec0947a83f35204902;hpb=0e167051bb305bc05bcc068ee267e327b9d37610;p=gnulib.git diff --git a/lib/getopt.c b/lib/getopt.c index c7ddad0fe..a5bc2c95e 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -671,7 +671,8 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) pfound = p; indfound = option_index; } - else if (pfound->has_arg != p->has_arg + else if (long_only + || pfound->has_arg != p->has_arg || pfound->flag != p->flag || pfound->val != p->val) /* Second or later nonexact match found. */