changeset 16892:75dd3fc6e824

error, strerror-override: Support mingw64 from Fedora 17. * lib/errno.in.h (GNULIB_defined_ENOTRECOVERABLE): Use a different indicator for ENOTRECOVERABLE, compared to EOWNERDEAD. * lib/strerror-override.h (strerror_override): Test it. * lib/strerror-override.c (strerror_override): Likewise.
author Paolo Bonzini <bonzini@gnu.org>
date Sun, 03 Jun 2012 18:02:55 +0200
parents e98619449f63
children a6389b513756
files ChangeLog lib/errno.in.h lib/strerror-override.c lib/strerror-override.h
diffstat 4 files changed, 21 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
+	    Bruno Haible  <bruno@clisp.org>
+
+	error, strerror-override: Support mingw64 from Fedora 17.
+	* lib/errno.in.h (GNULIB_defined_ENOTRECOVERABLE): Use a different
+	indicator for ENOTRECOVERABLE, compared to EOWNERDEAD.
+	* lib/strerror-override.h (strerror_override): Test it.
+	* lib/strerror-override.c (strerror_override): Likewise.
+
 2012-06-03  Bruno Haible  <bruno@clisp.org>
 
 	error, strerror-override: Support new errno values from POSIX:2008.
--- a/lib/errno.in.h
+++ b/lib/errno.in.h
@@ -85,9 +85,13 @@
 #  endif
 
 #  ifndef EOWNERDEAD
-#   define EOWNERDEAD      133
+#   define EOWNERDEAD 133
+#   define GNULIB_defined_EOWNERDEAD 1
+#  endif
+
+#  ifndef ENOTRECOVERABLE
 #   define ENOTRECOVERABLE 127
-#   define GNULIB_defined_EOWNERDEAD 1
+#   define GNULIB_defined_ENOTRECOVERABLE 1
 #  endif
 
 #  ifndef EINPROGRESS
@@ -259,6 +263,7 @@
 #   define ENOTRECOVERABLE 2014
 #  endif
 #  define GNULIB_defined_EOWNERDEAD 1
+#  define GNULIB_defined_ENOTRECOVERABLE 1
 # endif
 
 #endif /* _@GUARD_PREFIX@_ERRNO_H */
--- a/lib/strerror-override.c
+++ b/lib/strerror-override.c
@@ -282,6 +282,9 @@
 #if GNULIB_defined_EOWNERDEAD
     case EOWNERDEAD:
       return "Owner died";
+#endif
+
+#if GNULIB_defined_ENOTRECOVERABLE
     case ENOTRECOVERABLE:
       return "State not recoverable";
 #endif
--- a/lib/strerror-override.h
+++ b/lib/strerror-override.h
@@ -44,7 +44,8 @@
      || GNULIB_defined_ESTALE \
      || GNULIB_defined_EDQUOT \
      || GNULIB_defined_ECANCELED \
-     || GNULIB_defined_EOWNERDEAD
+     || GNULIB_defined_EOWNERDEAD \
+     || GNULIB_defined_ENOTRECOVERABLE
 extern const char *strerror_override (int errnum);
 # else
 #  define strerror_override(ignored) NULL