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: Your INTERMEDIATE_ENCODING patch for Solaris


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


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