From 057858a26b333132ec878f21d60ebfee47053d4d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 5 Nov 2023 22:16:38 +0100 Subject: [PATCH] fenv-exceptions-state: Fix test failure on Haiku/i386 and Haiku/x86_64. * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): Arrange to override fesetexceptflag() on Haiku. * doc/posix-functions/fesetexceptflag.texi: Mention the Haiku bug. --- ChangeLog | 7 +++++++ doc/posix-functions/fesetexceptflag.texi | 2 +- m4/fenv-exceptions-state.m4 | 7 ++++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index dd3661fffd..0f5821ac4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2023-11-05 Bruno Haible + + fenv-exceptions-state: Fix test failure on Haiku/i386 and Haiku/x86_64. + * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): Arrange to + override fesetexceptflag() on Haiku. + * doc/posix-functions/fesetexceptflag.texi: Mention the Haiku bug. + 2023-11-05 Bruno Haible fenv: Add C++ tests. diff --git a/doc/posix-functions/fesetexceptflag.texi b/doc/posix-functions/fesetexceptflag.texi index 66075be675..3523dbb8f8 100644 --- a/doc/posix-functions/fesetexceptflag.texi +++ b/doc/posix-functions/fesetexceptflag.texi @@ -17,7 +17,7 @@ This function triggers floating-point exception traps although it shouldn't, on glibc 2.37/i386, glibc 2.37/x86_64, @c https://sourceware.org/bugzilla/show_bug.cgi?id=30988 glibc 2.37/powerpc, -musl libc, Mac OS X 10.5, mingw. +musl libc, Mac OS X 10.5, mingw, Haiku. @item This function clears too many floating-point exception flags on @c https://sourceware.org/bugzilla/show_bug.cgi?id=30998 diff --git a/m4/fenv-exceptions-state.m4 b/m4/fenv-exceptions-state.m4 index bd443be721..3cd09edd11 100644 --- a/m4/fenv-exceptions-state.m4 +++ b/m4/fenv-exceptions-state.m4 @@ -58,7 +58,8 @@ AC_DEFUN([gl_FENV_EXCEPTIONS_STATE], AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS]) gl_MATHFUNC([feenableexcept], [int], [(int)], [#include ]) dnl On glibc 2.37 for PowerPC, i386, x86_64, fesetexceptflag may raise - dnl traps. Likewise on Mac OS X 10.5.8 on i386, x86_64 and on mingw. + dnl traps. Likewise on Mac OS X 10.5.8 on i386, x86_64, on mingw, and + dnl on Haiku on i386, x86_64. AC_CACHE_CHECK([whether fesetexceptflag is guaranteed non-trapping], [gl_cv_func_fesetexceptflag_works1], [if test $gl_cv_func_feenableexcept_no_libm = yes \ @@ -129,6 +130,10 @@ changequote([,])dnl [gl_cv_func_fesetexceptflag_works1="guessing no"], [gl_cv_func_fesetexceptflag_works1="guessing yes"]) ;; + # Guess no on Haiku. + haiku*) + gl_cv_func_fesetexceptflag_works1="guessing no" + ;; *) gl_cv_func_fesetexceptflag_works1="guessing yes" ;; esac fi -- 2.39.5