* m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): In the test program, catch the
SIGABRT signal, so that the program does not dump core.
+2024-02-20 Bruno Haible <bruno@clisp.org>
+
+ *printf-posix: Avoid crash in a configure test.
+ * m4/printf.m4 (gl_PRINTF_DIRECTIVE_N): In the test program, catch the
+ SIGABRT signal, so that the program does not dump core.
+
2024-02-18 Jim Meyering <meyering@meta.com>
maint.mk: improve new syntax-check rule
-# printf.m4 serial 89
+# printf.m4 serial 90
dnl Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
[
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
exit (1);
}
#endif
+static void
+abort_handler (int sig)
+{
+ (void) sig;
+ _exit (1);
+}
static char fmtstring[10];
static char buf[100];
int main ()
#ifdef _MSC_VER
_set_invalid_parameter_handler (invalid_parameter_handler);
#endif
+ signal (SIGABRT, abort_handler);
/* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
support %n in format strings in read-only memory but not in writable
memory. */