# HG changeset patch # User Paolo Bonzini # Date 1338739375 -7200 # Node ID 75dd3fc6e824f3d086a773b9b5bf4a5a53cb9f8b # Parent e98619449f63236874381299e3417c78b76e3c45 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. diff --git a/ChangeLog b/ChangeLog --- 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 --- a/lib/errno.in.h +++ b/lib/errno.in.h @@ -85,9 +85,13 @@ # endif # ifndef EOWNERDEAD -# define EOWNERDEAD 133 +# define EOWNERDEAD 133 +# define GNULIB_defined_EOWNERDEAD 1 +# endif + +# ifndef ENOTRECOVERABLE # define ENOTRECOVERABLE 127 -# define GNULIB_defined_EOWNERDEAD 1 +# define GNULIB_defined_ENOTRECOVERABLE 1 # endif # ifndef EINPROGRESS @@ -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 --- a/lib/strerror-override.c +++ b/lib/strerror-override.c @@ -282,6 +282,9 @@ #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 --- 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