We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6a0514e commit 7172f50Copy full SHA for 7172f50
Programs/python.c
@@ -4,7 +4,7 @@
4
#include <locale.h>
5
6
#ifdef __FreeBSD__
7
-#include <floatingpoint.h>
+#include <fenv.h>
8
#endif
9
10
#ifdef MS_WINDOWS
@@ -23,9 +23,6 @@ main(int argc, char **argv)
23
wchar_t **argv_copy2;
24
int i, res;
25
char *oldloc;
26
-#ifdef __FreeBSD__
27
- fp_except_t m;
28
-#endif
29
30
argv_copy = (wchar_t **)PyMem_RawMalloc(sizeof(wchar_t*) * (argc+1));
31
argv_copy2 = (wchar_t **)PyMem_RawMalloc(sizeof(wchar_t*) * (argc+1));
@@ -40,8 +37,7 @@ main(int argc, char **argv)
40
37
* exceptions by default. Here we disable them.
41
38
*/
42
39
43
- m = fpgetmask();
44
- fpsetmask(m & ~FP_X_OFL);
+ fedisableexcept(FE_OVERFLOW);
45
46
47
oldloc = _PyMem_RawStrdup(setlocale(LC_ALL, NULL));
0 commit comments