From 20e00532936b3236cbe45d8cd65849aa54462ae7 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 15 Sep 2008 12:26:17 +0200 Subject: [PATCH] Override also on Cygwin. --- ChangeLog | 12 ++++++++++++ doc/posix-functions/perror.texi | 2 +- doc/posix-functions/strerror.texi | 2 +- doc/posix-headers/errno.texi | 7 +++++-- lib/errno.in.h | 21 +++++++++++---------- m4/errno_h.m4 | 4 ++-- 6 files changed, 32 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index e42bd2002..6817f8859 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2008-09-15 Bruno Haible + + * 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 * lib/fstrcmp.c (EXTRA_CONTEXT_FIELDS): Add field 'edit_count_limit'. diff --git a/doc/posix-functions/perror.texi b/doc/posix-functions/perror.texi index f5f34f088..6b18eb7d5 100644 --- a/doc/posix-functions/perror.texi +++ b/doc/posix-functions/perror.texi @@ -11,7 +11,7 @@ Portability problems fixed by Gnulib: @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: diff --git a/doc/posix-functions/strerror.texi b/doc/posix-functions/strerror.texi index 86fa48d10..5f3470449 100644 --- a/doc/posix-functions/strerror.texi +++ b/doc/posix-functions/strerror.texi @@ -13,7 +13,7 @@ This function is missing on some old platforms. @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: diff --git a/doc/posix-headers/errno.texi b/doc/posix-headers/errno.texi index d90bd5613..b3c11a9d9 100644 --- a/doc/posix-headers/errno.texi +++ b/doc/posix-headers/errno.texi @@ -10,10 +10,13 @@ Portability problems fixed by Gnulib: @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}, diff --git a/lib/errno.in.h b/lib/errno.in.h index b17a35bde..7ffa203f8 100644 --- 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 diff --git a/m4/errno_h.m4 b/m4/errno_h.m4 index 2113b53f1..7f59e88d1 100644 --- a/m4/errno_h.m4 +++ b/m4/errno_h.m4 @@ -17,7 +17,7 @@ AC_DEFUN([gl_HEADER_ERRNO_H_BODY], AC_CACHE_CHECK([for complete errno.h], gl_cv_header_errno_h_complete, [ AC_EGREP_CPP(booboo,[ #include -#ifndef EOVERFLOW +#if !defined EOVERFLOW || !defined ECANCELED booboo #endif ], @@ -86,4 +86,4 @@ yes AC_SUBST($1[_HIDDEN]) AC_SUBST($1[_VALUE]) fi -]) \ No newline at end of file +]) -- 2.11.0