tech-userlevel archive

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

Re: change signature of shquotev(3) ?



In article <20170817235539.GA28917%britannica.bec.de@localhost>,
Joerg Sonnenberger  <joerg%bec.de@localhost> wrote:
>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 is right (and I am wrong)... We have this everywhere else (execve etc).

christos



Home | Main Index | Thread Index | Old Index