Subject: Re: iconv(3) prototype
To: T.SHIOZAKI <tshiozak@NetBSD.org>
From: Andrew Brown <firstname.lastname@example.org>
Date: 07/28/2004 09:41:16
On Wed, Jul 28, 2004 at 03:54:38PM +0900, T.SHIOZAKI wrote:
>From: email@example.com (Christos Zoulas)
>Subject: Re: iconv(3) prototype
>Date: Tue, 27 Jul 2004 23:31:41 -0400
>> On Jul 27, 10:17pm, firstname.lastname@example.org (Andrew Brown) wrote:
>> -- Subject: Re: iconv(3) prototype
>> | other than the periodic pain inflicted on the callee by const
>> | (grr...strtol(3)), what kind of program would have trouble with our
>> | iconv() but not the x/open one?
>> You cannot write portable code that does not produce warnings.
>The point of this problem is that the 2nd argument of iconv()
>is "a pointer of a pointer". "char *" can be converted to
>"const char *" explicitly, but "char **" cannot be converted to
>"const char **" without warning.
ah, i see. i was reading the "const char **restrict" as if it were
"char *const*restrict". now i remember why i don't like thinking
about this stuff. bleah.
>If the code is written so as not to get warnings with our iconv(),
>it will get warnings with X/Open iconv(). v.v.
yes, i see.
|-----< "CODE WARRIOR" >-----|
email@example.com * "ah! i see you have the internet
firstname.lastname@example.org (Andrew Brown) that goes *ping*!"
email@example.com * "information is power -- share the wealth."