3cf17f02523256ad1064ed8c7b482aa0d27350be
[gnulib.git] / doc / glibc-functions / getopt_long.texi
1 @node getopt_long
2 @subsection @code{getopt_long}
3 @findex getopt_long
4
5 Gnulib module: getopt-gnu
6
7 Portability problems fixed by Gnulib:
8 @itemize
9 @item
10 The function @code{getopt_long} does not support the @samp{+} flag in
11 the options string on some platforms:
12 MacOS X 10.5, AIX 5.2, OSF/1 5.1, Solaris 10.
13 @item
14 The value of @code{optind} after a missing required argument is wrong
15 on some platforms:
16 MacOS 10.5.
17 @item
18 The function @code{getopt_long} does not obey the @samp{-} flag in the
19 options string when @env{POSIXLY_CORRECT} is set on some platforms:
20 Cygwin 1.7.0.
21 @item
22 Some implementations fail to reset state, including re-checking
23 @env{POSIXLY_CORRECT}, when @code{optind} is set to @samp{0}:
24 NetBSD, Cygwin 1.7.0.
25 @item
26 The function @code{getopt_long} does not support options with optional
27 arguments on some platforms:
28 MacOS X 10.5, OpenBSD 4.0, AIX 5.2, IRIX 6.5, Solaris 10, Cygwin 1.5.x.
29 @item
30 This function is missing on some platforms:
31 AIX 5.1, HP-UX 11, IRIX 6.5, OSF/1 5.1, Interix 3.5.
32 @end itemize
33
34 Portability problems not fixed by Gnulib:
35 @itemize
36 @item
37 The glibc extension of using @samp{W;} in the optstring argument to
38 allow @code{-W foo} to behave synonymously with @code{--foo} is not
39 very reliable, even in glibc.
40 @item
41 Mixing a leading @samp{-} or @samp{+} with a leading @samp{:} in the
42 optstring argument has inconsistent effects across platforms.
43 @end itemize