Subject: lib/12715: getopt(3) claims options are illegal
To: None <gnats-bugs@gnats.netbsd.org>
From: Johan Danielsson <joda@pdc.kth.se>
List: netbsd-bugs
Date: 04/21/2001 18:33:36
>Number:         12715
>Category:       lib
>Synopsis:       getopt(3) claims options are illegal
>Confidential:   no
>Severity:       non-critical
>Priority:       high
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 21 09:34:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Johan Danielsson
>Release:        2001-04-21
>Organization:
>Environment:
	<machine, os, target, libraries (multiple lines)>
System: NetBSD blubb.pdc.kth.se 1.5S NetBSD 1.5S (BLUBB) #300: Thu Mar 15 13:16:13 CET 2001 joda@blubb.pdc.kth.se:/usr/misc/src/netbsd/netbsd-cvs/src/sys/arch/i386/compile/BLUBB i386
Architecture: i386
Machine: i386
>Description:

getopt(3) claims that options that is not in the optstring are
`illegal', and they may be invalid or bad or unknown, but in most
jurisdictions they are not infact illegal.

>How-To-Repeat:

code inspection

>Fix:

Replace `illegal' with another word, I leave it to a native to choose.

--- getopt.c	2001/02/19 22:43:21	1.20
+++ getopt.c	2001/04/21 16:26:51
@@ -106,7 +106,7 @@
 			++optind;
 		if (opterr && *ostr != ':')
 			(void)fprintf(stderr,
-			    "%s: illegal option -- %c\n", getprogname(),
+			    "%s: unknown option -- %c\n", getprogname(),
 			    optopt);
 		return (BADCH);
 	}
>Release-Note:
>Audit-Trail:
>Unformatted: