From: Yao Qi <yao@codesourcery.com>
To: Pedro Alves <palves@redhat.com>
Cc: <gdb-patches@sourceware.org>, <gregory.0xf0@gmail.com>,
Joel Brobecker <brobecker@adacore.com>
Subject: Re: gnulib's errno module was imported
Date: Fri, 14 Nov 2014 13:02:00 -0000 [thread overview]
Message-ID: <87fvdmhr5o.fsf@codesourcery.com> (raw)
In-Reply-To: <5465EBAD.3070108@redhat.com> (Pedro Alves's message of "Fri, 14 Nov 2014 11:46:53 +0000")
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 (齐尧)
next prev parent reply other threads:[~2014-11-14 13:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-14 5:45 Yao Qi
2014-11-14 7:33 ` Eli Zaretskii
2014-11-14 8:30 ` Yao Qi
2014-11-14 8:44 ` Gregory Fong
2014-11-14 9:26 ` Eli Zaretskii
2014-11-14 11:29 ` Joel Brobecker
2014-11-14 11:47 ` Pedro Alves
2014-11-14 13:02 ` Yao Qi [this message]
2014-11-14 13:21 ` Pedro Alves
2014-11-14 13:54 ` Yao Qi
2014-11-14 14:39 ` Pedro Alves
2014-11-14 15:18 ` Joel Brobecker
2014-11-14 16:01 ` Pedro Alves
2014-11-14 23:08 ` Yao Qi
2014-11-14 14:31 ` Eli Zaretskii
2014-11-14 14:42 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87fvdmhr5o.fsf@codesourcery.com \
--to=yao@codesourcery.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=gregory.0xf0@gmail.com \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox