tech-userlevel archive

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

Re: change signature of shquotev(3) ?



On Fri, Aug 18, 2017 at 06:46:58AM +0700, Robert Elz wrote:
> Currently, shquotev() is declared as ...
> 
>  size_t shquotev(int argc, char * const *argv, char *buf, size_t bufsize);

This is sadly the canonical way to do it. With C cast rules, you can't
win in this case. While C++ allows casts from char ** -> const char *
const * in some cases, C compilers will bitch about it. __UNCONST is
your friend.

Joerg


Home | Main Index | Thread Index | Old Index