Noted historical use of <stdio.h> to declare getopt().

This commit is contained in:
Michael Kerrisk 2006-01-12 19:46:24 +00:00
parent afcaf646af
commit 47a1e7e424
1 changed files with 14 additions and 0 deletions

View File

@ -341,3 +341,17 @@ POSIX.2, provided the environment variable POSIXLY_CORRECT is set.
Otherwise, the elements of \fIargv\fP aren't really const, because we
permute them. We pretend they're const in the prototype to be
compatible with other systems.
.sp
On some older implementations,
.BR getopt ()
was declared in
.IR <stdio.h> .
SUSv1 permitted the declaration to appear in either
.I <unistd.h>
or
.IR <stdio.h> .
SUSv3 marked the use if
.I <stdio.h>
for this purpose as LEGACY.
SUSv3 (POSIX.1-2001) does not allow the declaration to appear in
.IR <stdio.h> .