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: gnulib's errno module was imported


Pedro Alves <palves@redhat.com> writes:

> 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...
>
> I guess I could also simplify and remove the GNULIB_defined_EILSEQ
> guard, mapping ENOENT to EILSEQ everywhere ?

I don't have a strong feeling on this, so either is OK to me.

>
> +/* On systems that don't have EILSEQ, GNU iconv's iconv.h defines it
> +   to ENOENT.  gnulib instead defines it to a different value.  On
> +   such systems, map ENOENT to gnulib's EILSEQ, leaving callers
> +   agnostic.  */
> +#ifdef GNULIB_defined_EILSEQ
>
> I looked at glibc's iconv and it seems that ENOENT is never used
> there, so should be safe.

Good, could you please commit your patch?

-- 
Yao (éå)


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