Mercurial > hg > octave-lojdl > gnulib-hg
changeset 10440:d4ba2e998855
Override <errno.h> also on Cygwin.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Mon, 15 Sep 2008 12:26:17 +0200 |
parents | 95f2b5d880cb |
children | d435a10d69fe |
files | ChangeLog doc/posix-functions/perror.texi doc/posix-functions/strerror.texi doc/posix-headers/errno.texi lib/errno.in.h m4/errno_h.m4 |
diffstat | 6 files changed, 32 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-09-15 Bruno Haible <bruno@clisp.org> + + * doc/posix-headers/errno.texi: Mention the Cygwin problem. + * doc/posix-functions/strerror.texi: Mention also Cygwin. + * doc/posix-functions/perror.texi: Likewise. + * m4/errno_h.m4 (gl_HEADER_ERRNO_H_BODY): Test also whether ECANCELED + is missing. + Reported by Eric Blake. + + * lib/errno.in.h: Use replacement values >= 2000. + Reported by Eric Blake. + 2008-09-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> * lib/fstrcmp.c (EXTRA_CONTEXT_FIELDS): Add field 'edit_count_limit'.
--- a/doc/posix-functions/perror.texi +++ b/doc/posix-functions/perror.texi @@ -11,7 +11,7 @@ @item This function does not support the error values that are specified by POSIX but not defined by the system, on some platforms: -OpenBSD 4.0, OSF/1 5.1, mingw. +OpenBSD 4.0, OSF/1 5.1, Cygwin, mingw. @end itemize Portability problems not fixed by Gnulib:
--- a/doc/posix-functions/strerror.texi +++ b/doc/posix-functions/strerror.texi @@ -13,7 +13,7 @@ @item This function does not support the error values that are specified by POSIX but not defined by the system, on some platforms: -OpenBSD 4.0, OSF/1 5.1, mingw. +OpenBSD 4.0, OSF/1 5.1, Cygwin, mingw. @item This function fails to return a string for out-of-range integers on some platforms:
--- a/doc/posix-headers/errno.texi +++ b/doc/posix-headers/errno.texi @@ -10,10 +10,13 @@ @item The macros @code{EOVERFLOW}, @code{ENOLINK}, @code{EMULTIHOP} are not defined on some platforms: -OpenBSD 4.0, OSF/1 4.0, mingw. +OpenBSD 4.0, OSF/1 5.1, mingw. +@item +The macro @code{ECANCELED} is not defined on some platforms: +OpenBSD 4.0, Cygwin, mingw. @item The macros @code{ENOMSG}, @code{EIDRM}, @code{EPROTO}, @code{EBADMSG}, -@code{ENOTSUP}, @code{ECANCELED} are not defined on some platforms: +@code{ENOTSUP} are not defined on some platforms: OpenBSD 4.0, mingw. @item The macros @code{EWOULDBLOCK}, @code{ETXTBSY}, @code{ELOOP}, @code{ENOTSOCK},
--- a/lib/errno.in.h +++ b/lib/errno.in.h @@ -94,54 +94,55 @@ /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK, EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined. - Define them here. Values >= 128 seem safe to use. + Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151, + HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133. Note: When one of these systems defines some of these macros some day, binaries will have to be recompiled so that they recognizes the new errno values from the system. */ # ifndef ENOMSG -# define ENOMSG 128 +# define ENOMSG 2000 # define GNULIB_defined_ENOMSG 1 # endif # ifndef EIDRM -# define EIDRM 129 +# define EIDRM 2001 # define GNULIB_defined_EIDRM 1 # endif # ifndef ENOLINK -# define ENOLINK 130 +# define ENOLINK 2002 # define GNULIB_defined_ENOLINK 1 # endif # ifndef EPROTO -# define EPROTO 131 +# define EPROTO 2003 # define GNULIB_defined_EPROTO 1 # endif # ifndef EMULTIHOP -# define EMULTIHOP 132 +# define EMULTIHOP 2004 # define GNULIB_defined_EMULTIHOP 1 # endif # ifndef EBADMSG -# define EBADMSG 133 +# define EBADMSG 2005 # define GNULIB_defined_EBADMSG 1 # endif # ifndef EOVERFLOW -# define EOVERFLOW 134 +# define EOVERFLOW 2006 # define GNULIB_defined_EOVERFLOW 1 # endif # ifndef ENOTSUP -# define ENOTSUP 135 +# define ENOTSUP 2007 # define GNULIB_defined_ENOTSUP 1 # endif # ifndef ECANCELED -# define ECANCELED 136 +# define ECANCELED 2008 # define GNULIB_defined_ECANCELED 1 # endif
--- a/m4/errno_h.m4 +++ b/m4/errno_h.m4 @@ -17,7 +17,7 @@ AC_CACHE_CHECK([for complete errno.h], gl_cv_header_errno_h_complete, [ AC_EGREP_CPP(booboo,[ #include <errno.h> -#ifndef EOVERFLOW +#if !defined EOVERFLOW || !defined ECANCELED booboo #endif ], @@ -86,4 +86,4 @@ AC_SUBST($1[_HIDDEN]) AC_SUBST($1[_VALUE]) fi -]) \ No newline at end of file +])