This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] Define EILSEQ if not defined by errno.h
- From: Eli Zaretskii <eliz at gnu dot org>
- To: gdb-patches at sources dot redhat dot com
- Date: Sat, 11 Apr 2009 22:05:26 +0300
- Subject: [RFA] Define EILSEQ if not defined by errno.h
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
Any objections to the following patch? DJGPP doesn't have EILSEQ
defined in its errno.h.
2009-04-11 Eli Zaretskii <eliz@gnu.org>
* charset.c (EILSEQ): Define if not defined by errno.h.
Index: gdb/charset.c
===================================================================
RCS file: /cvs/src/src/gdb/charset.c,v
retrieving revision 1.19
diff -u -r1.19 charset.c
--- gdb/charset.c 25 Mar 2009 00:58:34 -0000 1.19
+++ gdb/charset.c 11 Apr 2009 19:03:08 -0000
@@ -89,6 +89,12 @@
#undef ICONV_CONST
#define ICONV_CONST const
+/* Some systems, don't have EILSEQ. But don't define it as EINVAL,
+ because callers of `iconv' want to distinguish EINVAL and EILSEQ. */
+#ifndef EILSEQ
+#define EILSEQ ENOENT
+#endif
+
iconv_t
iconv_open (const char *to, const char *from)
{