diff lib/strerror-override.c @ 16891:e98619449f63

error, strerror-override: Support new errno values from POSIX:2008. * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also EOWNERDEAD and ENOTRECOVERABLE. * lib/errno.in.h (EOWNERDEAD, ENOTRECOVERABLE): Define on all platforms. * lib/strerror-override.c (strerror_override): Conditionalize the EOWNERDEAD, ENOTRECOVERABLE handling on GNULIB_defined_EOWNERDEAD. * lib/strerror-override.h (strerror_override): Declare also if GNULIB_defined_EOWNERDEAD is defined. * tests/test-errno.c (e130, e131): New variables. * doc/posix-headers/errno.texi: Mention the status for EOWNERDEAD, ENOTRECOVERABLE. Reported by Paolo Bonzini.
author Bruno Haible <bruno@clisp.org>
date Sun, 03 Jun 2012 15:47:14 +0200
parents 8250f2777afc
children 75dd3fc6e824
line wrap: on
line diff
--- a/lib/strerror-override.c
+++ b/lib/strerror-override.c
@@ -97,10 +97,6 @@
       return "Out of streams resources";
     case ENOSTR:
       return "Device not a stream";
-    case ENOTRECOVERABLE:
-      return "State not recoverable";
-    case EOWNERDEAD:
-      return "Owner died";
     case ETIME:
       return "Timer expired";
     case EOTHER:
@@ -283,6 +279,13 @@
       return "Operation canceled";
 #endif
 
+#if GNULIB_defined_EOWNERDEAD
+    case EOWNERDEAD:
+      return "Owner died";
+    case ENOTRECOVERABLE:
+      return "State not recoverable";
+#endif
+
     default:
       return NULL;
     }