From f6c2431e873d1c9972f97cb610ab26491d626410 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Sun, 3 Jun 2012 18:29:00 +0200 Subject: [PATCH] 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. --- ChangeLog | 11 +++++++++++ lib/errno.in.h | 6 +++++- lib/strerror-override.c | 2 ++ lib/strerror-override.h | 1 + m4/errno_h.m4 | 3 +++ 5 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b200d5f45..f7fa9e92a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,17 @@ Bruno Haible 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 + Bruno Haible + + 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. diff --git a/lib/errno.in.h b/lib/errno.in.h index 659726b50..4fba101c0 100644 --- a/lib/errno.in.h +++ b/lib/errno.in.h @@ -118,13 +118,17 @@ # 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 diff --git a/lib/strerror-override.c b/lib/strerror-override.c index 34f085244..9f55cfa9a 100644 --- a/lib/strerror-override.c +++ b/lib/strerror-override.c @@ -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 */ case ETXTBSY: return "Text file busy"; case ENODATA: diff --git a/lib/strerror-override.h b/lib/strerror-override.h index 566530fb1..fe1fb2c22 100644 --- a/lib/strerror-override.h +++ b/lib/strerror-override.h @@ -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 \ diff --git a/m4/errno_h.m4 b/m4/errno_h.m4 index 521e76e47..1e76ba270 100644 --- a/m4/errno_h.m4 +++ b/m4/errno_h.m4 @@ -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 +#if !defined ETXTBSY +booboo +#endif #if !defined ENOMSG booboo #endif -- 2.11.0