aboutsummaryrefslogtreecommitdiffstats
path: root/man3/getopt.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/getopt.3')
-rw-r--r--man3/getopt.360
1 files changed, 30 insertions, 30 deletions
diff --git a/man3/getopt.3 b/man3/getopt.3
index 657de8da18..03b35ca1f8 100644
--- a/man3/getopt.3
+++ b/man3/getopt.3
@@ -293,6 +293,36 @@ wildcard expansion and so should not be considered as options.
This behaviour was removed in
.B bash
version 2.01, but the support remains in GNU libc.
+.SH "CONFORMING TO"
+.TP
+.BR getopt ():
+POSIX.2 and POSIX.1-2001,
+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> .
+POSIX.1-2001 marked the use of
+.I <stdio.h>
+for this purpose as LEGACY.
+POSIX.1-2001 does not allow the declaration to appear in
+.IR <stdio.h> .
+.SH BUGS
+The POSIX.2 specification of
+.BR getopt ()
+has a technical error described in POSIX.2 Interpretation 150.
+The GNU
+implementation (and probably all other implementations) implements the
+correct behaviour rather than that specified.
.SH EXAMPLE
The following trivial example program uses
.BR getopt ()
@@ -431,36 +461,6 @@ main(int argc, char **argv)
exit(EXIT_SUCCESS);
}
.fi
-.SH BUGS
-The POSIX.2 specification of
-.BR getopt ()
-has a technical error described in POSIX.2 Interpretation 150.
-The GNU
-implementation (and probably all other implementations) implements the
-correct behaviour rather than that specified.
-.SH "CONFORMING TO"
-.TP
-.BR getopt ():
-POSIX.2 and POSIX.1-2001,
-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> .
-POSIX.1-2001 marked the use of
-.I <stdio.h>
-for this purpose as LEGACY.
-POSIX.1-2001 does not allow the declaration to appear in
-.IR <stdio.h> .
.SH "SEE ALSO"
.BR getsubopt (3),
.BR feature_test_macros (7)