From b8b17701ae1d1bdb795c262d1ca780b389efadbf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 6 Sep 2000 17:57:53 +0000 Subject: [PATCH] (_getopt_internal): Don't recognize an option name as ambiguous if it's a prefix for more than one name but the other struct option values are identical. --- posix/getopt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/posix/getopt.c b/posix/getopt.c index f1add57292..2ad4ee961c 100644 --- a/posix/getopt.c +++ b/posix/getopt.c @@ -673,7 +673,9 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only) pfound = p; indfound = option_index; } - else + else if (pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) /* Second or later nonexact match found. */ ambig = 1; }