summaryrefslogtreecommitdiff
path: root/lib/getopt.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-09-10 07:31:44 +0000
committerJim Meyering <jim@meyering.net>2000-09-10 07:31:44 +0000
commit834c4dbfe1b1345d421758ee6427699e1324f673 (patch)
tree7f4e9f0d28872bcf40b3bca86e25758564c28404 /lib/getopt.c
parent3d7a79559294970b6559998db95ac327f8a33918 (diff)
downloadcoreutils-834c4dbfe1b1345d421758ee6427699e1324f673.tar.xz
(_getopt_internal): Update from glibc.
Diffstat (limited to 'lib/getopt.c')
-rw-r--r--lib/getopt.c3
1 files changed, 2 insertions, 1 deletions
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. */