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: Tom Tromey <tromey at redhat dot com>
- To: "Pierre Muller" <pierre dot muller at ics-cnrs dot unistra dot fr>
- Cc: <gdb-patches at sourceware dot org>
- Date: Mon, 27 Sep 2010 11:28:13 -0600
- Subject: Re: Your INTERMEDIATE_ENCODING patch for Solaris
- References: <20100731162500.32FAE5664F4@henry1.codesourcery.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> <000301cb4aa0$7c44fd70$74cef850$@muller@ics-cnrs.unistra.fr> <m362yo88fj.fsf@fleche.redhat.com> <m3hbhs59iu.fsf@fleche.redhat.com> <m3aaniwykg.fsf@fleche.redhat.com> <001f01cb5574$78252a60$686f7f20$@muller@ics-cnrs.unistra.fr> <m3d3sdr16g.fsf@fleche.redhat.com> <20078.2261243605$1284672670@news.gmane.org> <m3y6b1nmn2.fsf@fleche.redhat.com> <001101cb5663$f6011c10$e2035430$@muller@ics-cnrs.unistra.fr> <m37hid5wep.fsf@fleche.redhat.com> <000901cb5aef$afb465b0$0f1d3110$@muller@ics-cnrs.unistra.fr>
Tom> Yeah, how about we make x0108 the minimal acceptable version?
Tom> It was released in 2002, that seems plenty old to me.
Tom> If you agree, I will make the change.
Pierre> I agree, furthermore HAVE_LIBICONVLIST
Pierre> should always be set in config.h in that case,
Pierre> which avoids the direct call to 'iconv -l'.
Here is the patch I am checking in.
Thank you for all the testing you did for this.
Tom
2010-09-27 Tom Tromey <tromey@redhat.com>
* gdb_wchar.h: Change minimum libiconv to 0x108.
Index: gdb_wchar.h
===================================================================
RCS file: /cvs/src/src/gdb/gdb_wchar.h,v
retrieving revision 1.4
diff -u -r1.4 gdb_wchar.h
--- gdb_wchar.h 15 Sep 2010 20:18:47 -0000 1.4
+++ gdb_wchar.h 27 Sep 2010 17:21:10 -0000
@@ -52,12 +52,11 @@
/* We use "btowc" as a sentinel to detect functioning wchar_t support.
We check for either __STDC_ISO_10646__ or a new-enough libiconv in
order to ensure we can convert to and from wchar_t. We choose
- libiconv version 0x10D because it was reported that earlier
- versions do not always accept "wchar_t" as an encoding
- argument. */
+ libiconv version 0x108 because it is the first version with
+ iconvlist. */
#if defined (HAVE_ICONV) && defined (HAVE_WCHAR_H) && defined (HAVE_BTOWC) \
&& (defined (__STDC_ISO_10646__) \
- || (defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x10D))
+ || (defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108))
#include <wchar.h>
#include <wctype.h>
@@ -84,7 +83,7 @@
#else
#define INTERMEDIATE_ENCODING "UCS-4LE"
#endif
-#elif defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x10D
+#elif defined (_LIBICONV_VERSION) && _LIBICONV_VERSION >= 0x108
#define INTERMEDIATE_ENCODING "wchar_t"
#else
/* This shouldn't happen, because the earlier #if should have filtered