I misremembered how AC_LANG_PROGRAM works. We don’t need to invoke
AC_INCLUDES_DEFAULT here but we *do* need to explicitly include
string.h.
Unfortunately we have no good way of testing for this regression with
the testsuite as it is today.
* lib/autoconf/functions.m4 (AC_FUNC_STRERROR_R): Include string.h in
test program.
[ac_cv_func_strerror_r_char_p], [
ac_cv_func_strerror_r_char_p=no
if test $ac_cv_have_decl_strerror_r = yes; then
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@include <string.h>],
[[
char buf[100];
char x = *strerror_r (0, buf, sizeof buf);