Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Sep 1996 22:01:16 -0600
From:      Warner Losh <imp@village.org>
To:        Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
Cc:        hackers@freebsd.org
Subject:   Re: Quick question about getopt 
Message-ID:  <199609290401.WAA01076@rover.village.org>
In-Reply-To: Your message of "Sat, 28 Sep 1996 21:09:08 EDT." <199609290109.VAA00302@lakes.water.net> 
References:  <199609290109.VAA00302@lakes.water.net>  

next in thread | previous in thread | raw e-mail | index | archive | help

In message <199609290109.VAA00302@lakes.water.net> Thomas David Rivers writes:
: > 
: > NetBSD's getopt returns -1, while FreeBSD documents it as returning
: > EOF.  NetBSD's appears to be the same as 4.4 lite 2.  I was curious as
: > to why the difference between the two existed.  The CVS tree is
: > unenlightening when I asked it for a revision history.
: 
:  Hmmm.... I don't mean to point out what may be the obvious, but isn't
:  EOF == -1?

Yes.  However, the NetBSD doc specifically says that getopt returns -1
and the FreeBSD doc says EOF.  While they are both the same in this
implementaiton, pedantically, FreeBSD should use -1.  This change
won't break anything, since EOF does == -1 (assuming that other lite2
deltas don't impact this).

Warner



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