From owner-freebsd-hackers Sun Sep 29 15:05:14 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id PAA26616 for hackers-outgoing; Sun, 29 Sep 1996 15:05:14 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id PAA25868 for ; Sun, 29 Sep 1996 15:03:51 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id PAA04664; Sun, 29 Sep 1996 15:01:20 -0700 From: Terry Lambert Message-Id: <199609292201.PAA04664@phaeton.artisoft.com> Subject: Re: Quick question about getopt To: joerg_wunsch@uriah.heep.sax.de Date: Sun, 29 Sep 1996 15:01:20 -0700 (MST) Cc: freebsd-hackers@freebsd.org, imp@village.org In-Reply-To: <199609290432.GAA05625@uriah.heep.sax.de> from "J Wunsch" at Sep 29, 96 06:32:55 am X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > >Given the standards reference, should FreeBSD[*] change getopt to return > > >-1 rather than EOF? I'm inclidned to say yes. However, there are > > >likely reasons for not doing this. > > > > None. EOF is identical with (-1) on all supported systems, and there > > are no complications from EOF being defined in the wrong places. > > Except that all tools that compare the result against EOF should also > be changed to compare it against -1 then. In theory, it's even > possible that some of the tools don't require no longer then > (since this was also the rationale behind the Posix change). According to the POSIX quotation, these tools are no longer compliant, and should look for -1 instead. Fix the bogus tools, not the POSIX mandated interface. Hmmmm... I remember makingthe same argument about setlocale() in crt0.o... Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.