diff options
Diffstat (limited to 'lib/libc/stdlib/getopt_long.c')
-rw-r--r-- | lib/libc/stdlib/getopt_long.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c index 54427ef..92cffab 100644 --- a/lib/libc/stdlib/getopt_long.c +++ b/lib/libc/stdlib/getopt_long.c @@ -313,7 +313,11 @@ getopt_internal(int nargc, char * const *nargv, const char *options, posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); if (posixly_correct || *options == '+') flags &= ~FLAG_PERMUTE; - else if (*options == '-') + /* + * Code "else if (*options == '-')" was here. + * Try to be more GNU compatible, configure's use us! + */ + if (*options == '-') flags |= FLAG_ALLARGS; if (*options == '+' || *options == '-') options++; |