STRERROR_R_CHAR_P broken

Pascal Terjan <[email protected]>
Newsgroups gmane.comp.sysutils.autoconf.bugs
Message-ID <CA+CX+bgqN4-7KLJZKdAch0hgzKq2L34K-bh-5godbpvAnmpHgA@mail.gmail.com>
After http://git.savannah.gnu.org/cgit/autoconf.git/commit/lib/autoconf/functions.m4?id=326c9a547423d25c621bc5c0ef76edbf6eda8c92
detection fails because <string.h> is no longer included.

checking whether strerror_r is declared... yes
checking whether strerror_r returns char *... no

configure:11444: x86_64-mageia-linux-gnu-gcc -c -O2 -g -pipe -Wformat
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector
--param=ssp-buffer-size=4 -fstack-protector-all
-fasynchronous-unwind-tables -I/usr/include/et -fPIC
-fno-strict-aliasing -fstack-protector-all -I/usr/include/et
conftest.c >&5
conftest.c: In function 'main':
conftest.c:77:14: warning: implicit declaration of function
'strerror_r' [-Wimplicit-function-declaration]
   77 |    char x = *strerror_r (0, buf, sizeof buf);
      |              ^~~~~~~~~~
conftest.c:77:13: error: invalid type argument of unary '*' (have 'int')
   77 |    char x = *strerror_r (0, buf, sizeof buf);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
conftest.c:78:14: warning: initialization of 'char *' from 'int' makes
pointer from integer without a cast [-Wint-conversion]
   78 |    char *p = strerror_r (0, buf, sizeof buf);
      |              ^~~~~~~~~~
configure:11444: $? = 1


The suspicious part of the commit is:

-AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.