From: Eli Zaretskii Date: Mon, 13 Apr 2009 18:49:27 +0000 (+0000) Subject: * charset.c (EILSEQ): Define if not defined by system headers. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e726d7841ce8575a82ecc238032cd4441b36270e;p=binutils-gdb.git * charset.c (EILSEQ): Define if not defined by system headers. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cc05263a036..a300c7e1582 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2009-04-13 Eli Zaretskii + + * charset.c (EILSEQ): Define if not defined by system headers. + 2009-04-11 Eli Zaretskii * config/djgpp/config.sed: Tweak ac_config_files in intl/configure diff --git a/gdb/charset.c b/gdb/charset.c index 14862e7ac1e..4631af86d24 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) {