This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: gnulib's errno module was imported
- From: Yao Qi <yao at codesourcery dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: <gdb-patches at sourceware dot org>, <gregory dot 0xf0 at gmail dot com>, Joel Brobecker <brobecker at adacore dot com>
- Date: Fri, 14 Nov 2014 21:01:55 +0800
- Subject: Re: gnulib's errno module was imported
- Authentication-results: sourceware.org; auth=none
- References: <87oasaibe6 dot fsf at codesourcery dot com> <5465EBAD dot 3070108 at redhat dot com>
Pedro Alves <palves@redhat.com> writes:
> I think this will keep haunting and blocking us until we fix it.
>
Let us try again to fix it.
> Can we reevaluate this?
Sure.
> So that leaves handling the case of gnulib making up a EILSEQ value,
> which we take as meaning the system really doesn't really define it,
> which will be the systems GNU iconv returns ENOENT instead.
>
> With that rationale, how about we try something like this?
I am fine with your approach, but I am wondering why don't we simply
check ENOENT in the places where we check EILSEQ?
@@ -513,6 +513,7 @@ convert_between_encodings (const char *from, const char *to,
switch (errno)
{
case EILSEQ:
+ case ENOENT:
{
int i;
@@ -651,6 +652,7 @@ wchar_iterate (struct wchar_iterator *iter,
switch (errno)
{
case EILSEQ:
+ case ENOENT:
/* Invalid input sequence. We still might have
converted a character; if so, return it. */
if (out_avail < out_request * sizeof (gdb_wchar_t))
This looks cleaner to me (some comments should be added, of course).
--
Yao (éå)