Date: Sat, 28 Sep 1996 14:34:11 -0700 From: Jason Thorpe <thorpej@nas.nasa.gov> To: Warner Losh <imp@freefall.freebsd.org> Cc: CVS-committers@freefall.freebsd.org, cvs-all@freefall.freebsd.org, cvs-bin@freefall.freebsd.org Subject: Re: cvs commit: src/bin/cat cat.c Message-ID: <199609282134.OAA19028@lestat.nas.nasa.gov>
next in thread | raw e-mail | index | archive | help
On Sat, 28 Sep 1996 14:19:35 -0700 (PDT)
Warner Losh <imp@freefall.freebsd.org> wrote:
> Merge in the NetBSD changes to cat.c. These appear to have come from
> the 4.4 lite 2 tape as well. There are now only two diffs between
> NetBSD's cat and FreeBSD's cat:
> getopt return value is -1 on NetBSD and EOF on FreeBSD.
>From NetBSD's getopt(3):
The getopt() function returns -1 when the argument list is exhausted, or
a non-recognized option is encountered. The interpretation of options in
the argument list may be cancelled by the option `--' (double dash) which
causes getopt() to signal the end of argument processing and returns -1.
When all options have been processed (i.e., up to the first non-option
argument), getopt() returns -1.
[ . . . ]
The getopt() function was once specified to return EOF instead of -1.
This was changed by IEEE Std1003.2-1992 (``POSIX.2'') to decouple
getopt() from <stdio.h>.
FreeBSD should probably fix their getopt(3).
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609282134.OAA19028>
