acinclude.m4: fix configure tests broken with Clang 16 (implicit function declarations)
Clang 16 will make -Wimplicit-int and -Wimplicit-function-declaration errors by default which can, in addition to other things, lead to some configure tests silently failing/returning the wrong result. For more information, see LWN.net [0] or LLVM's Discourse [1], gentoo-dev@ [2], or the (new) c-std-porting mailing list [3]. [0] https://lwn.net/Articles/913505/ [1] https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213 [2] https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240 [3] hosted at lists.linux.dev. Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
@@ -904,7 +904,8 @@ AC_DEFUN([AC_W3M_SIGSETJMP],
|
||||
[AC_SUBST(HAVE_SIGSETJMP)
|
||||
AC_MSG_CHECKING(for sigsetjmp)
|
||||
AC_TRY_COMPILE(
|
||||
[#include <setjmp.h>],
|
||||
[#include <setjmp.h>
|
||||
#include <stdlib.h>],
|
||||
[ jmp_buf env;
|
||||
if (sigsetjmp(env, 1) != 0) { exit(0); } siglongjmp(env, 1);],
|
||||
[have_sigsetjmp="yes"; AC_DEFINE(HAVE_SIGSETJMP)],
|
||||
|
Reference in New Issue
Block a user