Commit beb15d9f authored by Jayesh Krishna's avatar Jayesh Krishna
Browse files

[svn-r6657] Check if strerror_r needs decl before adding the decl - Also see r6638 & ticket #1048

parent 47f25b74
......@@ -5132,6 +5132,9 @@ fi
# in MPIU_Strerror (whose implementation is broken if strerror is not found)
AC_CHECK_FUNCS(strerror strncasecmp)
AC_FUNC_STRERROR_R
if test "$ac_cv_func_strerror_r" = "yes" ; then
PAC_FUNC_NEEDS_DECL([#include <string.h>],strerror_r)
fi
# Use snprintf if possible when creating messages
AC_CHECK_FUNCS(snprintf)
......
......@@ -9,7 +9,7 @@
* different software packages, perhaps someday by moving it to MPL. */
#include "mpiimpl.h"
#if defined(HAVE_STRERROR_R) && !defined(HAVE_STRERROR_R_DECL)
#if defined(HAVE_STRERROR_R) && defined(NEEDS_STRERROR_R_DECL)
int strerror_r(int errnum, char *strerrbuf, size_t buflen);
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment