mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-17 12:41:05 +03:00
26 lines
863 B
Plaintext
26 lines
863 B
Plaintext
@node getopt
|
|
@section @code{getopt}
|
|
@findex getopt
|
|
|
|
POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/getopt.html}
|
|
|
|
Gnulib module: ---
|
|
|
|
Portability problems fixed by Gnulib:
|
|
@itemize
|
|
@end itemize
|
|
|
|
Portability problems not fixed by Gnulib:
|
|
@itemize
|
|
@item
|
|
The default behavior of the glibc implementation of @code{getopt} allows
|
|
mixing option and non-option arguments on the command line in any order.
|
|
Other implementations, such as the one in Cygwin, enforce strict POSIX
|
|
compliance: they require that the option arguments precede the non-option
|
|
arguments. This is something to watch out in your program's testsuite.
|
|
@end itemize
|
|
|
|
Gnulib provides a module @code{getopt} that has support for ``long options''.
|
|
Compared to POSIX, it adds a header file @code{<getopt.h>} and functions
|
|
@code{getopt_long} and @code{getopt_long_only}.
|