diff options
author | Eric Blake <eblake@redhat.com> | 2011-07-07 10:24:20 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2011-07-07 10:58:40 -0600 |
commit | 366d08c003506c7ed3c040289f191e1f5b3eb4af (patch) | |
tree | 5ecebfe772ae314c654461523149300c1b83af34 /doc/glibc-functions/getopt_long.texi | |
parent | c4bf665bae3880a9a8974d64c1fad9fe2c80079f (diff) | |
download | gnulib-366d08c003506c7ed3c040289f191e1f5b3eb4af.tar.gz |
getopt-gnu: avoid crash in glibc getopt
Use of "W;" in an option string may be rare, but we might as well
avoid crashing on it.
* m4/getopt.m4 (gl_GETOPT_CHECK_HEADRS): Detect the problem.
* tests/test-getopt.h (test_getopt): Enhance test.
* tests/test-getopt_long.h (test_getopt_long): Likewise.
* doc/posix-functions/getopt.texi (getopt): Document it.
* 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>
Diffstat (limited to 'doc/glibc-functions/getopt_long.texi')
-rw-r--r-- | doc/glibc-functions/getopt_long.texi | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/doc/glibc-functions/getopt_long.texi b/doc/glibc-functions/getopt_long.texi index f4d3561c03..c5e86fe926 100644 --- a/doc/glibc-functions/getopt_long.texi +++ b/doc/glibc-functions/getopt_long.texi @@ -37,6 +37,10 @@ MacOS X 10.5, OpenBSD 4.0, AIX 5.2, IRIX 6.5, Solaris 11 2010-11, Cygwin 1.5.x. @item This function is missing on some platforms: AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Interix 3.5. +@item +This function crashes if the option string includes @code{W;} but +there are no long options, on some platforms: +glibc 2.14. @end itemize Portability problems not fixed by Gnulib: |