Bug 10109 - Bugs in winduni.c break windres for code page 65001
Summary: Bugs in winduni.c break windres for code page 65001
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
: 10714 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-27 22:32 UTC by Guillaume Duhamel
Modified: 2010-01-12 03:24 UTC (History)
2 users (show)

See Also:
Host: i686-pc-linux-gnu
Target: i586-mingw32msvc
Build: i686-pc-linux-gnu
Last reconfirmed:


Attachments
patch for winduni.c (829 bytes, patch)
2009-04-27 22:33 UTC, Guillaume Duhamel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Guillaume Duhamel 2009-04-27 22:32:17 UTC
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.
Comment 1 Guillaume Duhamel 2009-04-27 22:33:11 UTC
Created attachment 3912 [details]
patch for winduni.c
Comment 2 Sourceware Commits 2009-05-05 09:36:21 UTC
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

Comment 3 Nick Clifton 2009-05-05 09:37:04 UTC
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.
Comment 4 Alan Modra 2010-01-12 03:24:12 UTC
*** Bug 10714 has been marked as a duplicate of this bug. ***