From 458120dd40db6b4df55a4e96b650e16798ef06a0 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Tue, 3 May 2011 11:25:13 +0000 Subject: add hg and python --- sys/src/cmd/python/Modules/python.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 sys/src/cmd/python/Modules/python.c (limited to 'sys/src/cmd/python/Modules/python.c') diff --git a/sys/src/cmd/python/Modules/python.c b/sys/src/cmd/python/Modules/python.c new file mode 100644 index 000000000..2739b8b11 --- /dev/null +++ b/sys/src/cmd/python/Modules/python.c @@ -0,0 +1,24 @@ +/* Minimal main program -- everything is loaded from the library */ + +#include "Python.h" + +#ifdef __FreeBSD__ +#include +#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__ + fp_except_t m; + + m = fpgetmask(); + fpsetmask(m & ~FP_X_OFL); +#endif + return Py_Main(argc, argv); +} -- cgit v1.2.3