converters/iconv versioning

Christian Weisgerber naddy at
Sat Mar 14 19:41:20 UTC 2015

On 2015-03-11, Scott Furry <scott.wl.furry at> wrote:

> Okay...different iconv. But what's the reason for change?
> And does this one function call really need to be const? Is the 
> __restrict in the type not used on FreeBSD?
> Seems strange to differ on a gnu-based.

POSIX says:

size_t iconv(iconv_t cd, char **restrict inbuf,
       size_t *restrict inbytesleft, char **restrict outbuf,
       size_t *restrict outbytesleft);

For GNU iconv, whether you have a const in the prototype or not is
configurable.  I think by default it tries to match the prototype
of an existing iconv on the machine.  The FreeBSD port specifically
asks for the const, presumably for consistency with earlier versions.

Christian "naddy" Weisgerber                          naddy at

More information about the freebsd-ports mailing list