Commit b5a1d753 authored by Victor Stinner's avatar Victor Stinner

Replace fpgetmask() with fedisableexcept()

Issue #24520: On FreeBSD, fpgetmask() was deprecated long time ago.
fedisableexcept() is now preferred.
parent 762d761d
......@@ -3,7 +3,7 @@
#include "Python.h"
#ifdef __FreeBSD__
#include <floatingpoint.h>
#include <fenv.h>
#endif
int
......@@ -15,10 +15,7 @@ main(int argc, char **argv)
* 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);
}
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