diff options
author | nkozlovskiy <nmk@ydb.tech> | 2023-09-29 12:24:06 +0300 |
---|---|---|
committer | nkozlovskiy <nmk@ydb.tech> | 2023-09-29 12:41:34 +0300 |
commit | e0e3e1717e3d33762ce61950504f9637a6e669ed (patch) | |
tree | bca3ff6939b10ed60c3d5c12439963a1146b9711 /contrib/tools/python/src/Modules/python.c | |
parent | 38f2c5852db84c7b4d83adfcb009eb61541d1ccd (diff) | |
download | ydb-e0e3e1717e3d33762ce61950504f9637a6e669ed.tar.gz |
add ydb deps
Diffstat (limited to 'contrib/tools/python/src/Modules/python.c')
-rw-r--r-- | contrib/tools/python/src/Modules/python.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/contrib/tools/python/src/Modules/python.c b/contrib/tools/python/src/Modules/python.c new file mode 100644 index 0000000000..d83642af8e --- /dev/null +++ b/contrib/tools/python/src/Modules/python.c @@ -0,0 +1,21 @@ +/* Minimal main program -- everything is loaded from the library */ + +#include "Python.h" + +#ifdef __FreeBSD__ +#include <fenv.h> +#endif + +int +main(int argc, char **argv) +{ + /* 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 + return Py_Main(argc, argv); +} |