diff options
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 47eab1f..6073444 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; } |