+2011-05-19 Bruno Haible <bruno@clisp.org>
+
+ strerror_r: Fix test failure on mingw.
+ * m4/strerror_r.m4 (gl_FUNC_STRERROR_R): Don't define
+ EXTEND_STRERROR_R.
+ * lib/strerror_r.c (strerror_r): Test the various GNULIB_defined_*
+ macros from errno.in.h instead.
+
2011-05-19 Eric Blake <eblake@redhat.com>
strerror: relax test for Solaris
strerror_r (int errnum, char *buf, size_t buflen)
#undef strerror_r
{
-#if EXTEND_STRERROR_R
+#if GNULIB_defined_ETXTBSY \
+ || GNULIB_defined_ESOCK \
+ || GNULIB_defined_ENOMSG \
+ || GNULIB_defined_EIDRM \
+ || GNULIB_defined_ENOLINK \
+ || GNULIB_defined_EPROTO \
+ || GNULIB_defined_EMULTIHOP \
+ || GNULIB_defined_EBADMSG \
+ || GNULIB_defined_EOVERFLOW \
+ || GNULIB_defined_ENOTSUP \
+ || GNULIB_defined_ESTALE \
+ || GNULIB_defined_EDQUOT \
+ || GNULIB_defined_ECANCELED
{
char const *msg = NULL;
/* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
-# strerror_r.m4 serial 4
+# strerror_r.m4 serial 5
dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl The system's strerror_r() cannot know about the new errno values we
dnl add to <errno.h>. Replace it.
REPLACE_STRERROR_R=1
- AC_DEFINE([EXTEND_STRERROR_R], [1],
- [Define to 1 if strerror_r needs to be extended so that it handles the
- extra errno values.])
fi
fi
if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then