Index: configure =================================================================== --- configure (revision 80043) +++ configure (working copy) @@ -23626,10 +23626,10 @@ done ## features.h is used by date-time code on Linux and in extra/tzone -## floatingpoint.h is used for fpsetmask on FreeBSD. +## fenv.h is used for feholdexcept and feupdateenv on FreeBSD. ## sys/param.h is one way to get PATH_MAX. ## elf.h is used for fallback for HAVE_NO_SYMBOL_UNDERSCORE -for ac_header in arpa/inet.h elf.h features.h floatingpoint.h \ +for ac_header in arpa/inet.h elf.h features.h fenv.h \ langinfo.h netdb.h netinet/in.h sys/param.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` Index: configure.ac =================================================================== --- configure.ac (revision 80043) +++ configure.ac (working copy) @@ -929,10 +929,10 @@ sys/resource.h sys/select.h sys/socket.h sys/stat.h sys/time.h \ sys/times.h sys/utsname.h unistd.h utime.h) ## features.h is used by date-time code on Linux and in extra/tzone -## floatingpoint.h is used for fpsetmask on FreeBSD. +## fenv.h is used for feholdexcept and feupdateenv on FreeBSD. ## sys/param.h is one way to get PATH_MAX. ## elf.h is used for fallback for HAVE_NO_SYMBOL_UNDERSCORE -AC_CHECK_HEADERS(arpa/inet.h elf.h features.h floatingpoint.h \ +AC_CHECK_HEADERS(arpa/inet.h elf.h features.h fenv.h \ langinfo.h netdb.h netinet/in.h sys/param.h) ## stdalign.h is C11. AC_CHECK_HEADERS(stdalign.h) Index: doc/manual/R-admin.texi =================================================================== --- doc/manual/R-admin.texi (revision 80043) +++ doc/manual/R-admin.texi (working copy) @@ -6128,8 +6128,8 @@ current FPUs can support this, selecting such support can be a pain. The problem is that there is no agreement on how to set the signalling behaviour; Sun/Sparc, SGI/IRIX and @cputype{ix86} Linux require no -special action, FreeBSD requires a call to (the macro) -@code{fpsetmask(0)} and OSF1 required that computation be done with a +special action, FreeBSD requires a call to +@code{feholdenv()} and OSF1 required that computation be done with a @option{-ieee_with_inexact} flag etc. With Intel compilers on 32-bit and 64-bit Intel machines, one has to explicitly disable flush-to-zero and denormals-are-zero modes. Some ARM processors including A12Z and M1 Index: src/gnuwin32/fixed/h/config.h =================================================================== --- src/gnuwin32/fixed/h/config.h (revision 80043) +++ src/gnuwin32/fixed/h/config.h (working copy) @@ -306,8 +306,8 @@ /* Define to 1 if you have the header file. */ /* #undef HAVE_FEATURES_H */ -/* Define to 1 if you have the header file. */ -/* #undef HAVE_FLOATINGPOINT_H */ +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FENV_H */ /* Define if C's Rcomplex and Fortran's COMPLEX*16 can be interchanged, and can do arithmetic on the latter. */ Index: src/include/config.h.in =================================================================== --- src/include/config.h.in (revision 80043) +++ src/include/config.h.in (working copy) @@ -294,8 +294,8 @@ /* Define to 1 if you have the header file. */ #undef HAVE_FEATURES_H -/* Define to 1 if you have the header file. */ -#undef HAVE_FLOATINGPOINT_H +/* Define to 1 if you have the header file. */ +#undef HAVE_FENV_H /* Define if C's Rcomplex and Fortran's COMPLEX*16 can be interchanged, and can do arithmetic on the latter. */ Index: src/unix/sys-unix.c =================================================================== --- src/unix/sys-unix.c (revision 80043) +++ src/unix/sys-unix.c (working copy) @@ -960,8 +960,8 @@ */ #ifdef __FreeBSD__ -# ifdef HAVE_FLOATINGPOINT_H -# include +# ifdef HAVE_FENV_H +# include # endif #endif @@ -979,7 +979,8 @@ { if (start) { #ifdef __FreeBSD__ - fpsetmask(0); + static fenv; + feholdexcept(&fenv); #endif #if (defined(__i386) || defined(__x86_64)) && defined(__INTEL_COMPILER) && __INTEL_COMPILER > 800 @@ -1004,7 +1005,7 @@ #endif } else { #ifdef __FreeBSD__ - fpsetmask(~0); + feupdateenv(&env); #endif } }