This is the mail archive of the 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]

gdb and binutils branch master updated. 830301108dc6f1a14f7e21897a4aeb4f3ed2e441

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gdb and binutils".

The branch, master has been updated
       via  830301108dc6f1a14f7e21897a4aeb4f3ed2e441 (commit)
      from  470c009be81f3ac0205d4efb1d16fc4216093b69 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------;h=830301108dc6f1a14f7e21897a4aeb4f3ed2e441

commit 830301108dc6f1a14f7e21897a4aeb4f3ed2e441
Author: Pedro Alves <>
Date:   Fri Nov 14 15:58:09 2014 +0000

    handle 'iconv's that define EILSEQ to ENOENT
    We're currently pulling gnulib's errno module as a dependency of some
    other module.  That provides an errno.h that defines EILSEQ to a
    distinct value if the system's errno.h doesn't define it already.
    However, GNU iconv does this:
     /* Get errno declaration and values. */
     #include <errno.h>
     /* Some systems, like SunOS 4, don't have EILSEQ. Some systems, like BSD/OS,
        have EILSEQ in a different header.  On these systems, define EILSEQ
        ourselves. */
     #ifndef EILSEQ
     #define EILSEQ @EILSEQ@
    That's in:

    The "different header" mentioned is wchar.h.  This is handled in:

    which defines @EILSEQ@ to ENOENT if EILSEQ isn't found in either
    errno.h or wchar.h.
    So if iconv sets errno to EILSEQ on such system's, it's really setting
    it to ENOENT.  And when we check for EILSEQ, we're checking for
    gnulib's value.  The result is we won't detect the error correctly.
    As we dropped support for both SunOS 4 or old BSD/OS, maybe we don't
    need to care about the wchar.h issue anymore.  Still, AFAICS, gnulib's
    m4/errno_h.m4 doesn't know that EILSEQ may be defined in wchar.h, and
    so on such systems, ISTM gnulib ends up defining an incompatible
    EILSEQ itself, but I think that should be fixed on the gnulib side, by
    making it extract the EILSEQ value out of the system's wchar.h, like
    GNU iconv does.
    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 same systems GNU iconv sets errno to ENOENT instead
    of EILSEQ.
    Looking at glibc's iconv it seems that ENOENT is never used there.
    It seems it's safe to always treat ENOENT the same as EILSEQ.
    The current EILSEQ definition under PHONY_ICONV is obviously stale as
    gnulib garantees there's always a EILSEQ defined.
    Tested on x86_64 Fedora 20.
    2014-11-14  Pedro Alves  <>
    	* charset.c [PHONY_ICONV && !EILSEQ] (EILSEQ): Don't define.
    	[!PHONY_ICONV] (gdb_iconv): New function.
    	[!PHONY_ICONV] (iconv): Redefine to gdb_iconv.


Summary of changes:
 gdb/ChangeLog |    6 ++++++
 gdb/charset.c |   31 +++++++++++++++++++++----------
 2 files changed, 27 insertions(+), 10 deletions(-)

gdb and binutils

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