(original) (raw)
changeset: 100005:76f35f35be50 branch: 3.5 parent: 100001:32ee5d197500 user: Victor Stinner victor.stinner@gmail.com date: Wed Jan 20 22:27:34 2016 +0100 files: Programs/python.c description: Replace fpgetmask() with fedisableexcept() Issue #24520: On FreeBSD, fpgetmask() was deprecated long time ago. fedisableexcept() is now preferred. diff -r 32ee5d197500 -r 76f35f35be50 Programs/python.c --- a/Programs/python.c Wed Jan 20 03:10:13 2016 -0800 +++ b/Programs/python.c Wed Jan 20 22:27:34 2016 +0100 @@ -4,7 +4,7 @@ #include #ifdef __FreeBSD__ -#include +#include #endif #ifdef MS_WINDOWS @@ -23,9 +23,6 @@ wchar_t **argv_copy2; int i, res; char *oldloc; -#ifdef __FreeBSD__ - fp_except_t m; -#endif argv_copy = (wchar_t **)PyMem_RawMalloc(sizeof(wchar_t*) * (argc+1)); argv_copy2 = (wchar_t **)PyMem_RawMalloc(sizeof(wchar_t*) * (argc+1)); @@ -40,8 +37,7 @@ * exceptions by default. Here we disable them. */ #ifdef __FreeBSD__ - m = fpgetmask(); - fpsetmask(m & ~FP_X_OFL); + fedisableexcept(FE_OVERFLOW); #endif oldloc = _PyMem_RawStrdup(setlocale(LC_ALL, NULL));/victor.stinner@gmail.com