getopt-posix: detect MacOS bug
authorEric Blake <eblake@redhat.com>
Tue, 13 Apr 2010 20:30:37 +0000 (14:30 -0600)
committerEric Blake <eblake@redhat.com>
Tue, 13 Apr 2010 22:31:47 +0000 (16:31 -0600)
commit5cc0bcf5e4689e1fb0c23b8368c46fdae0402028
treef3fe48d9d349f12fb379d75d80e8f45a12d2469e
parent3108b956964845104f2d1455af313849afca50ca
getopt-posix: detect MacOS bug

On MacOS 10.5 (Darwin 9.8.0), optind is incremented by 2 instead
of 1 in the case of a missing requirement on condensed options.

* m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Reject MacOS botch of
optind when missing a required argument.
* doc/posix-functions/getopt.texi (getopt): Document the bug.
* doc/glibc-functions/getopt_long.texi (getopt_long): Likewise.
* doc/glibc-functions/getopt_long_only.texi (getopt_long_only):
Likewise.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
doc/glibc-functions/getopt_long.texi
doc/glibc-functions/getopt_long_only.texi
doc/posix-functions/getopt.texi
m4/getopt.m4