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: [RFA] Define EILSEQ if not defined by errno.h


> Cc: Pedro Alves <pedro@codesourcery.com>, gdb-patches@sourceware.org
> From: Tom Tromey <tromey@redhat.com>
> Date: Mon, 13 Apr 2009 10:52:30 -0600
> 
> >>>>> "Eli" == Eli Zaretskii <eliz@gnu.org> writes:
> 
> Eli> I'd like to hear Tom's opinion as well.  Tom?
> 
> I agree with all of Pedro's comments.

Thanks.  Here's what I actually committed:


2009-04-13  Eli Zaretskii  <eliz@gnu.org>

	* charset.c (EILSEQ): Define if not defined by system headers.

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	13 Apr 2009 18:48:45 -0000
@@ -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)
 {


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