Documentation about Minix.
[gnulib.git] / doc / glibc-functions / getopt_long_only.texi
1 @node getopt_long_only
2 @subsection @code{getopt_long_only}
3 @findex getopt_long_only
4
5 Gnulib module: getopt-gnu
6
7 Portability problems fixed by Gnulib:
8 @itemize
9 @item
10 The function @code{getopt_long_only} does not obey the combination of
11 @samp{+} and @samp{:} flags in the options string on some platforms:
12 glibc 2.11.
13 @item
14 The use of @samp{W;} in the optstring argument to does not always
15 allow @code{-W foo} to behave synonymously with @code{--foo}:
16 glibc 2.11.
17 @item
18 The function @code{getopt_long_only} does not support the @samp{+}
19 flag in the options string on some platforms:
20 MacOS X 10.5, AIX 5.2, OSF/1 5.1, Solaris 10.
21 @item
22 The value of @code{optind} after a missing required argument is wrong
23 on some platforms:
24 MacOS 10.5.
25 @item
26 The function @code{getopt_long_only} does not obey the @samp{-} flag
27 in the options string when @env{POSIXLY_CORRECT} is set on some platforms:
28 Cygwin 1.7.0.
29 @item
30 Some implementations fail to reset state, including re-checking
31 @env{POSIXLY_CORRECT}, when @code{optind} is set to @samp{0}:
32 NetBSD, Cygwin 1.7.0.
33 @item
34 The function @code{getopt_long_only} does not support options with
35 optional arguments on some platforms:
36 MacOS X 10.5, OpenBSD 4.0, AIX 5.2, Solaris 11 2010-11, Cygwin 1.5.x.
37 @item
38 This function is missing on some platforms:
39 MacOS X 10.3, FreeBSD 5.2.1, NetBSD 5.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5,
40 OSF/1 5.1, mingw, Interix 3.5.
41 @item
42 This function crashes if the option string includes @code{W;} but
43 there are no long options, on some platforms:
44 glibc 2.14.
45 @end itemize
46
47 Portability problems not fixed by Gnulib:
48 @itemize
49 @item
50 Some implementations return success instead of reporting an ambiguity
51 if user's option is a prefix of two long options with the same outcome:
52 FreeBSD.
53 @item
54 The GNU Coding Standards discourage the use of @code{getopt_long_only}
55 in new programs.
56 @end itemize