+2026-01-16 Bruno Haible <bruno@clisp.org>
+
+ fenv-exceptions-state-c99: Avoid a Haiku crash dialog at configure time.
+ * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): In the test
+ program, add a signal handler, like in m4/nocrash.m4.
+
2026-01-16 Bruno Haible <bruno@clisp.org>
selinux-h: Add tests.
# fenv-exceptions-state.m4
-# serial 5
+# serial 6
dnl Copyright (C) 2023-2026 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_PROGRAM([[
#include <fenv.h>
+ #if !(defined _WIN32 && !defined __CYGWIN__
+ /* Avoid a crash on POSIX systems. */
+ #include <signal.h>
+ #include <unistd.h>
+ /* A POSIX signal handler. */
+ static void exception_handler (int sig)
+ {
+ _exit (1);
+ }
+ static void nocrash_init (void)
+ {
+ signal (SIGFPE, exception_handler);
+ }
+ #else
+ static void nocrash_init (void) {}
+ #endif
static volatile double a, b;
static volatile long double al, bl;
]],
- [[fexcept_t saved_flags;
+ [[nocrash_init ();
+ fexcept_t saved_flags;
if (feraiseexcept (FE_INVALID) == 0
&& fegetexceptflag (&saved_flags, FE_INVALID) == 0
&& feclearexcept (FE_INVALID) == 0