svn commit: r281550 - in head: . bin/csh contrib/smbfs/include/netsmb contrib/smbfs/lib/smb include lib/libarchive lib/libc/iconv lib/libc/locale lib/libiconv_modules/BIG5 lib/libiconv_modules/DECH...

Peter Wemm peter at wemm.org
Wed Apr 15 18:52:30 UTC 2015


On Wednesday, April 15, 2015 11:29:19 AM Adrian Chadd wrote:
> cc1: warnings being treated as errors
> /usr/home/adrian/work/freebsd/embedded/head/src/bin/csh/../../contrib/tcsh/s
> h.func.c: In function 'iconv_catgets':
> /usr/home/adrian/work/freebsd/embedded/head/src/bin/csh/../../contrib/tcsh/s
> h.func.c:2599: warning: passing argument 2 of 'dl_iconv' from incompatible
> pointer type
> 
> -adrian
> 
> On 15 April 2015 at 02:09, Tijl Coosemans <tijl at freebsd.org> wrote:
> > Author: tijl
> > Date: Wed Apr 15 09:09:20 2015
> > New Revision: 281550
> > URL: https://svnweb.freebsd.org/changeset/base/281550
> > 
> > Log:
> >   Remove the const qualifier from iconv(3) to comply with POSIX:
> >   http://pubs.opengroup.org/onlinepubs/9699919799/functions/iconv.html
> >   
> >   Adjust all code that calls iconv.

[Massive commit diff quote trimmed]

This is one of those unfortunate things.  A mistake was made during the 
standards process that wasn't caught untill too late.  It was corrected, but 
not until the damage was done.  The short version is that in the posix spec, 
the man page had the wrong type (and made no sense), but the actual code 
definition in the include file spec was correct.

So, a bunch of OS's used the text description as the source of truth.  
Ports/libiconv is one.

Others requested a formal clarification and the posix committee specifically 
said the include file spec (which makes sense) is the correct one and updated 
the man page to match the include file.  Linux glibc uses the correct form.

When I originally pulled the trigger I used the incorrect ports/libiconv form 
because I didn't know any better and regretted it since.

I'm glad the mistake has been fixed.  However, this is a gift that keeps on 
giving.  There will be loose ends like the warning above turning up in odd 
places for some time.  We'll just have to deal with it, a bit of whackamole 
will be required.  :(

-- 
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV
UTF-8: for when a ' or ... just won\342\200\231t do\342\200\246
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20150415/d240a445/attachment.sig>


More information about the svn-src-all mailing list