getopt_long_only
----------------

LSB specification:
 https://refspecs.linuxbase.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/baselib-getopt-long-only-3.html

Documentation:

  * Parsing Long Options with getopt_long (libc),

  * man getopt_long_only.

Gnulib module: getopt-gnu

Portability problems fixed by Gnulib:

  * The function getopt_long_only does not obey the combination of + and : flags in the options string on some platforms: glibc 2.11.

  * The use of W; in the optstring argument to does not always allow -W foo to behave synonymously with --foo: glibc 2.11.

  * The function getopt_long_only does not support the + flag in the options string on some platforms: macOS 11.1, AIX 5.2, Solaris 10.

  * The value of optind after a missing required argument is wrong on some platforms: macOS 11.1.

  * The function getopt_long_only does not obey the - flag in the options string when POSIXLY_CORRECT is set on some platforms: Cygwin 1.7.0.

  * Some implementations fail to reset state, including re-checking POSIXLY_CORRECT, when optind is set to 0: NetBSD, Cygwin 1.7.0.

  * The function getopt_long_only does not support options with optional arguments on some platforms: macOS 11.1, OpenBSD 4.0, AIX 5.2, Solaris 11 2010-11, Cygwin 1.5.x.

  * This function is missing on some platforms: FreeBSD 5.2.1, NetBSD 9.0, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, mingw, MSVC 14.

  * This function crashes if the option string includes W; but there are no long options, on some platforms: glibc 2.14.

Portability problems not fixed by Gnulib:

  * Some implementations return success instead of reporting an ambiguity if user's option is a prefix of two long options with the same outcome: FreeBSD.

  * The GNU Coding Standards discourage the use of getopt_long_only in new programs.