aboutsummaryrefslogtreecommitdiff
path: root/gdb/charset.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2009-04-13 18:49:27 +0000
committerEli Zaretskii <eliz@gnu.org>2009-04-13 18:49:27 +0000
commite726d7841ce8575a82ecc238032cd4441b36270e (patch)
tree92c84e54461a1d19f86343a71d4f92575037eafd /gdb/charset.c
parent587c6b96efe8a88472fb2f24f09d0e93d60e2242 (diff)
downloadgdb-e726d7841ce8575a82ecc238032cd4441b36270e.zip
gdb-e726d7841ce8575a82ecc238032cd4441b36270e.tar.gz
gdb-e726d7841ce8575a82ecc238032cd4441b36270e.tar.bz2
* charset.c (EILSEQ): Define if not defined by system headers.
Diffstat (limited to 'gdb/charset.c')
-rw-r--r--gdb/charset.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/gdb/charset.c b/gdb/charset.c
index 14862e7..4631af8 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -89,6 +89,15 @@
#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)
{