The iconv() declaration is documented to be
size_t iconv (iconv_t cd,
const char* * inbuf, size_t * inbytesleft,
char* * outbuf, size_t * outbytesleft);
but if you paste that declaration into a sourcefile that also includes
iconv.h and compile it you get:
iconv_decl.c:4: conflicting types for `iconv'
/usr/include/iconv.h:44: previous declaration of `iconv'
If you change your iconv() declaration removing const from 'const char
**inbuf' the snippet compiles ok. The documentation seems to be conformant
to UNIX98 (http://www.opengroup.org/onlinepubs/007908799/xsh/iconv.html)
so I think it is /usr/include/iconv.h that is in error here.
The iconv prototype is defined in 2 places in Unix98,
but these two prototypes are inconsistent.
This has been changed later on in the Austin group drafts, see e.g.