From: Bruno Haible Date: Sat, 17 Jan 2026 01:22:22 +0000 (+0100) Subject: fenv-exceptions-state-c99: Avoid a Haiku crash dialog at configure time. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=18091197d9605aa5acbd1e40c42cc70a1d49e6fb;p=thirdparty%2Fgnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index b393e61cfe..c013b8e60e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2026-01-16 Bruno Haible + + 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 selinux-h: Add tests. diff --git a/m4/fenv-exceptions-state.m4 b/m4/fenv-exceptions-state.m4 index 3d227450e2..2b70e7702c 100644 --- a/m4/fenv-exceptions-state.m4 +++ b/m4/fenv-exceptions-state.m4 @@ -1,5 +1,5 @@ # 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, @@ -74,10 +74,27 @@ AC_DEFUN([gl_FENV_EXCEPTIONS_STATE], AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ #include + #if !(defined _WIN32 && !defined __CYGWIN__ + /* Avoid a crash on POSIX systems. */ + #include + #include + /* 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