* charset.c (EILSEQ): Define if not defined by system headers.
authorEli Zaretskii <eliz@gnu.org>
Mon, 13 Apr 2009 18:49:27 +0000 (18:49 +0000)
committerEli Zaretskii <eliz@gnu.org>
Mon, 13 Apr 2009 18:49:27 +0000 (18:49 +0000)
gdb/ChangeLog
gdb/charset.c

index cc05263..a300c7e 100644 (file)
@@ -1,3 +1,7 @@
+2009-04-13  Eli Zaretskii  <eliz@gnu.org>
+
+       * charset.c (EILSEQ): Define if not defined by system headers.
+
 2009-04-11  Eli Zaretskii  <eliz@gnu.org>
 
        * config/djgpp/config.sed: Tweak ac_config_files in intl/configure
index 14862e7..4631af8 100644 (file)
 #undef ICONV_CONST
 #define ICONV_CONST const
 
+/* Some systems, don't have EILSEQ, so we define it here, but not as
+   EINVAL, because callers of `iconv' want to distinguish EINVAL and
+   EILSEQ.  This is what iconv.h from libiconv does as well.  Note
+   that wchar.h may also define EILSEQ, so this needs to be after we
+   include wchar.h, which happens in defs.h through gdb_wchar.h.  */
+#ifndef EILSEQ
+#define EILSEQ ENOENT
+#endif
+
 iconv_t
 iconv_open (const char *to, const char *from)
 {