Change "-"-started options when POSIX_CORRECTLY is set handling

in favour of GNU instead of NetBSD, because configure's use us and
expect GNU.
This commit is contained in:
Andrey A. Chernov 2004-03-01 10:03:34 +00:00
parent 0416b7503d
commit ee43cb7a22

View File

@ -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++;