From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24765 invoked by alias); 1 Feb 2009 18:23:52 -0000 Received: (qmail 24755 invoked by uid 22791); 1 Feb 2009 18:23:51 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 01 Feb 2009 18:23:46 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 0AE76107F4; Sun, 1 Feb 2009 18:23:45 +0000 (GMT) Received: from caradoc.them.org (209.195.188.212.nauticom.net [209.195.188.212]) by nan.false.org (Postfix) with ESMTP id C078310781; Sun, 1 Feb 2009 18:23:44 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1LTgyu-0001wB-Cw; Sun, 01 Feb 2009 13:23:44 -0500 Date: Sun, 01 Feb 2009 18:23:00 -0000 From: Daniel Jacobowitz To: Tom Tromey Cc: Joel Brobecker , Julian Brown , gdb-patches@sourceware.org Subject: Re: [PATCH/WIP] C/C++ wchar_t/Unicode printing support Message-ID: <20090201182344.GD4597@caradoc.them.org> Mail-Followup-To: Tom Tromey , Joel Brobecker , Julian Brown , gdb-patches@sourceware.org References: <20090115202411.5f154657@rex.config> <20090130194343.GA3964@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2008-05-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-02/txt/msg00004.txt.bz2 On Fri, Jan 30, 2009 at 04:41:35PM -0700, Tom Tromey wrote: > Joel> Do you think we could have a configure option that allows us to > Joel> deactivate this feature in order to avoid the dependency? > > I don't think it would be very easy to make this an optional feature, > or to make it fall back to the currently existing code. > > I suppose one option would be to have a degraded mode where we require > that the host charset and the target charset be the same. Then maybe > we could make it work by redefining iswprint and wchar_t. I don't see the connection between the iconv dependency and iswprint / wchar_t. Are there portability issues for those too? They don't come from libiconv. It seems like a dummy version of iconv_open which only succeeds if the two character sets are the same, plus a pass-through version of iconv, would be enough to remove the iconv dependency. That degraded mode covers all local debugging. There'd need to be a little additional logic too, to allow you to set all the charset variables at once; otherwise you'd be stuck since validate would fail when you tried to change any of them. Or just remove the settings in that case. > I don't think it would be very easy to preserve the current > functionality and make the iconv stuff an add-on. The current charset > API is not well suited to variable length encodings. In my opinion, the current non-iconv, non-identity conversions are not a major loss. But if someone was motivated to preserve them, it seems like that wouldn't be hard; add them to the fallback implementation of iconv. -- Daniel Jacobowitz CodeSourcery