This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] defs.h: Define GDB_DEFAULT_TARGET_[WIDE_]CHARSET for Cygwin and MingW builds


On Mar  3 09:25, Tom Tromey wrote:
> >>>>> "Corinna" == Corinna Vinschen <vinschen@redhat.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]