[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] pcictl: simplify its usage
On Thu, 04 Jun 2009, Christoph Egger wrote:
> (Resend, this time with the correct subject. I'm not subscribed
> on tech-userlevel, so I c&p the mail from the archive.)
It's rude to post to a list to which you are not subscribed. I have
bcc'd you this time.
> argv is passed through to getopt(). getopt() expects argv
> as char * const  or implicitely converts argv into this.
The second arg of main() is required to be of type (char * *) or
equivalently (char * ), without any const; see section 18.104.22.168.1 of
the C99 standard. You should be able to pass this non-const arg to
getopt() without any trouble. What problems did you encounter that made
you want to add a const qualifier?
--apb (Alan Barrett)
Main Index |
Thread Index |