diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-01-20 21:30:58 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-01-20 21:30:58 (GMT) |
commit | b5a1d7536dfb5db70424f59eeebf4a35363b9aed (patch) | |
tree | d8abef295c28bf50538aba4a8a92d43b4e33826b | |
parent | 762d761d6503f14e47dd531ac4b14ccfc9a2853d (diff) | |
download | cpython-b5a1d7536dfb5db70424f59eeebf4a35363b9aed.zip cpython-b5a1d7536dfb5db70424f59eeebf4a35363b9aed.tar.gz cpython-b5a1d7536dfb5db70424f59eeebf4a35363b9aed.tar.bz2 |
Replace fpgetmask() with fedisableexcept()
Issue #24520: On FreeBSD, fpgetmask() was deprecated long time ago.
fedisableexcept() is now preferred.
-rw-r--r-- | Modules/python.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Modules/python.c b/Modules/python.c index 2739b8b..d83642a 100644 --- a/Modules/python.c +++ b/Modules/python.c @@ -3,7 +3,7 @@ #include "Python.h" #ifdef __FreeBSD__ -#include <floatingpoint.h> +#include <fenv.h> #endif int @@ -15,10 +15,7 @@ main(int argc, char **argv) * exceptions by default. Here we disable them. */ #ifdef __FreeBSD__ - fp_except_t m; - - m = fpgetmask(); - fpsetmask(m & ~FP_X_OFL); + fedisableexcept(FE_OVERFLOW); #endif return Py_Main(argc, argv); } |