summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/getopt_long.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2004-03-01 10:03:34 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2004-03-01 10:03:34 +0000
commitee43cb7a22d6a8d901ea7b69e7d33015b20a3fbd (patch)
treead75066cba24f34bba63b801559fd94e34c5b3ca /lib/libc/stdlib/getopt_long.c
parent0416b7503d93cef4a5c90837fc16c8b598e7472d (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/getopt_long.c')
-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 54427ef654a6..92cffab9ba3a 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++;