2024-01-19 Bruno Haible <bruno@clisp.org>
+ fenv-exceptions-state-c99: Fix for FreeBSD/powerpc64 and NetBSD/powerpc.
+ * m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): On
+ FreeBSD/powerpc64 and NetBSD/powerpc, set REPLACE_FESETEXCEPTFLAG.
+ * doc/posix-functions/fesetexceptflag.texi: Mention the FreeBSD and
+ NetBSD bug.
+
fenv-*: Avoid test failures on FreeBSD/powerpc64 and NetBSD/powerpc.
On these platforms, FE_ALL_EXCEPT contains additional bits.
* tests/test-fenv-except-tracking-1.c (FE_VXSOFT, FE_VXZDZ): Define
@c https://sourceware.org/bugzilla/show_bug.cgi?id=30998
glibc 2.37/alpha.
@item
+This function loses the @code{FE_INVALID} flag on
+FreeBSD 14.0/powerpc64, NetBSD 9.3/powerpc.
+@item
This function is also buggy on
@c Without the override, the unit test test-fenv-except-state-1 fails.
AIX 7.3.1.
-# fenv-exceptions-state.m4 serial 3
+# fenv-exceptions-state.m4 serial 4
dnl Copyright (C) 2023-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,
*yes) ;;
*) REPLACE_FESETEXCEPTFLAG=1 ;;
esac
+ dnl Additionally, on FreeBSD/powerpc64 and NetBSD/powerpc, the unit test
+ dnl test-fenv-except-state-2 fails if we don't override fesetexceptflag.
+ dnl The function fesetexceptflag apparently fails to restore the
+ dnl FE_INVALID flag.
+ case "$host" in
+ powerpc*-*-freebsd* | powerpc*-*-netbsd*)
+ REPLACE_FESETEXCEPTFLAG=1
+ ;;
+ esac
dnl Additionally, on AIX, the unit test test-fenv-except-state-1 fails
dnl if we don't override fesetexceptflag.
case "$host" in
- powerpc*-*-aix*) REPLACE_FESETEXCEPTFLAG=1 ;;
+ powerpc*-*-aix*)
+ REPLACE_FESETEXCEPTFLAG=1
+ ;;
esac
dnl Additionally, on MSVC, we want the bits in the saved state to be
dnl identified by the FE_* macros, so that the fetestexceptflag function