From fb6d0f4e8516dc938de05c495a11decba5396530 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Sun, 3 Jun 2012 18:02:55 +0200 Subject: [PATCH] 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. --- ChangeLog | 9 +++++++++ lib/errno.in.h | 9 +++++++-- lib/strerror-override.c | 3 +++ lib/strerror-override.h | 3 ++- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 559f45567..b200d5f45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +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. + * lib/strerror-override.c (strerror_override): Likewise. + 2012-06-03 Bruno Haible error, strerror-override: Support new errno values from POSIX:2008. diff --git a/lib/errno.in.h b/lib/errno.in.h index 84d79ac31..659726b50 100644 --- a/lib/errno.in.h +++ b/lib/errno.in.h @@ -85,11 +85,15 @@ # endif # ifndef EOWNERDEAD -# define EOWNERDEAD 133 -# define ENOTRECOVERABLE 127 +# define EOWNERDEAD 133 # define GNULIB_defined_EOWNERDEAD 1 # endif +# ifndef ENOTRECOVERABLE +# define ENOTRECOVERABLE 127 +# define GNULIB_defined_ENOTRECOVERABLE 1 +# endif + # ifndef EINPROGRESS # define EINPROGRESS 112 # define EALREADY 103 @@ -259,6 +263,7 @@ # define ENOTRECOVERABLE 2014 # endif # define GNULIB_defined_EOWNERDEAD 1 +# define GNULIB_defined_ENOTRECOVERABLE 1 # endif #endif /* _@GUARD_PREFIX@_ERRNO_H */ diff --git a/lib/strerror-override.c b/lib/strerror-override.c index b47238cb8..34f085244 100644 --- a/lib/strerror-override.c +++ b/lib/strerror-override.c @@ -282,6 +282,9 @@ strerror_override (int errnum) #if GNULIB_defined_EOWNERDEAD case EOWNERDEAD: return "Owner died"; +#endif + +#if GNULIB_defined_ENOTRECOVERABLE case ENOTRECOVERABLE: return "State not recoverable"; #endif diff --git a/lib/strerror-override.h b/lib/strerror-override.h index a41afa769..566530fb1 100644 --- 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 -- 2.11.0