winduni.c use #ifdef HAVE_ICONV_H instead of HAVE_ICONV and doesn't use ICONV_CONST at all. It turns up that iconv is never used and the default (dummy) code is used instead. Some variables are not initialized before being given to iconv_onechar ending up in a compilation error. This patch fix those problems.
Created attachment 3912 [details] patch for winduni.c
Subject: Bug 10109 CVSROOT: /cvs/src Module name: src Changes by: nickc@sourceware.org 2009-05-05 09:36:08 Modified files: binutils : ChangeLog winduni.c Log message: PR 10109 * winduni.c: Replace test of HAVE_ICONV_H with a test of HAVE_ICONV. (iconv_onechar): Use ICONV_CONST instead of "const". (wind_MultiByteToWideChar): Initialise local strings. Patches: http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/binutils/ChangeLog.diff?cvsroot=src&r1=1.1462&r2=1.1463 http://sources.redhat.com/cgi-bin/cvsweb.cgi/src/binutils/winduni.c.diff?cvsroot=src&r1=1.10&r2=1.11
Hi Guillaume, Thanks very much for finding this bug and supplying a patch to fix it. I have applied your patch along with this changelog entry. Cheers Nick binutils/ChangeLog 2009-05-05 Guillaume Duhamel <guillaume.duhamel@gmail.com> PR 10109 * winduni.c: Replace test of HAVE_ICONV_H with a test of HAVE_ICONV. (iconv_onechar): Use ICONV_CONST instead of "const". (wind_MultiByteToWideChar): Initialise local strings.
*** Bug 10714 has been marked as a duplicate of this bug. ***