From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8339 invoked by alias); 3 Mar 2010 16:46:44 -0000 Received: (qmail 8311 invoked by uid 22791); 3 Mar 2010 16:46:42 -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; Wed, 03 Mar 2010 16:46:35 +0000 Received: by calimero.vinschen.de (Postfix, from userid 500) id 60A316D42F5; Wed, 3 Mar 2010 17:46:33 +0100 (CET) Date: Wed, 03 Mar 2010 16:46: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: <20100303164633.GP17293@calimero.vinschen.de> Reply-To: gdb-patches@sourceware.org Mail-Followup-To: gdb-patches@sourceware.org References: <20100228222702.GC29360@caradoc.them.org> <20100301103125.GB9730@calimero.vinschen.de> <20100301173054.GD5683@calimero.vinschen.de> <20100301193126.GA9416@caradoc.them.org> <20100303101601.GH17293@calimero.vinschen.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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/msg00100.txt.bz2 On Mar 3 09:25, Tom Tromey wrote: > >>>>> "Corinna" == Corinna Vinschen writes: > > Corinna> Btw., in contrast to Cygwin, native Windows hosts don't have > Corinna> the nl_langinfo function. Of course, this affects the default > Corinna> host charset. ISO-8859-1 is no sensible default, even if it > Corinna> mostly works on western language Windows systems since it's > Corinna> quite similar to CP1252. The most sensible default host > Corinna> charset for a native Windows GDB is the codepage returned by > Corinna> GetACP(), as Eli already pointed out for the target charset. > > Can we just check for GetACP in configure? GetACP is (obviously?) also available on Cygwin through automatic linking against kernel32.dll. I would not really like the idea that GetACP gets used on Cygwin as well due to a configure test... I think that a configure test doesn't make sense here. GetACP is a well-defined API on Windows, and a non-existant API on any other OS. It's not at all like, say, a POSIX function which may or may not exist on a platform, which would call for a configure test. > Otherwise, should we use USE_WIN32API rather than _WIN32? It isn't > clear to me which is preferred. I really don't know. I wasn't involved in porting GDB to MingW. I see USE_WIN32API mainly used in gdbserver.c and ser-tcp.c so far. Guessing from the comment in configure.ac I assume that USE_WIN32API is the way to go. Corinna -- Corinna Vinschen Cygwin Project Co-Leader Red Hat