getopt_long_only
parse long command-line options
- Provided by: manpages-dev (Version: 6.18-1)
- Source: manpages
- Report a bug
parse long command-line options
Standard C library (libc, -lc)
#define _GNU_SOURCE #include <getopt.h>
int getopt_long_only(int argc, char *argv[],
const char *optstring,
const struct option *longopts, int *longindex);
getopt_long_only() is like getopt_long(3), but '-' as well as "--" can indicate a long option. If an option that starts with '-' (not "--") doesn't match a long option, but does match a short option, it is parsed as a short option instead.
For an explanation of the terms used in this section, see attributes(7).
| Interface | Attribute | Value |
| getopt_long_only () | Thread safety | MT-Unsafe race:getopt env |
GNU.