Merge 3.5 (issue #24520)

This commit is contained in:
Victor Stinner 2016-01-20 22:28:10 +01:00
commit c3ea8d2268
1 changed files with 2 additions and 6 deletions

View File

@ -4,7 +4,7 @@
#include <locale.h> #include <locale.h>
#ifdef __FreeBSD__ #ifdef __FreeBSD__
#include <floatingpoint.h> #include <fenv.h>
#endif #endif
#ifdef MS_WINDOWS #ifdef MS_WINDOWS
@ -23,9 +23,6 @@ main(int argc, char **argv)
wchar_t **argv_copy2; wchar_t **argv_copy2;
int i, res; int i, res;
char *oldloc; char *oldloc;
#ifdef __FreeBSD__
fp_except_t m;
#endif
argv_copy = (wchar_t **)PyMem_RawMalloc(sizeof(wchar_t*) * (argc+1)); argv_copy = (wchar_t **)PyMem_RawMalloc(sizeof(wchar_t*) * (argc+1));
argv_copy2 = (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. * exceptions by default. Here we disable them.
*/ */
#ifdef __FreeBSD__ #ifdef __FreeBSD__
m = fpgetmask(); fedisableexcept(FE_OVERFLOW);
fpsetmask(m & ~FP_X_OFL);
#endif #endif
oldloc = _PyMem_RawStrdup(setlocale(LC_ALL, NULL)); oldloc = _PyMem_RawStrdup(setlocale(LC_ALL, NULL));