Subject: Re: iconv(3) prototype
To: None <tech-userlevel@NetBSD.org>
From: James K. Lowden <jklowden@schemamania.org>
List: tech-userlevel
Date: 07/27/2004 01:34:14
On Mon, 26 Jul 2004, christos@zoulas.com (Christos Zoulas) wrote:
> 
> We have:
> 
> size_t
> iconv(iconv_t, const char **restrict, size_t *restrict,
>     char **restrict, size_t *restrict);
> 
> X/Open wants:
> 
> size_t
> iconv(iconv_t, char **restrict, size_t *restrict,
>     char **restrict, size_t *restrict);
> 
> What gives?

Not to start anything, but fwiw GNU defines theirs as const, too.  And
it's "right" insofar as iconv never writes to its input buffer.  Many
applications will want to pass constant buffers to it, and will have to
cast them if NetBSD adheres strictly to the X/Open version.  

iconv is pretty new.  Do we have to stick with the broken-by-design
traditions?  

--jkl