]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Replace fpgetmask() with fedisableexcept()
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 20 Jan 2016 21:30:58 +0000 (22:30 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 20 Jan 2016 21:30:58 +0000 (22:30 +0100)
Issue #24520: On FreeBSD, fpgetmask() was deprecated long time ago.
fedisableexcept() is now preferred.

Modules/python.c

index 2739b8b11098ee799ff86b1a3d6c3f51ab8fc899..d83642af8e591b8906b960a5d5f82b068755228e 100644 (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);
 }