Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Sep 1996 06:32:55 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        freebsd-hackers@freebsd.org (FreeBSD hackers)
Cc:        imp@village.org
Subject:   Re: Quick question about getopt
Message-ID:  <199609290432.GAA05625@uriah.heep.sax.de>
In-Reply-To: <199609290332.NAA14195@godzilla.zeta.org.au> from Bruce Evans at "Sep 29, 96 01:32:16 pm"

next in thread | previous in thread | raw e-mail | index | archive | help
As Bruce Evans wrote:

> >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 <stdio.h> no longer then
(since this was also the rationale behind the Posix change).

So Warner, this is certainly the part of the task that requires more
work than changing a man page. ;-)  Yep, you are allowed to commit to
the entire tree, except that changes like the merge of 4.4-Lite2
should be planned carefully, and discussed with Peter Wemm before.
(Speaking from own bad experience...)

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609290432.GAA05625>