Override <errno.h> also on Cygwin.
authorBruno Haible <bruno@clisp.org>
Mon, 15 Sep 2008 10:26:17 +0000 (12:26 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 15 Sep 2008 10:26:17 +0000 (12:26 +0200)
ChangeLog
doc/posix-functions/perror.texi
doc/posix-functions/strerror.texi
doc/posix-headers/errno.texi
lib/errno.in.h
m4/errno_h.m4

index e42bd20..6817f88 100644 (file)
--- 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'.
index f5f34f0..6b18eb7 100644 (file)
@@ -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:
index 86fa48d..5f34704 100644 (file)
@@ -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:
index d90bd56..b3c11a9 100644 (file)
@@ -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},
index b17a35b..7ffa203 100644 (file)
 
 /* 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
 
index 2113b53..7f59e88 100644 (file)
@@ -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 <errno.h>
-#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
+])