This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Handle cygwin wchar_t specifics
- From: Corinna Vinschen <vinschen at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Mon, 18 Apr 2011 22:06:43 +0200
- Subject: Re: [RFA] Handle cygwin wchar_t specifics
- References: <5928.31498147479$1302882967@news.gmane.org> <m3ei53cres.fsf@fleche.redhat.com>
- Reply-to: gdb-patches at sourceware dot org
Hi Tom,
On Apr 15 12:15, Tom Tromey wrote:
> >>>>> "Pierre" == Pierre Muller <pierre.muller@ics-cnrs.unistra.fr> writes:
>
> Pierre> because of this, GDB uses "UCS-4LE"
> Pierre> for the macro INTERMEDIATE_ENCODING on Cygwin
> Pierre> (while "wchar_t" it uses for mingw32, which works well).
>
> Ok, I see the problem. I thought this:
>
> /* If __STDC_ISO_10646__ is defined, then the host wchar_t is UCS-4.
>
> But this is not true! For some values of __STDC_ISO_10646__, a 2 byte
> wide character type suffices. In particular, Cygwin's value of 200305
> means that it corresponds to Unicode 4.0.0:
>
> http://www.unicode.org/versions/components-4.0.0.html
>
> I think this might be a Cygwin bug, but it is pretty hard to wade
> through the ISO / Unicode differences and other assorted standardese to
> see. (The reason I think it might be a bug is that Unicode 4.0.0
> defines some characters > 0xFFFF.)
I see there's another solution in the works, but just to let you know
that Bruno Haible and I discussed the definition of __STDC_ISO_10646__
on the Cygwin list back in January. We didn't come to a conclusion
since we both interpret the standards differently, but this gives
you some insight why __STDC_ISO_10646__ is defined on Cygwin, see
http://cygwin.com/ml/cygwin/2011-01/msg00410.html, line 70ff.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat