diff options
author | Andrey A. Chernov <ache@FreeBSD.org> | 2006-09-22 17:01:38 +0000 |
---|---|---|
committer | Andrey A. Chernov <ache@FreeBSD.org> | 2006-09-22 17:01:38 +0000 |
commit | f27c7b4713a2861fc9cf73df609f6fae80664855 (patch) | |
tree | 50806f3e27ef367be4d836c3cd44cc31f8ee1793 /lib/libc/stdlib/getopt_long.c | |
parent | 4a75dc25851fdd62c3e3779523672b1dcf01da20 (diff) |
Notes
Diffstat (limited to 'lib/libc/stdlib/getopt_long.c')
-rw-r--r-- | lib/libc/stdlib/getopt_long.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c index 47eab1ffbc75..6073444cec83 100644 --- a/lib/libc/stdlib/getopt_long.c +++ b/lib/libc/stdlib/getopt_long.c @@ -558,7 +558,6 @@ start: optarg = NULL; if (*place) /* no white space */ optarg = place; - /* XXX: disable test for :: if PC? (GNU doesn't) */ else if (oli[1] != ':') { /* arg not optional */ if (++optind >= nargc) { /* no arg */ place = EMSG; @@ -568,7 +567,10 @@ start: return (BADARG); } else optarg = nargv[optind]; - } else if (!(flags & FLAG_PERMUTE)) { + } +#ifndef GNU_COMPATIBLE + /* XXX: disable test for :: if PC? (GNU doesn't) */ + else if (!(flags & FLAG_PERMUTE)) { /* * If permutation is disabled, we can accept an * optional arg separated by whitespace so long @@ -577,6 +579,7 @@ start: if (optind + 1 < nargc && *nargv[optind + 1] != '-') optarg = nargv[++optind]; } +#endif place = EMSG; ++optind; } |