Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <palves@redhat.com>
Cc: yao@codesourcery.com, gdb-patches@sourceware.org,
	gregory.0xf0@gmail.com, brobecker@adacore.com
Subject: Re: gnulib's errno module was imported
Date: Fri, 14 Nov 2014 14:31:00 -0000	[thread overview]
Message-ID: <83ioihj1kj.fsf@gnu.org> (raw)
In-Reply-To: <546601BD.7020700@redhat.com>

> Date: Fri, 14 Nov 2014 13:21:01 +0000
> From: Pedro Alves <palves@redhat.com>
> CC: gdb-patches@sourceware.org, gregory.0xf0@gmail.com,        Joel Brobecker <brobecker@adacore.com>
> 
> > @@ -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).
> 
> That was actually my first approach, but then:
> 
>  - I thought that having a central place to handle this
>    and to put the comment was cleaner than repeating the fix
>    in multiple places.
>  - That won't build on systems that EILSEQ and ENOENT are
>    defined to the same value (two switch cases with the same value).
>    Not sure there are any such systems, but given iconv.h's practice...

The last one is easy:

  	    case EILSEQ:
 +#if EILSEQ != ENOENT
 +	    case ENOENT:
 +#endif


  parent reply	other threads:[~2014-11-14 14:31 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
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 [this message]
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=83ioihj1kj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=gregory.0xf0@gmail.com \
    --cc=palves@redhat.com \
    --cc=yao@codesourcery.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