diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-01-20 22:28:10 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-01-20 22:28:10 +0100 |
commit | c3ea8d226851861ad7762c885e09ceae6ed62d3c (patch) | |
tree | a1709e850cbe00942c148dcbb90a65408c03ad8f /Programs/python.c | |
parent | f3914eb16d28ad9eb20fe5133d9aa83658bcc27f (diff) | |
parent | 7172f507e18212dbc3afe53ce9dbdc696753c94c (diff) | |
download | cpython-git-c3ea8d226851861ad7762c885e09ceae6ed62d3c.tar.gz |
Merge 3.5 (issue #24520)
Diffstat (limited to 'Programs/python.c')
-rw-r--r-- | Programs/python.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Programs/python.c b/Programs/python.c index 2e5e4e368f..37b10b837e 100644 --- a/Programs/python.c +++ b/Programs/python.c @@ -4,7 +4,7 @@ #include <locale.h> #ifdef __FreeBSD__ -#include <floatingpoint.h> +#include <fenv.h> #endif #ifdef MS_WINDOWS @@ -23,9 +23,6 @@ main(int argc, char **argv) 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 @@ main(int argc, char **argv) * 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)); |