summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>2004-03-01 10:03:34 +0000
committerache <ache@FreeBSD.org>2004-03-01 10:03:34 +0000
commitce580280f402f881c6277a6eec42effcdd1d40db (patch)
treead75066cba24f34bba63b801559fd94e34c5b3ca /lib/libc/stdlib
parent15469f77d238e7b63ee6d19a2f7b8fe12a2d7cca (diff)
downloadFreeBSD-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.c6
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++;
OpenPOWER on IntegriCloud