On 02/15/2017 07:45 AM, Crazy good wrote: > ----the struct option i don't find any file define > please tell me where is option struct define
man getopt_long
mentions:
longopts is a pointer to the first element of an array of struct
option
declared in <getopt.h> as
struct option {
const char *name;
int has_arg;
int *flag;
int val;
};
You don't find it in the coreutils sources, because it is defined by
glibc in the system headers (or in gnulib code imported on non-glibc
platforms that lack getopt_long()).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
