]>
Commit | Line | Data |
---|---|---|
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 | |
9 | int\r | |
10 | main(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 |