This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: Your INTERMEDIATE_ENCODING patch for Solaris
- From: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- To: "'Tom Tromey'" <tromey at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>
- Date: Thu, 2 Sep 2010 15:12:24 +0200
- Subject: RE: Your INTERMEDIATE_ENCODING patch for Solaris
- References: <20100731162500.32FAE5664F4@henry1.codesourcery.com> <m37hk4x5r0.fsf@fleche.redhat.com> <m3eidxi069.fsf@fleche.redhat.com> <20100817184407.GC3599@adacore.com> <m3aaolgj0g.fsf@fleche.redhat.com> <20100818101406.GA2903@adacore.com> <15264.6257346079$1282142643@news.gmane.org> <m38w43dho9.fsf@fleche.redhat.com> <004b01cb3faf$b07ed580$117c8080$@muller@ics-cnrs.unistra.fr> <m34oeq8u1g.fsf@fleche.redhat.com> <m339twkmj5.fsf@fleche.redhat.com> <001b01cb48ee$6b8425f0$428c71d0$@muller@ics-cnrs.unistra.fr> <m3k4n6hgqe.fsf@fleche.redhat.com> <44796.6229789474$1283326243@news.gmane.org> <m362yp9kaj.fsf@fleche.redhat.com>
> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Tom Tromey
> Envoyé?: Thursday, September 02, 2010 12:22 AM
> À?: Pierre Muller
> Cc?: gdb-patches@sourceware.org
> Objet?: Re: Your INTERMEDIATE_ENCODING patch for Solaris
>
> Pierre> So here, the c library iconv functions are used,
> Pierre> but the default host-charset is set to ASCII which is
> Pierre> not handled by that iconv :(
>
> Tom> I am not sure how this happens with the patch I posted.
> Tom> Does this machine define __STDC_ISO_10646__?
> Tom> Or did I somehow get the #if logic wrong?
>
> I didn't see an answer to this.
> I still don't understand how this particular build is using iconv and
> not the phony iconv.
Sorry, after investigation it appears that:
__STDC_ISO_10646__ is not in any headers under /usr/include
but both HAVE_WCHAR_T and HAVE_BTOWC are defined,
so that with you patch PHONY_ICONV macro doesn't get set.
Does this answer your question?
> Pierre> I do get a default of '"UTF-8" for Open Solaris machines,
> Pierre> but I don't know if other systems might also return "646",
> Pierre> but not like the "UTF-8" choice.
>
> AFAIK only Solaris does this. It seems to me that UTF-8 is not
> correct,
> though -- it may vary by locale.
>
> Maybe we need to go even further and blacklist Solaris from ever using
> iconv :-(. It would help to know the answer to the above.
Probably just define PHONY_ICONV if the first set of conditions is
not met (by the way, I am not sure the libiconv version test
that we added is really pertinent.)
Pierre