Define missing ESTALE on Interix 3.5.
authorBruno Haible <bruno@clisp.org>
Wed, 17 Jun 2009 08:37:33 +0000 (10:37 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 17 Jun 2009 08:37:47 +0000 (10:37 +0200)
ChangeLog
doc/posix-headers/errno.texi
lib/errno.in.h
lib/strerror.c
m4/errno_h.m4

index e8ffc64..20a2ed5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-06-17  Bruno Haible  <bruno@clisp.org>
+
+       Define missing ESTALE on Interix 3.5.
+       * lib/errno.in.h (ESTALE): Assign a value if missing.
+       * lib/strerror.c (rpl_strerror): Handle missing ESTALE and ECANCELED.
+       * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Also test whether ESTALE is
+       missing.
+       * doc/posix-headers/errno.texi: Mention the Interix bug.
+       Reported by Jay Krell <jay.krell@cornell.edu> via Eric Blake.
+
 2009-06-15  Eric Blake  <ebb9@byu.net>
 
        memchr, memchr2: add valgrind exception
index 7cec051..e0a98e3 100644 (file)
@@ -19,14 +19,17 @@ The macros @code{ENOMSG}, @code{EIDRM}, @code{EPROTO}, @code{EBADMSG},
 @code{ENOTSUP} are not defined on some platforms:
 OpenBSD 4.0, mingw.
 @item
+The macro @code{ESTALE} is not defined on some platforms:
+mingw, Interix 3.5.
+@item
 The macros @code{EWOULDBLOCK}, @code{ETXTBSY}, @code{ELOOP}, @code{ENOTSOCK},
 @code{EDESTADDRREQ}, @code{EMSGSIZE}, @code{EPROTOTYPE}, @code{ENOPROTOOPT},
 @code{EPROTONOSUPPORT}, @code{EOPNOTSUPP}, @code{EAFNOSUPPORT},
 @code{EADDRINUSE}, @code{EADDRNOTAVAIL}, @code{ENETDOWN}, @code{ENETUNREACH},
 @code{ENETRESET}, @code{ECONNABORTED}, @code{ECONNRESET}, @code{ENOBUFS},
 @code{EISCONN}, @code{ENOTCONN}, @code{ETIMEDOUT}, @code{ECONNREFUSED},
-@code{EHOSTUNREACH}, @code{EALREADY}, @code{EINPROGRESS}, @code{ESTALE},
-@code{EDQUOT} are not defined on some platforms:
+@code{EHOSTUNREACH}, @code{EALREADY}, @code{EINPROGRESS}, @code{EDQUOT} are
+not defined on some platforms:
 mingw.
 @end itemize
 
index eef3931..3da0728 100644 (file)
@@ -1,6 +1,6 @@
 /* A POSIX-like <errno.h>.
 
-   Copyright (C) 2008 Free Software Foundation, Inc.
+   Copyright (C) 2008-2009 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
 #  define GNULIB_defined_ENOTSUP 1
 # endif
 
+# ifndef ESTALE
+#  define ESTALE    2009
+#  define GNULIB_defined_ESTALE 1
+# endif
+
 # ifndef ECANCELED
 #  define ECANCELED 2008
 #  define GNULIB_defined_ECANCELED 1
index 798d854..dfe6c25 100644 (file)
@@ -313,7 +313,13 @@ rpl_strerror (int n)
       break;
 # endif
 
-# if GNULIB_defined_
+# if GNULIB_defined_ESTALE
+    case ESTALE:
+      msg = "Stale NFS file handle";
+      break;
+# endif
+
+# if GNULIB_defined_ECANCELED
     case ECANCELED:
       msg = "Operation canceled";
       break;
index 16188d9..4ce1ccb 100644 (file)
@@ -1,4 +1,4 @@
-# errno_h.m4 serial 5
+# errno_h.m4 serial 6
 dnl Copyright (C) 2004, 2006, 2008, 2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -34,6 +34,9 @@ booboo
 #if !defined ENOTSUP
 booboo
 #endif
+#if !defined ESTALE
+booboo
+#endif
 #if !defined ECANCELED
 booboo
 #endif