summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib/getopt_long.c
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>2004-03-03 08:29:00 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>2004-03-03 08:29:00 +0000
commit884853990228f21399dab271192fa6f2724278a2 (patch)
treeac90c73bbc190ea57a58c6eaa49e80ae49cbde59 /lib/libc/stdlib/getopt_long.c
parentd92dc3946d10b4030fced092f4e92c15cd0b1b28 (diff)
Notes
Diffstat (limited to 'lib/libc/stdlib/getopt_long.c')
-rw-r--r--lib/libc/stdlib/getopt_long.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c
index eef627a6a432..74f8aa0630f1 100644
--- a/lib/libc/stdlib/getopt_long.c
+++ b/lib/libc/stdlib/getopt_long.c
@@ -284,7 +284,11 @@ parse_long_options(char * const *nargv, const char *options,
optopt = long_options[match].val;
else
optopt = 0;
+#ifdef GNU_COMPATIBLE
+ return (BADCH);
+#else
return (BADARG);
+#endif
}
if (long_options[match].has_arg == required_argument ||
long_options[match].has_arg == optional_argument) {