Commit 5e0ea754 authored by Victor Stinner's avatar Victor Stinner Committed by GitHub

bpo-37474: Don't call fedisableexcept() on FreeBSD (GH-16515)

On FreeBSD, Python no longer calls fedisableexcept() at startup to
control the floating point control mode. The call became useless
since FreeBSD 6: it became the default mode.
parent 2f902612
On FreeBSD, Python no longer calls ``fedisableexcept()`` at startup to
control the floating point control mode. The call became useless since
FreeBSD 6: it became the default mode.
......@@ -6,10 +6,6 @@
#include "pycore_pymem.h"
#include "pycore_pystate.h"
#ifdef __FreeBSD__
# include <fenv.h> /* fedisableexcept() */
#endif
/* Includes for exit_sigint() */
#include <stdio.h> /* perror() */
#ifdef HAVE_SIGNAL_H
......@@ -43,15 +39,6 @@ pymain_init(const _PyArgv *args)
return status;
}
/* 754 requires that FP exceptions run in "no stop" mode by default,
* and until C vendors implement C99's ways to control FP exceptions,
* Python requires non-stop mode. Alas, some platforms enable FP
* exceptions by default. Here we disable them.
*/
#ifdef __FreeBSD__
fedisableexcept(FE_OVERFLOW);
#endif
PyPreConfig preconfig;
PyPreConfig_InitPythonConfig(&preconfig);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment