diff options
author | ache <ache@FreeBSD.org> | 2004-03-01 10:03:34 +0000 |
---|---|---|
committer | ache <ache@FreeBSD.org> | 2004-03-01 10:03:34 +0000 |
commit | ce580280f402f881c6277a6eec42effcdd1d40db (patch) | |
tree | ad75066cba24f34bba63b801559fd94e34c5b3ca /lib/libc/stdlib | |
parent | 15469f77d238e7b63ee6d19a2f7b8fe12a2d7cca (diff) | |
download | FreeBSD-src-ce580280f402f881c6277a6eec42effcdd1d40db.zip FreeBSD-src-ce580280f402f881c6277a6eec42effcdd1d40db.tar.gz |
Change "-"-started options when POSIX_CORRECTLY is set handling
in favour of GNU instead of NetBSD, because configure's use us and
expect GNU.
Diffstat (limited to 'lib/libc/stdlib')
-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++; |