aboutsummaryrefslogtreecommitdiff
path: root/posix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-09-06 17:57:53 +0000
committerUlrich Drepper <drepper@redhat.com>2000-09-06 17:57:53 +0000
commitb8b17701ae1d1bdb795c262d1ca780b389efadbf (patch)
tree4209cc3e0d8cd20ef89ade27fec95ab0a21b4d27 /posix
parentccd77b890b22a263476c7476bb60555829ee05bf (diff)
downloadglibc-b8b17701ae1d1bdb795c262d1ca780b389efadbf.zip
glibc-b8b17701ae1d1bdb795c262d1ca780b389efadbf.tar.gz
glibc-b8b17701ae1d1bdb795c262d1ca780b389efadbf.tar.bz2
(_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.
Diffstat (limited to 'posix')
-rw-r--r--posix/getopt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/posix/getopt.c b/posix/getopt.c
index f1add57..2ad4ee9 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;
}