From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7173 invoked by alias); 4 Mar 2010 15:38:01 -0000 Received: (qmail 7165 invoked by uid 22791); 4 Mar 2010 15:38:00 -0000 X-Spam-Check-By: sourceware.org Received: from aquarius.hirmke.de (HELO calimero.vinschen.de) (217.91.18.234) by sourceware.org (qpsmtpd/0.83/v0.83-20-g38e4449) with ESMTP; Thu, 04 Mar 2010 15:37:56 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 0E8116D4360; Thu, 4 Mar 2010 16:37:53 +0100 (CET) Date: Thu, 04 Mar 2010 15:38:00 -0000 From: Corinna Vinschen To: gdb-patches@sourceware.org Subject: Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds Message-ID: <20100304153752.GA10796@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <20100301173054.GD5683@calimero.vinschen.de> <20100301193126.GA9416@caradoc.them.org> <20100303101601.GH17293@calimero.vinschen.de> <20100304093406.GX17293@calimero.vinschen.de> <20100304152435.GA12362@ednor.casa.cgf.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100304152435.GA12362@ednor.casa.cgf.cx> User-Agent: Mutt/1.5.20 (2009-06-14) 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: 2010-03/txt/msg00181.txt.bz2 On Mar 4 10:24, Christopher Faylor wrote: > On Thu, Mar 04, 2010 at 10:34:06AM +0100, Corinna Vinschen wrote: > >On Mar 3 14:15, Tom Tromey wrote: > >> >>>>> "Corinna" == Corinna Vinschen writes: > >> > >> Corinna> Maybe something along these lines would help (untested!): > >> > >> I'm adding the appended to my local patch. > >> This is just your patch with the new global put closer to the code, and > >> a different preprocessor check. > >> > >> Let me know if this seems wrong somehow. > >> > >> Tom > >> > >> diff --git a/gdb/charset.c b/gdb/charset.c > >> index 21c4306..9c1e7f4 100644 > >> --- a/gdb/charset.c > >> +++ b/gdb/charset.c > >> @@ -930,6 +930,15 @@ _initialize_charset (void) > >> if (!strcmp (auto_host_charset_name, "646") || !*auto_host_charset_name) > >> auto_host_charset_name = "ASCII"; > >> auto_target_charset_name = auto_host_charset_name; > >> +#elif defined (USE_WIN32API) > >> + { > >> + static w32_host_default_charset[16]; /* "CP" + x<=5 digits + paranoia. */ > >> + > >> + snprintf (w32_host_default_charset, sizeof w32_host_default_charset, > >> + "CP%d", GetACP()); > >> + auto_host_charset_name = w32_host_default_charset; > >> + auto_target_charset_name = auto_host_charset_name; > >> + } > >> #endif > >> #endif > > > >Looks good to me. > > I don't know if I get to approve this but if it looks ok to Corinna, it's ok > with me. I'm not too wide character set literate. No worries, it only affects GDB for MingW hosts, and only if it gets build with iconv support. Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat