Replace fpgetmask() with fedisableexcept()

Issue #24520: On FreeBSD, fpgetmask() was deprecated long time ago.
fedisableexcept() is now preferred.
This commit is contained in:
Victor Stinner 2016-01-20 22:30:58 +01:00
parent 762d761d65
commit b5a1d7536d
1 changed files with 2 additions and 5 deletions

View File

@ -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);
}