From 572d3d95d863687eb68db71cdf78107b2deee9f5 Mon Sep 17 00:00:00 2001 From: Ryan Schmidt Date: Mon, 19 Sep 2022 22:34:47 -0500 Subject: [PATCH] acinclude.m4: Use return instead of exit On macOS with the clang compiler from Xcode 12 or later, the configure script gets the wrong answer when checking if signal handlers must be reinstalled when invoked because the test uses exit without including stdlib.h where it's defined. Clang in Xcode 12 and later considers implicit declaration of function to be an error. Fix it by using return instead of exit. --- pure/acinclude.m4 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pure/acinclude.m4 b/pure/acinclude.m4 index 6f3cd361..21b00ef9 100644 --- a/pure/acinclude.m4 +++ b/pure/acinclude.m4 @@ -258,7 +258,7 @@ main() set_signal_handler(SIGINT, sigint); kill((int)getpid(), SIGINT); kill((int)getpid(), SIGINT); - exit(nsigint != 2); + return (nsigint != 2); } ], q_cv_must_reinstall_sighandlers=no, q_cv_must_reinstall_sighandlers=yes, if test "$q_cv_signal_vintage" = svr3; then