Subject: Re: the recent changes to stdlib.h/unistd.h
To: matthew green <firstname.lastname@example.org>
From: Jason Thorpe <email@example.com>
Date: 02/03/1998 10:39:10
On Tue, 03 Feb 1998 21:46:14 +1100
matthew green <firstname.lastname@example.org> wrote:
> i believe that these changes will break a lot of third party software. perry
> had to fix a fair amount of our programs, and at least one of these was *not*
> `just prototypes'. the definitions of optind and optarg are no longer in
> <stdlib.h> ...
> do we care? i think we should...
The getopt(3) related things are _supposed_ to be in <unistd.h>, and that
is where they have been documented for quite some time. Having the
declarations in two places (<stdlib.h> and <unistd.h>) is completely
If 3rd party software has any hope of running on e.g. Solaris or other
standards-conforming systems, they're going to be pulling in the correct
A fair number of 3rd party programs also manually do: "extern int optind;",
the same way some programs do "extern int errno;", so it's not really an
issue for them.
My take: the documentation has said the Right Thing for some time. We've
greatly exceeded the "one release" leeway for interface deprecation on
some of these.
Jason R. Thorpe email@example.com
NASA Ames Research Center Home: +1 408 866 1912
NAS: M/S 258-5 Work: +1 650 604 0935
Moffett Field, CA 94035 Pager: +1 415 428 6939