From 6ec2ddd5365a32afb66baf4b7ad600fb23ae7ddf Mon Sep 17 00:00:00 2001 From: ache Date: Wed, 3 Mar 2004 08:29:00 +0000 Subject: Make return code in noarg case GNU-compatible --- lib/libc/stdlib/getopt_long.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/libc/stdlib/getopt_long.c') diff --git a/lib/libc/stdlib/getopt_long.c b/lib/libc/stdlib/getopt_long.c index eef627a..74f8aa0 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) { -- cgit v1.1