From: Bruno Haible Date: Fri, 19 Jan 2024 21:58:43 +0000 (+0100) Subject: fenv-environment: Fix for NetBSD/powerpc. X-Git-Tag: v1.0~499 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=16276ab5c6b6b4154ba1c4577d53e7fe0fecc989;p=gnulib.git fenv-environment: Fix for NetBSD/powerpc. * m4/fenv-environment.m4 (gl_FENV_ENVIRONMENT): For feupdateenv, use the same configure test on NetBSD/powerpc as on glibc/hppa. * doc/posix-functions/feupdateenv.texi: Mention the NetBSD/powerpc bug. --- diff --git a/ChangeLog b/ChangeLog index 7cef961362..d8d2a13d9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2024-01-19 Bruno Haible + fenv-environment: Fix for NetBSD/powerpc. + * m4/fenv-environment.m4 (gl_FENV_ENVIRONMENT): For feupdateenv, use + the same configure test on NetBSD/powerpc as on glibc/hppa. + * doc/posix-functions/feupdateenv.texi: Mention the NetBSD/powerpc bug. + fenv-exceptions-trapping: Avoid a test failure on *BSD/powerpc*. * tests/test-fenv-except-trapping-2.c (main): Skip the '4' tests also on FreeBSD/powerpc* and NetBSD/powerpc*. diff --git a/doc/posix-functions/feupdateenv.texi b/doc/posix-functions/feupdateenv.texi index bb844ec2f1..4fd76416a1 100644 --- a/doc/posix-functions/feupdateenv.texi +++ b/doc/posix-functions/feupdateenv.texi @@ -34,7 +34,8 @@ musl libc/i386, musl libc/x86_64, AIX 7.3, Solaris 10 and 11, mingw 10. This function does not trigger traps on @c https://sourceware.org/bugzilla/show_bug.cgi?id=31023 glibc 2.37/hppa, -musl libc/s390x. +musl libc/s390x, +NetBSD 9.3/powerpc. @item This function may fail on some platforms: MSVC 14. diff --git a/m4/fenv-environment.m4 b/m4/fenv-environment.m4 index 8d3911e6e4..bf4788dc9b 100644 --- a/m4/fenv-environment.m4 +++ b/m4/fenv-environment.m4 @@ -1,4 +1,4 @@ -# fenv-environment.m4 serial 2 +# fenv-environment.m4 serial 3 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, @@ -304,9 +304,10 @@ AC_DEFUN([gl_FENV_ENVIRONMENT], dnl ) dnl and on Mac OS X 10.5/{i386,x86_64} (where it forgets about the currently dnl set floating-point exception flags) - dnl and on musl libc/s390x (where it does not trigger traps) - dnl on musl libc/{i386,x86_64} and AIX and Solaris and mingw 10 (where it - dnl fails to restore the exception trap bits), + dnl and on musl libc/s390x and NetBSD 9.3/powerpc (where it does not trigger + dnl traps) + dnl and on musl libc/{i386,x86_64} and AIX and Solaris and mingw 10 (where + dnl it fails to restore the exception trap bits), dnl and on FreeBSD 12.2/arm64 (see dnl ). dnl On MSVC 14 it may even fail. @@ -329,8 +330,8 @@ AC_DEFUN([gl_FENV_ENVIRONMENT], [gl_cv_func_feupdateenv_works="guessing no"]) LIBS="$saved_LIBS" ;; - # Guess no on glibc/hppa. - hppa*-*-*-gnu*) + # Guess no on glibc/hppa and NetBSD/powerpc64. + hppa*-*-*-gnu* | powerpc*-*-netbsd*) saved_LIBS="$LIBS" LIBS="$LIBS $FENV_ENVIRONMENT_LIBM" AC_RUN_IFELSE(