[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Make errno.h define EILSEQ on old LynxOS systems.

From: Joel Brobecker
Subject: Re: [PATCH] Make errno.h define EILSEQ on old LynxOS systems.
Date: Mon, 5 Nov 2012 14:59:09 -0800
User-agent: Mutt/1.5.21 (2010-09-15)

> > some systems define EILSEQ in wchar.h rather than errno.h
> > (I am not sure whether I had a list of some such systems at some
> > point, or not).
> Thanks, could you please dig that up, or let us know from memory
> as best you can?  I'd like to add this info to the documentation.

I searched the internet, and unfortunately, the only kind of clue
I found was this comment from libiconv's eilseq.m4 which, I think,
was really the only clue that I had seen:

  # The EILSEQ errno value ought to be defined in <errno.h>, according to
  # ISO C 99 and POSIX.  But some systems (like SunOS 4) don't define it,
  # and some systems (like BSD/OS) define it in <wchar.h> not <errno.h>.

I checked the following systems: ia64-hpux 11.31, x86-windows (cygwin
and MinGW), ppc-aix 5.3, sparc-solaris 2.8, x86-solaris 2.10,
x86_64-darwin 10.8, FreeBSD 9.0 and  GNU/Linux in general (x86, x86_64,
and ppc). All of them defined EILSEQ in errno.h (or in a file eventually
included by errno.h).

The reference to BSD/OS seems a little obsolete at this point,
as wikipedia reports that this proprietary system was discontinued
in 2004.

I regret now expressing my concerns about EILSEQ being defined
in wchar.h, rather than errno.h, as I feel like I may have made
you do extra work for no real reason. Perhaps you might prefer
using your first patch instead of the second one. It potentially
leaves a problem unfixed; but on the other hand, very few systems
would be impacted, and it leaving this open like this would allow
us to know for sure if the problem ever came up. I have a feeling
this would only be relevant to older systems anyway.

> +2012-11-05  Paul Eggert  <address@hidden>
> +
> +     errno: port to LynxOS 178 2.2.2
> +     Problem reported by Joel Brobecker in
> +     <http://lists.gnu.org/archive/html/bug-gnulib/2012-10/msg00088.html>.
> +     * doc/posix-headers/errno.texi (errno.h): Document this.
> +     * lib/errno.in.h (EILSEQ, GNULIB_defined_EILSEQ): New macros,
> +     defined if @EILSEQ_HIDDEN@ or if EILSEQ is not defined.
> +     * lib/strerror-override.c, lib/strerror-override.h (strerror_override):
> +     Supply a string for EILSEQ.
> +     * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Check for EILSEQ.
> +     (gl_REPLACE_ERRNO_VALUE): New parameter $2, to specify what
> +     to do when the errno value is hidden.  All uses changed.
> +     * modules/errno (errno.h): Substitute EILSEQ_HIDDEN and EILSEQ_VALUE.

I've tested both of your patches on native x86_64-linux (system errno.h
used, no errno.h generated), as well as when cross-building GDBserver
for ppc-lynx178 (errno.h generated, with EILSEQ defined to our arbitrary

Thanks a lot for all of you help, Paul - I really appreciate it.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]