On Sat, 2011 Oct 22 14:41+0200, Bruno Haible wrote:
>
> Good point. And adding EILSEQ in errno.in.h also requires a change to
> lib/strerror-override.c.

And a couple other places, I believe! Revised patch attached.


--Daniel


-- 
Daniel Richard G. || sk...@iskunk.org
My ASCII-art .sig got a bad case of Times New Roman.
diff --git a/doc/posix-headers/errno.texi b/doc/posix-headers/errno.texi
index 799b42e..cdd2303 100644
--- a/doc/posix-headers/errno.texi
+++ b/doc/posix-headers/errno.texi
@@ -29,6 +29,9 @@ The macros @code{ENETRESET}, @code{ECONNABORTED} are not defined on some
 platforms:
 Minix 3.1.8, mingw, MSVC 9.
 @item
+The macro @code{EILSEQ} is not defined on some platforms:
+NeXTSTEP 3.3.
+@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},
diff --git a/lib/errno.in.h b/lib/errno.in.h
index 8022c0a..7cfed57 100644
--- a/lib/errno.in.h
+++ b/lib/errno.in.h
@@ -228,6 +228,11 @@
 #  define GNULIB_defined_ECANCELED 1
 # endif
 
+# ifndef EILSEQ
+#  define EILSEQ 2013
+#  define GNULIB_defined_EILSEQ 1
+# endif
+
 
 #endif /* _@GUARD_PREFIX@_ERRNO_H */
 #endif /* _@GUARD_PREFIX@_ERRNO_H */
diff --git a/lib/strerror-override.c b/lib/strerror-override.c
index 4e2c32b..685d768 100644
--- a/lib/strerror-override.c
+++ b/lib/strerror-override.c
@@ -283,6 +283,11 @@ strerror_override (int errnum)
       return "Operation canceled";
 #endif
 
+#if GNULIB_defined_EILSEQ
+    case EILSEQ:
+      return "Illegal byte sequence";
+#endif
+
     default:
       return NULL;
     }
diff --git a/lib/strerror-override.h b/lib/strerror-override.h
index 09540b9..4ac40ec 100644
--- a/lib/strerror-override.h
+++ b/lib/strerror-override.h
@@ -43,7 +43,8 @@
      || GNULIB_defined_ECONNABORTED \
      || GNULIB_defined_ESTALE \
      || GNULIB_defined_EDQUOT \
-     || GNULIB_defined_ECANCELED
+     || GNULIB_defined_ECANCELED \
+     || GNULIB_defined_EILSEQ
 extern const char *strerror_override (int errnum);
 # else
 #  define strerror_override(ignored) NULL
diff --git a/m4/errno_h.m4 b/m4/errno_h.m4
index 560adba..b4f9e89 100644
--- a/m4/errno_h.m4
+++ b/m4/errno_h.m4
@@ -49,6 +49,9 @@ booboo
 #if !defined ECANCELED
 booboo
 #endif
+#if !defined EILSEQ
+booboo
+#endif
       ],
       [gl_cv_header_errno_h_complete=no],
       [gl_cv_header_errno_h_complete=yes])

Reply via email to