Hi,

Micah Cowan wrote:
> How best do I determine in my code whether I'm using gnulib's
> getopt_long, or the system library (potentially glibc)'s? That is, I
> want to know whether I ought to be passing in a char ** or a
> char*const*, whilst avoiding warnings and the like.

I would pass a 'char **': an implicit cast from 'char **' to 'char *const*'
does not cause a warning.

If you want to use 'char *const*', then not only you need a cast, but also
I would put a comment before the getopt_long invocation saying that the use
of 'const' here is justified only because the OPTS start with a '+' flag.

Bruno



Reply via email to