]> Savannah Git Hosting - gnulib.git/commitdiff
error, strerror-override: Support mingw64 from Fedora 17.
authorPaolo Bonzini <bonzini@gnu.org>
Sun, 3 Jun 2012 16:29:00 +0000 (18:29 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 3 Jun 2012 16:29:19 +0000 (18:29 +0200)
* lib/errno.in.h (GNULIB_defined_ESTREAMS): Use a different indicator
for ETXTBSY, ENODATA, ENOSR, ENOSTR, ETIME, EOTHER, compared to
EINPROGRESS.
* lib/strerror-override.h (strerror_override): Test it.
* lib/strerror-override.c (strerror_override): Likewise.
* m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also ETXTBSY.

ChangeLog
lib/errno.in.h
lib/strerror-override.c
lib/strerror-override.h
m4/errno_h.m4

index b200d5f45fd49aa04ed05fc98fad4fa198788806..f7fa9e92a1b1b71f8229508c0876fb2d8872092e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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_ESTREAMS): Use a different indicator
+       for ETXTBSY, ENODATA, ENOSR, ENOSTR, ETIME, EOTHER, compared to
+       EINPROGRESS.
+       * lib/strerror-override.h (strerror_override): Test it.
+       * lib/strerror-override.c (strerror_override): Likewise.
+       * m4/errno_h.m4 (gl_HEADER_ERRNO_H): Test also ETXTBSY.
+
 2012-05-21  Paolo Bonzini  <bonzini@gnu.org>
            Bruno Haible  <bruno@clisp.org>
 
index 659726b5008c8003ac878016fea5ba27fb3beaa9..4fba101c01cdf2f0539e38675c7db0a5987a7f49 100644 (file)
 #   define ELOOP           114
 #   define EHOSTUNREACH    110
 #   define EWOULDBLOCK     140
+#   define GNULIB_defined_ESOCK 1
+#  endif
+
+#  ifndef ETXTBSY
 #   define ETXTBSY         139
 #   define ENODATA         120  /* not required by POSIX */
 #   define ENOSR           124  /* not required by POSIX */
 #   define ENOSTR          125  /* not required by POSIX */
 #   define ETIME           137  /* not required by POSIX */
 #   define EOTHER          131  /* not required by POSIX */
-#   define GNULIB_defined_ESOCK 1
+#   define GNULIB_defined_ESTREAMS 1
 #  endif
 
 /* These are intentionally the same values as the WSA* error numbers, defined
index 34f085244503f91f7ad23a9c76570a9c63dd2663..9f55cfa9ac42217a02e6d25bf6d843cdab8d9114 100644 (file)
@@ -89,6 +89,8 @@ strerror_override (int errnum)
       return "No route to host";
     case EWOULDBLOCK:
       return "Operation would block";
+#endif
+#if GNULIB_defined_ESTREAMS /* native Windows platforms with older <errno.h> */
     case ETXTBSY:
       return "Text file busy";
     case ENODATA:
index 566530fb15d3172915cae03dde2455fbe9326f16..fe1fb2c22926fa1339d23579ea1236a4b0a747ac 100644 (file)
@@ -30,6 +30,7 @@
    describing the error.  Otherwise return NULL.  */
 # if REPLACE_STRERROR_0 \
      || GNULIB_defined_ESOCK \
+     || GNULIB_defined_ESTREAMS \
      || GNULIB_defined_EWINSOCK \
      || GNULIB_defined_ENOMSG \
      || GNULIB_defined_EIDRM \
index 521e76e47a2ed2ec4e412eda223249eb9cf49e91..1e76ba270a6bbf54ec92490e349328af8879e373 100644 (file)
@@ -10,6 +10,9 @@ AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
   AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
     AC_EGREP_CPP([booboo],[
 #include <errno.h>
+#if !defined ETXTBSY
+booboo
+#endif
 #if !defined ENOMSG
 booboo
 #endif