Date: Tue, 20 Nov 2001 10:12:55 +0100 (MET) From: "Wilhelm B. Kloke" <wb@vestein.arb-phys.uni-dortmund.de> To: FreeBSD-gnats-submit@freebsd.org Subject: bin/32126: getopt(3) not Unix-98 conformant Message-ID: <200111200912.fAK9CtJ03633@yorikke.arb-phys.uni-dortmund.de>
next in thread | raw e-mail | index | archive | help
>Number: 32126 >Category: bin >Synopsis: getopt(3) not Unix-98 conformant >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Nov 20 01:20:01 PST 2001 >Closed-Date: >Last-Modified: >Originator: Wilhelm B. Kloke >Release: FreeBSD 4.4-RELEASE i386 >Organization: >Environment: System: FreeBSD yorikke 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Tue Oct 16 13:37:09 MET DST 2001 wb@yorikke:/usr/obj/usr/src-4.4/sys/YORIKKE i386 >Description: I have been hit by a non-conformance to Unix standard (whatever this may mean). FreeBSD uses a global optreset to re-initialize some internal data structure for getopt. This is not conformant to Unix 98 spec (see opengroup.org man page) nor to Linux usage. >How-To-Repeat: >Fix: I propose to silently dropping use of optreset, as the reset condition can normally be signaled via optind. No applications should be affected, anyway. Grep -F -R optreset shows that contrib/nvi crypto/heimdal/lib/roken crypto/kerberosIV/lib are coming with their own getopt.c. Other apps using optreset are bin/chio bin/sh sbin/camcontrol sbin/ipfw sbin/mount sys/boot/ usr.sbin/ancontrol usr.sbin/inetd usr.sbin/mlxcontrol usr.sbin/mptable usr.sbin/raycontrol usr.sbin/wicontrol Camcontrol may have a problem. There is a discussion in the comments. Just let camcontrol have its own getopt.c. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200111200912.fAK9CtJ03633>