Hi everyone, POSIX.1-2008 mandates the function declaration of the iconv() function to look like this: size_t iconv(iconv_t cd, char **restrict inbuf, size_t *restrict inbytesleft, char **restrict outbuf, size_t *restrict outbytesleft); (see http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html ). However, the actual function declared in /usr/include/iconv.h is declared as follows: size_t iconv(iconv_t, const char ** __restrict, size_t * __restrict, char ** __restrict, size_t * __restrict); Notice the `const` qualifier in the declaration of the second parameter, which shouldn’t be there as per POSIX. This causes programs using the iconv() function as per POSIX (without the `const` qualifier) to fail compilation. Even worse, the documentation of iconv() in form of the iconv(3) manpage also contains the POSIX declaration, which is in conflict with the actual declaration in the header file. That is, the documentation is correct, but declaration in the header file differs from the manpage. Output of $ uname -a in case it’s required: $ uname -a FreeBSD bsdtest.quintilianus.eu 10.1-RELEASE FreeBSD 10.1-RELEASE #0 r274401: Tue Nov 11 21:02:49 UTC 2014 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 Greetings, Marvin
I think this got "fixed" in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199099 Is this a duplicate now?
*** This bug has been marked as a duplicate of bug 199099 ***