coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: read the coreutils source code, i don't find one struct define


From: Eric Blake
Subject: Re: read the coreutils source code, i don't find one struct define
Date: Wed, 15 Feb 2017 09:16:08 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]