Date: Sun, 29 Sep 1996 15:01:20 -0700 (MST) From: Terry Lambert <terry@lambert.org> To: joerg_wunsch@uriah.heep.sax.de Cc: freebsd-hackers@freebsd.org, imp@village.org Subject: Re: Quick question about getopt Message-ID: <199609292201.PAA04664@phaeton.artisoft.com> In-Reply-To: <199609290432.GAA05625@uriah.heep.sax.de> from "J Wunsch" at Sep 29, 96 06:32:55 am
next in thread | previous in thread | raw e-mail | index | archive | help
> > >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). 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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609292201.PAA04664>