converters/iconv versioning
Scott Furry
scott.wl.furry at gmail.com
Sat Mar 14 21:03:10 UTC 2015
On 14/03/2015 13:08, Christian Weisgerber wrote:
> On 2015-03-11, Scott Furry <scott.wl.furry at gmail.com> 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,
Ran into a situation with other code where clang would issue a warning
about calling iconv function without const variable.
That's when I discovered the difference with FreeBSD's iconv (sorry,
haven't memorized the handbook or porters handbook ;-) ).
The function declaration you show matches what I've seen on both Mac and
Linux. So iconv being used on FreeBSD differs from posix?
Custom iconv Just seemed odd. Had to ask.
Thanks for filling in a blank.
Scott
More information about the freebsd-ports
mailing list