(original) (raw)
changeset: 100007:394ae9efc5c2 branch: 2.7 parent: 100003:8d7aadd40d30 user: Victor Stinner victor.stinner@gmail.com date: Wed Jan 20 22:30:58 2016 +0100 files: Modules/python.c description: Replace fpgetmask() with fedisableexcept() Issue #24520: On FreeBSD, fpgetmask() was deprecated long time ago. fedisableexcept() is now preferred. diff -r 8d7aadd40d30 -r 394ae9efc5c2 Modules/python.c --- a/Modules/python.c Wed Jan 20 03🔞48 2016 -0800 +++ b/Modules/python.c Wed Jan 20 22:30:58 2016 +0100 @@ -3,7 +3,7 @@ #include "Python.h" #ifdef __FreeBSD__ -#include +#include #endif int @@ -15,10 +15,7 @@ * 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); }/victor.stinner@gmail.com