]> git.proxmox.com Git - mirror_edk2.git/blame - AppPkg/Applications/Python/Python-2.7.10/Modules/python.c
AppPkg/Applications/Python/Python-2.7.10: Initial Checkin part 2/5.
[mirror_edk2.git] / AppPkg / Applications / Python / Python-2.7.10 / Modules / python.c
CommitLineData
7eb75bcc
DM
1/* Minimal main program -- everything is loaded from the library */\r
2\r
3#include "Python.h"\r
4\r
5#ifdef __FreeBSD__\r
6#include <floatingpoint.h>\r
7#endif\r
8\r
9int\r
10main(int argc, char **argv)\r
11{\r
12 /* 754 requires that FP exceptions run in "no stop" mode by default,\r
13 * and until C vendors implement C99's ways to control FP exceptions,\r
14 * Python requires non-stop mode. Alas, some platforms enable FP\r
15 * exceptions by default. Here we disable them.\r
16 */\r
17#ifdef __FreeBSD__\r
18 fp_except_t m;\r
19\r
20 m = fpgetmask();\r
21 fpsetmask(m & ~FP_X_OFL);\r
22#endif\r
23 return Py_Main(argc, argv);\r
24}\r